diff options
author | Bill Marquette <bill.marquette@gmail.com> | 2009-03-13 01:22:10 -0500 |
---|---|---|
committer | Bill Marquette <bill.marquette@gmail.com> | 2009-03-13 01:22:10 -0500 |
commit | 8bf02470d3a65111b82d8231b3f9342b775295ec (patch) | |
tree | c5b9d34764639df9b522a1d5fb0f1b8d3af05b8a | |
parent | 2e069686fb867be9aedd3d39cecc57806f9c2af1 (diff) | |
download | pfsense-8bf02470d3a65111b82d8231b3f9342b775295ec.zip pfsense-8bf02470d3a65111b82d8231b3f9342b775295ec.tar.gz |
Fix javascript include in head.inc
Add dragdrop (used in index.php for the Sortable class)
use dom:loaded event instead of window.loaded
-rwxr-xr-x | usr/local/www/head.inc | 7 | ||||
-rwxr-xr-x | usr/local/www/index.php | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index c4e0006..bbb3b5c 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -49,9 +49,10 @@ $pagetitle = gentitle( $pgtitle ); outputJavaScriptFileInline("javascript/pi.js"); outputJavaScriptFileInline("javascript/firebug-lite.js"); } - outputJavaScriptFileInline("/javascript/scriptaculous/prototype.js"); - outputJavaScriptFileInline("/javascript/scriptaculous/scriptaculous.js"); - outputJavaScriptFileInline("/javascript/scriptaculous/effects.js"); + outputJavaScriptFileInline("javascript/scriptaculous/prototype.js"); + outputJavaScriptFileInline("javascript/scriptaculous/scriptaculous.js"); + outputJavaScriptFileInline("javascript/scriptaculous/effects.js"); + outputJavaScriptFileInline("javascript/scriptaculous/dragdrop.js"); /* * Find all javascript files that need to be included diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 4d66958..198211b 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -709,7 +709,7 @@ echo $jscriptstr; <?php include("fend.inc"); ?> <script type="text/javascript"> - window.onload = function(in_event) + document.observe('dom:loaded', function(in_event) { Sortable.create("col1", {tag:'div',dropOnEmpty:true,containment:columns,handle:'widgetheader',constraint:false,only:'widgetdiv',onChange:showSave}); Sortable.create("col2", {tag:'div',dropOnEmpty:true,containment:columns,handle:'widgetheader',constraint:false,only:'widgetdiv',onChange:showSave}); @@ -717,7 +717,7 @@ echo $jscriptstr; hideAllWidgets(); domTT_activate('welcome1', null, 'x', 287, 'y', 107, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '','delay', 1000, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle'); <?php } ?> - } + }); <?php //build list of javascript include files $jsincludefiles = array(); |