From e942d5d431346439533910bf649b10ec17463c03 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 25 Oct 2011 18:57:40 +0200 Subject: fixed some bugs. show log screen is now bigger and opens a scrollbar automatically. debug screens added. fixed continue in debug mode, added progress indicator for all screens. --- src/fbgui.qrc | 3 + src/html/images/loading.gif | Bin 0 -> 8787 bytes src/html/js/networkDiscovery.js | 22 ++- src/html/networkdiscovery.css | 5 + src/html/networkdiscovery.html | 207 +----------------------- src/html/networkdiscovery_debug.html | 85 ++++++++++ src/html/networkdiscovery_userchoice.html | 13 +- src/html/networkdiscovery_userchoice_debug.html | 33 ++++ src/main.cpp | 4 + src/ndgui.cpp | 99 +++++++++++- src/ndgui.h | 14 ++ src/networkdiscovery.cpp | 1 - 12 files changed, 276 insertions(+), 210 deletions(-) create mode 100644 src/html/images/loading.gif create mode 100644 src/html/networkdiscovery_debug.html create mode 100644 src/html/networkdiscovery_userchoice_debug.html diff --git a/src/fbgui.qrc b/src/fbgui.qrc index 77d852a..a5333c5 100644 --- a/src/fbgui.qrc +++ b/src/fbgui.qrc @@ -29,5 +29,8 @@ html/css/images/ui-icons_ef8c08_256x240.png html/css/images/ui-icons_ffd27a_256x240.png html/css/images/ui-icons_ffffff_256x240.png + html/networkdiscovery_debug.html + html/networkdiscovery_userchoice_debug.html + html/images/loading.gif diff --git a/src/html/images/loading.gif b/src/html/images/loading.gif new file mode 100644 index 0000000..cbe59fb Binary files /dev/null and b/src/html/images/loading.gif differ diff --git a/src/html/js/networkDiscovery.js b/src/html/js/networkDiscovery.js index f26385b..1057bd7 100644 --- a/src/html/js/networkDiscovery.js +++ b/src/html/js/networkDiscovery.js @@ -1,3 +1,9 @@ +var hideProgressIndicator = function () { + $("#ajaxBusy").hide(); +}; + + + var updateTips = function ( t ) { $( ".validateTips" ) .text( t ) @@ -39,10 +45,16 @@ var checkRegexp = function ( o, regexp, n ) { var showLog = function (t) { $("#nd_show_log_msg").html(t); //$("#nd_show_log_msg").attr('readonly','readonly'); + $('#nd_show_log_dialog').resizable("enable"); $("#nd_show_log_dialog").dialog( - { minWidth: 450, + { minWidth: 600, + maxHeight: 400, modal: true, - draggable: false + draggable: false, + closeOnEscape: false, + open: function(event, ui) { + $(this).css({'max-height': 400, 'overflow-y': 'auto'}); + }, }); }; @@ -152,6 +164,7 @@ var ip4_manualConfigurationDialog = function () { modal: true, resizable: false, draggable: false, + closeOnEscape: false, close: function() {allFields.val("").removeClass("ui-state-error");}, open: function(event, ui) { $(".ui-dialog-titlebar-close").hide();} }); @@ -180,6 +193,7 @@ var abortBootDialog = function (m) { modal: true, resizable: false, draggable: false, + closeOnEscape: false, open: function(event, ui) { $(".ui-dialog-titlebar-close").hide();} }); }; @@ -217,6 +231,7 @@ var chooseInterfaceDialog = function (i) { modal: true, resizable: false, draggable: false, + closeOnEscape: false, open: function(event, ui) { $(".ui-dialog-titlebar-close").hide();} }); } @@ -246,6 +261,7 @@ var updateIfStatus = function(i, s){ var addInterface = function (i){ + hideProgressIndicator(); $("#nd_progress_container").append( "
"+ " Interface: " +i+ @@ -254,7 +270,7 @@ var addInterface = function (i){ " style='height: 10px;'>
"+ "" ); - $("#"+i+"_progress").progressbar({ value: 33 }); + //$("#"+i+"_progress").progressbar({ value: 33 }); }; diff --git a/src/html/networkdiscovery.css b/src/html/networkdiscovery.css index a111ef6..1d3b406 100644 --- a/src/html/networkdiscovery.css +++ b/src/html/networkdiscovery.css @@ -64,6 +64,11 @@ aside { display:none; } +#ajaxBusy { + margin-left: auto; + margin-right: auto; +} + textarea { width: 400px; height: 200px; diff --git a/src/html/networkdiscovery.html b/src/html/networkdiscovery.html index 1f24b0d..b8c24cd 100644 --- a/src/html/networkdiscovery.html +++ b/src/html/networkdiscovery.html @@ -7,208 +7,17 @@ -
@@ -226,7 +35,7 @@ var addInterface = function (i){
-

test

+

test


diff --git a/src/html/networkdiscovery_debug.html b/src/html/networkdiscovery_debug.html
new file mode 100644
index 0000000..5f17a0c
--- /dev/null
+++ b/src/html/networkdiscovery_debug.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+    
+

Network Discovery

+
+
+

Welcome to the Network Discovery. We are now looking for usable interfaces and will go on as soon as we found one. This may take a few seconds.

+
+
+
+ +
+
+
+ +

test

+ +
+

+            
+ +
+

+

+ +
+

+
+ +
+

+

All form fields are required.

+
+
+ + + + + + + + + + + + +
+
+
+ +
+
+
+
+ +
+
+
+

RZ Uni Freiburg, 2011

+
+ + diff --git a/src/html/networkdiscovery_userchoice.html b/src/html/networkdiscovery_userchoice.html index 9cf165f..3625fe0 100644 --- a/src/html/networkdiscovery_userchoice.html +++ b/src/html/networkdiscovery_userchoice.html @@ -5,7 +5,17 @@ - + + + + @@ -14,6 +24,7 @@

Please press F5 if you want to choose which interface to use.

+