From 627bcf0ee7e209ed59394dcec85b2cfacd8ada4b Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 22 Sep 2011 16:47:47 +0200 Subject: added some more js functions. abortBootDialog() and chooseInterfaceDialog() --- LogReceiver/html/js/nd-functions.js | 50 ++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'LogReceiver/html/js/nd-functions.js') diff --git a/LogReceiver/html/js/nd-functions.js b/LogReceiver/html/js/nd-functions.js index ac8f273..e3ee793 100644 --- a/LogReceiver/html/js/nd-functions.js +++ b/LogReceiver/html/js/nd-functions.js @@ -1,9 +1,52 @@ +var abortBootDialog = function (m) { + $("#nd_abort_boot_msg").html(m); + $("#nd_abort_boot_dialog").dialog( + { buttons: { "Show Log": function() {fbgui.showLog(); + $(this).dialog("close");}, + "Restart": function() {fbgui.restartSystem(); + $(this).dialog("close"); }, + "Shut Down": function() { fbgui.shutDownSystem(); + $(this).dialog("close"); } + } , + minWidth: 450, + modal: true, + resizable: false, + draggable: false, + open: function(event, ui) { $(".ui-dialog-titlebar-close").hide();} + }); +}; + +var chooseInterfaceDialog = function (i) { + var cb = ""+ + ""; + $("#nd_choose_interface_msg").html(cb); + $("#nd_choose_interface_dialog").dialog( + { buttons: { "Show Log": function() {fbgui.showLog(); + $(this).dialog("close");}, + "Restart": function() {fbgui.restartSystem(); + $(this).dialog("close"); }, + "Shut Down": function() { fbgui.shutDownSystem(); + $(this).dialog("close"); }, + "Continue": function() { fbgui.continueBoot(); + $(this).dialog("close"); } + } , + minWidth: 550, + modal: true, + resizable: false, + draggable: false, + open: function(event, ui) { $(".ui-dialog-titlebar-close").hide();} + }); +} + var updateStatus = function (s){ }; -var updateIfProgressBar = function (i, p){ - fbgui.notifyCall(); +var updateIfProgressBar = function (i, p){ if (p >= 0 && p <= 100){ $("#"+i+"_progress").progressbar({ value: p }); }else{ @@ -12,11 +55,10 @@ var updateIfProgressBar = function (i, p){ }; var updateIfStatus = function(i, s){ - + $("#"+i+"_status").html(s); }; var addInterface = function (i){ - fbgui.notifyCall(); $("#nd_progress_container").append( "
"+ " Interface: " +i+ -- cgit v1.2.3-55-g7522