- yweb: rework Y_Tools_remote_osd.yhtm

* use only one file to make osd-shots
* add a (not really) zoom-function
* add posibility to change filename
* add needed locals
* remove Y_Tools_fbshot.yhtm
This commit is contained in:
svenhoefer
2013-02-06 22:14:10 +01:00
parent c6155f29b4
commit c2668d2f2c
8 changed files with 38 additions and 73 deletions

View File

@@ -75,7 +75,6 @@ install_DATA = channels.js \
Y_Tools_Boxcontrol.yhtm \ Y_Tools_Boxcontrol.yhtm \
Y_Tools_Check_Install.yhtm \ Y_Tools_Check_Install.yhtm \
Y_Tools_Cmd.yhtm \ Y_Tools_Cmd.yhtm \
Y_Tools_fbshot.yhtm \
Y_Tools_Flash_Menue.yhtm \ Y_Tools_Flash_Menue.yhtm \
Y_Tools_Flash_Upload.yhtm \ Y_Tools_Flash_Upload.yhtm \
Y_Tools_Info_Menue.yhtm \ Y_Tools_Info_Menue.yhtm \

View File

@@ -72,8 +72,7 @@ function init(){
</script> </script>
</head> </head>
{=var-set:lcshot={=if-file-exists:/bin/lcshot~true~{=if-file-exists:/var/bin/lcshot~true~false=}=}=} {=var-set:lcshot={=if-file-exists:/bin/lcshot~true~{=if-file-exists:/var/bin/lcshot~true~false=}=}=}
{=var-set:fbshot={=if-file-exists:/bin/fbshot~true~{=if-file-exists:/var/bin/fbshot~true~{=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=}=}=} {=var-set:fbshot={=if-file-exists:/bin/fbshot~true~{=if-file-exists:/var/bin/fbshot~true~false=}=}=}
{=var-set:dboxshot={=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=}
<body> <body>
<div class="y_menu_sec_box"> <div class="y_menu_sec_box">
<div class="y_menu_sec_box_head"><h2>{=L:main.boxcontrol=}</h2></div> <div class="y_menu_sec_box_head"><h2>{=L:main.boxcontrol=}</h2></div>
@@ -106,13 +105,13 @@ function init(){
</li> </li>
<li> <li>
{=if-equal:{=var-get:fbshot=}~true~ {=if-equal:{=var-get:fbshot=}~true~
<a target="work" title="{=L:bc.menue.osd_screenshot_desc=}" href="Y_Tools_fbshot.yhtm">{=L:bc.menue.osd_screenshot=}</a> <a target="work" title="{=L:bc.menue.osd_screenshot_desc=}" href="Y_Tools_remote_osd.yhtm?noremote=1">{=L:bc.menue.osd_screenshot=}</a>
~ ~
<a href="javascript:void(0)" class="disabled" title="{=L:bc.menue.osd_screenshot_desc_ni=}">{=L:bc.menue.osd_screenshot=}</a> <a href="javascript:void(0)" class="disabled" title="{=L:bc.menue.osd_screenshot_desc_ni=}">{=L:bc.menue.osd_screenshot=}</a>
=} =}
</li> </li>
<li> <li>
{=if-equal:{=var-get:dboxshot=}~true~ {=if-equal:{=var-get:fbshot=}~true~
<a target="work" title="{=L:bc.menue.remote_osd_desc=}" href="Y_Tools_remote_osd.yhtm">{=L:bc.menue.remote_osd=}</a> <a target="work" title="{=L:bc.menue.remote_osd_desc=}" href="Y_Tools_remote_osd.yhtm">{=L:bc.menue.remote_osd=}</a>
~ ~
<a href="javascript:void(0)" class="disabled" title="{=L:bc.menue.remote_osd_desc_ni=}">{=L:bc.menue.remote_osd=}</a> <a href="javascript:void(0)" class="disabled" title="{=L:bc.menue.remote_osd_desc_ni=}">{=L:bc.menue.remote_osd=}</a>

View File

@@ -853,4 +853,8 @@ td.shot {
} }
img#shot { img#shot {
width: 100%; width: 100%;
background-color: #ffffff;
}
img#shot:hover {
cursor: pointer;
} }

View File

@@ -1,56 +0,0 @@
{=var-set:cancache=yPInstall=}
{=include-block:Y_Blocks.txt;head=}
<script type="text/javascript" src="/Y_Baselib.js"></script>
<script type="text/javascript">
//<![CDATA[
function do_snapshot(){
show_waitbox(true);
window.setTimeout("do_snapshot2()", 500);
}
function do_snapshot2(){
var _shot = document.getElementById("shot");
var filename = id("file").value;
dbox_exec_tools("fbshot fb /tmp/"+filename+".png");
show_waitbox(false);
show_obj("shot", true);
_shot.src = "/tmp/"+filename+".png?"+Math.random();
}
function do_dboxshot(){
show_waitbox(true);
window.setTimeout("do_dboxshot2()", 500);
}
function do_dboxshot2(){
var _shot = document.getElementById("shot");
var filename = id("file").value;
var res = dbox_exec_tools("fbshot fb /tmp/"+filename+".png");
if(res != "")
dbox_exec_tools("fbshot -o /tmp/"+filename+".png");
show_waitbox(false);
show_obj("shot", true);
_shot.src = "/tmp/"+filename+".bmp?"+Math.random();
}
function do_clearshot(){
window.setTimeout("do_clearshot2()", 500);
}
function do_clearshot2(){
dbox_exec_tools("fbshot_clear");
}
//]]>
</script>
</head>
<body>
{=var-set:wait_text={=L:bc.osd.shap_wait_text=}=}{=include-block:Y_Blocks.txt;snip_wait=}
<div class="work_box">
<div class="work_box_head"><div class="work_box_head_h2">
{=var-set:help_url=Help-BoxControl-OSD_Screenshot=}{=var-set:menu={=L:bc.menue.osd_screenshot=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
<div class="work_box_body">
<button name="snapshot" ytype="shot" onclick="do_snapshot()">{=L:bc.osd.shot=}</button>
{=var-set:dboxshot={=if-file-exists:/bin/dboxshot~true~{=if-file-exists:/var/bin/dboxshot~true~false=}=}=}
<button name="clearshot" ytype="clearshot" onclick="do_clearshot()">{=L:bc.osd.delete_shots=}</button>
&nbsp;Filename:<input type="text" value="a" id="file" size="16"/>
<br/>
<img id="shot" src="" style="visibility:hidden;"/>
</div>
</div>
</body>
</html>

View File

@@ -7,14 +7,16 @@ function rcsim(_key) {
$('statusline').show(); $('statusline').show();
$('buttons').hide(); $('buttons').hide();
dbox_rcsim(_key); dbox_rcsim(_key);
window.setTimeout("do_dboxshot()",750); window.setTimeout("do_snapshot()",750);
} }
function do_dboxshot(){ function do_snapshot(){
var res = dbox_exec_tools("fbshot fb /tmp/a.png"); var filename = id("filename").value;
var res = dbox_exec_tools("fbshot fb /tmp/"+filename+".png");
var _shot = document.getElementById("shot"); var _shot = document.getElementById("shot");
_shot.src = "/tmp/a.png?"+Math.random(); _shot.src = "/tmp/"+filename+".png?"+Math.random();
$('statusline').hide(); $('statusline').hide();
$('buttons').show(); $('buttons').show();
show_obj("shot", true);
} }
function do_clearshot(){ function do_clearshot(){
window.setTimeout("do_clearshot2()", 500); window.setTimeout("do_clearshot2()", 500);
@@ -22,26 +24,39 @@ function do_clearshot(){
function do_clearshot2(){ function do_clearshot2(){
dbox_exec_tools("fbshot_clear"); dbox_exec_tools("fbshot_clear");
} }
function do_zoomshot(){
// not a really zoom-function
var _remote = document.getElementById('remote');
if (_remote.style.display == 'none')
_remote.style.display='inline';
else
_remote.style.display='none';
}
//]]> //]]>
</script> </script>
</head> </head>
<body onload="do_dboxshot()"> <body onload="do_snapshot()">
<div class="work_box"> <div class="work_box" id="work_box">
<div class="work_box_head"><div class="work_box_head_h2"> <div class="work_box_head"><div class="work_box_head_h2">
{=var-set:help_url=Help-BoxControl-Remote_OSD=}{=var-set:menu={=L:bc.menue.remote_osd=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div> {=var-set:help_url=Help-BoxControl-Remote_OSD=}{=var-set:menu={=L:bc.menue.remote_osd=}=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
<div class="work_box_body"> <div class="work_box_body">
<div style="height:30px;"> <div style="height:30px;">
<span id="buttons" style="display:none"><button name="dboxshot" ytype="shot" onclick="do_dboxshot()">{=L:bc.osd.shot=}</button>&nbsp; <span id="buttons" style="display:none">
<button name="clearshot" ytype="clearshot" onclick="do_clearshot()">{=L:bc.osd.delete_shots=}</button></span> <button name="snapshot" ytype="shot" onclick="do_snapshot()">{=L:bc.osd.shot=}</button>&nbsp;
<button name="clearshot" ytype="clearshot" onclick="do_clearshot()">{=L:bc.osd.delete_shots=}</button>&nbsp;
<button name="zoomshot" ytype="zoomshot" onclick="do_zoomshot()">{=L:bc.osd.zoom_shot=}</button>&nbsp;
{=L:filename=}:<input type="text" value="a" id="filename" size="16" />
</span>
<span id="statusline"><img border="0" src="/images/wait.gif" width="20" height="20" alt="wait"/></span> <span id="statusline"><img border="0" src="/images/wait.gif" width="20" height="20" alt="wait"/></span>
</div> </div>
<table cellpadding="0"> <table cellpadding="0">
<tr> <tr>
<td> <td id="remote" {=if-empty:{=noremote=}~~style="display: none"=}>
{=include-block:Y_Blocks.txt;remote=} {=include-block:Y_Blocks.txt;remote=}
</td> </td>
<td class="shot"> <td class="shot">
<img id="shot" src="" /> <img id="shot" src="" onclick="do_zoomshot()" style="visibility:hidden;"/>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -1,4 +1,4 @@
version=2.8.0.32 version=2.8.0.33
date=04.02.2013 date=06.02.2013
type=Release type=Release
info=Port Coolstream info=Port Coolstream

View File

@@ -51,6 +51,7 @@ check=Prüfen
help=Hilfe help=Hilfe
attention=Achtung! attention=Achtung!
directory=Verzeichnis directory=Verzeichnis
filename=Dateiname
restriced_by_management_ip=Zugriff verwehrt wg. ManagementIP restriced_by_management_ip=Zugriff verwehrt wg. ManagementIP
# ==========Main Menue # ==========Main Menue
@@ -128,6 +129,7 @@ bc.msg.send_message=Nachricht senden
======== Boxcontrol - Remote & OSD ======== Boxcontrol - Remote & OSD
bc.osd.shot=Schnappschuss bc.osd.shot=Schnappschuss
bc.osd.delete_shots=Schnappschuss löschen bc.osd.delete_shots=Schnappschuss löschen
bc.osd.zoom_shot=Schnappschuss zoomen
bc.osd.shap_wait_text=Schnappschuss wird erstellt bc.osd.shap_wait_text=Schnappschuss wird erstellt
======== Boxcontrol - TV-Screenshot ======== Boxcontrol - TV-Screenshot

View File

@@ -51,6 +51,7 @@ check=check
help=Help help=Help
attention=Attention! attention=Attention!
directory=Directory directory=Directory
filename=Filename
restriced_by_management_ip=restricted by ManagementIP restriced_by_management_ip=restricted by ManagementIP
#========= MAIN Menue #========= MAIN Menue
@@ -130,6 +131,7 @@ bc.msg.send_message=send message
======== Boxcontrol - Remote & OSD ======== Boxcontrol - Remote & OSD
bc.osd.shot=Shot bc.osd.shot=Shot
bc.osd.delete_shots=Delete shots bc.osd.delete_shots=Delete shots
bc.osd.zoom_shot=Zoom shot
bc.osd.shap_wait_text=Take Snapshot bc.osd.shap_wait_text=Take Snapshot
======== Boxcontrol - TV-Screenshot ======== Boxcontrol - TV-Screenshot