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);