From: Michael Wiebusch Date: Fri, 19 Dec 2014 14:47:30 +0000 (+0100) Subject: some GUI cosmetics to testgui X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=13243100f3eb0f760b6aa184a28f07011f629327;p=mvdsensorcontrol.git some GUI cosmetics to testgui --- diff --git a/layout/testgui.css b/layout/testgui.css index c99c8b8..095bf52 100644 --- a/layout/testgui.css +++ b/layout/testgui.css @@ -2,6 +2,22 @@ +.quasibutton { + background:#dde; + cursor:pointer; +/* text-align:center; */ + color:#228; +/* width:25px; */ +/* border:2px solid #eef; */ + transition:background .4s; +} + + + +.quasibutton:hover{ + background:#eed; +} + .bitfield { background:#dea; visibility:visible; diff --git a/tools/testgui.js b/tools/testgui.js index 8f63ab4..d007f12 100644 --- a/tools/testgui.js +++ b/tools/testgui.js @@ -165,29 +165,34 @@ $(document).ready(function(){ delete_file(); }); - $("#advoptbtn").click(function(){ -// toggleVis("advancedOptionsContainer"); - $("#advancedOptionsContainer").fadeToggle(); - $('html, body').animate({ - scrollTop: $("#advancedOptionsContainer").offset().top - }, 2000); -// var $target = $('html,body'); -// $target.animate({scrollTop: $target.height()}, 1000); - }); - $("#debugbtn").click(function(){ -// toggleVis("theConsoleContainer"); - $("#theConsoleContainer").fadeToggle(); - $('html, body').animate({ - scrollTop: $("#theConsoleContainer").offset().top - }, 2000); -// var $target = $('html,body'); -// $target.animate({scrollTop: $target.height()}, 1000); - }); +// $("#advoptbtn").click(function(){ +// // toggleVis("advancedOptionsContainer"); +// $("#advancedOptionsContainer").fadeToggle(); +// $('html, body').animate({ +// scrollTop: $("#advancedOptionsContainer").offset().top +// }, 2000); +// // var $target = $('html,body'); +// // $target.animate({scrollTop: $target.height()}, 1000); +// }); + + +// $("#debugbtn").click(function(){ +// // toggleVis("theConsoleContainer"); +// $("#theConsoleContainer").fadeToggle(); +// $('html, body').animate({ +// scrollTop: $("#theConsoleContainer").offset().top +// }, 2000); +// // var $target = $('html,body'); +// // $target.animate({scrollTop: $target.height()}, 1000); +// }); $("#button_init_system").click(function(){ exec_init_system(); }); + unfolds($("#show_advanced_options"),$("#advancedOptionsContainer")); + unfolds($("#show_theConsole"),$("#theConsoleContainer")); + timer = $.timer(function() { clear_report(); timer.stop(); @@ -195,6 +200,46 @@ $(document).ready(function(){ }); + + + + + + + + +function unfold(button,container){ + var button_text = button.html(); + var new_button_text; + + if(container.is(':visible')){ + new_button_text = button_text.replace("[-]","[+]"); + } else { + new_button_text = button_text.replace("[+]","[-]"); + } + container.fadeToggle(); + $('html, body').animate({ + scrollTop: container.offset().top + }, 2000); + button.html(new_button_text); +} + +function unfolds(button,container){ + button.click(function(){ + unfold(button,container); + }); + + var button_text = button.html(); + + if(container.is(':visible')){ + button.html("[-] "+button_text); + } else { + button.html("[+] "+button_text); + } + +} + + function set_clear_timer(){ timer.set({time:3000,autostart: true}); } diff --git a/tools/testgui.pl b/tools/testgui.pl index 9ff4389..6acec15 100755 --- a/tools/testgui.pl +++ b/tools/testgui.pl @@ -210,14 +210,17 @@ sub init_html{ print ""; # end of that story - print ""; - print ""; +# print ""; +# print ""; print ""; print ""; print "

"; - + + + + print "

advanced options

"; print "
"; print "
advanced options
"; print "
"; @@ -229,12 +232,11 @@ sub init_html{ print q%%; print ""; - - print "
"; print "
"; + print "

show debug output

"; print "
"; print "
debug output
"; print "
[the \"console\"]
";