From 619f2dbd0722d8f1a9c2ed5106cbd43a487b67e2 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 12 Jul 2010 13:28:52 -0400 Subject: Add undo button for drag and drop reordering --- usr/local/www/guiconfig.inc | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'usr/local/www/guiconfig.inc') diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 44680aa..e27b78b 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -338,6 +338,70 @@ EOFnp; } +function print_info_box_np_undo($msg, $name="apply",$value="Apply changes", $undo) { + global $g; + + if(stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) { + $savebutton = ""; + $savebutton .= " "; + $savebutton .= " "; + $savebutton.=""; + if($_POST['if']) + $savebutton .= ""; + } + $nifty_redbox = "#990000"; + $nifty_blackbox = "#000000"; + + $themename = $g['theme']; + + if(file_exists("/usr/local/www/themes/{$themename}/tabcontrols.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/tabcontrols.php"); + eval($toeval); + } + + if(file_exists("/usr/local/www/themes/{$themename}/infobox.php")) { + $toeval = file_get_contents("/usr/local/www/themes/{$themename}/infobox.php"); + eval($toeval); + } + + + if(!$savebutton) { + $savebutton = ''; + } + + echo << + + +
+ + + + + {$savebutton} + {$undobutton} + +
+     + + {$msg} +
+
+
+

+

+ + + + +EOFnp; + +} + function print_info_box($msg) { print_info_box_np($msg); } -- cgit v1.1