From 7813d53ef6361ee0019f3a0e710b81c9183e7a0f Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 2 Apr 2010 07:43:00 -0400 Subject: [PATCH] remove Mootools for Synchronize --- js/server_synchronize.js | 10 ++++++++++ server_synchronize.php | 34 +++++++++------------------------- 2 files changed, 19 insertions(+), 25 deletions(-) create mode 100644 js/server_synchronize.js diff --git a/js/server_synchronize.js b/js/server_synchronize.js new file mode 100644 index 000000000..e8e626bf2 --- /dev/null +++ b/js/server_synchronize.js @@ -0,0 +1,10 @@ +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * for server_synchronize.php + * + */ +$(document).ready(function() { + $('.server_selector').change(function() { + $(this).parent().parent().parent().children('.toggler').toggle(); + }); +}); diff --git a/server_synchronize.php b/server_synchronize.php index ca5250ca3..c1c873b55 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -16,7 +16,7 @@ require_once './libraries/common.inc.php'; * Does the common work */ $GLOBALS['js_include'][] = 'functions.js'; -$GLOBALS['js_include'][] = 'mootools-more.js'; +$GLOBALS['js_include'][] = 'server_synchronize.js'; require_once './libraries/server_common.inc.php'; /** @@ -1124,37 +1124,37 @@ if (isset($_REQUEST['synchronize_db'])) { - - + ' . $GLOBALS['strHost'] . ' - + ' . $GLOBALS['strPort'] . ' - + ' . $GLOBALS['strSocket'] . ' - + ' . $GLOBALS['strUserName']. ' - + ' . $GLOBALS['strPassword'] . ' - + ' . $GLOBALS['strDatabase'] . ' - + ' . $GLOBALS['strDatabase'] . ' '; // these unset() do not complain if the elements do not exist @@ -1174,22 +1174,6 @@ if (isset($_REQUEST['synchronize_db'])) { } echo ' '; - - // Add JS to show/hide rows based on the selection - PMA_js(''. - '$(\'' . $type . '_type\').addEvent(\'change\',function() {' . - ' if ($(\'' . $type . 'tr1\').getStyle(\'display\')=="none") {' . - ' for (var i=1; i<7; i++)' . - ' $(\'' . $type . 'tr\'+i).tween(\'display\', \'table-row\');' . - ' $(\'' . $type . 'tr7\').tween(\'display\', \'none\');' . - ' }' . - ' else {' . - ' for (var i=1; i<7; i++)'. - ' $(\'' . $type . 'tr\'+i).tween(\'display\', \'none\');' . - ' $(\'' . $type . 'tr7\').tween(\'display\', \'table-row\');'. - ' }' . - '});' - ); } unset ($types, $type);