diff --git a/js/db_search.js b/js/db_search.js index 41ea5e66e..0a82a8f7b 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -51,6 +51,7 @@ $(document).ready(function() { * (see $GLOBALS['cfg']['AjaxEnable']) * * @uses PMA_ajaxShowMessage() + * @see $GLOBALS['cfg']['AjaxEnable'] */ $("#db_search_form.ajax").live('submit', function(event) { event.preventDefault(); diff --git a/js/functions.js b/js/functions.js index 9d9e836b4..6b291fef3 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1907,6 +1907,7 @@ $(document).ready(function() { * @uses PMA_ajaxShowMessage() * @uses window.parent.refreshNavigation() * @uses window.parent.refreshMain() + * @see $cfg['AjaxEnable'] */ $(document).ready(function() { $("#drop_db_anchor").live('click', function(event) { @@ -1935,10 +1936,11 @@ $(document).ready(function() { * display_create_database.lib.php is used, ie main.php and server_databases.php * * @uses PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] */ $(document).ready(function() { - $('#create_database_form').live('submit', function(event) { + $('#create_database_form.ajax').live('submit', function(event) { event.preventDefault(); $form = $(this); @@ -1984,8 +1986,9 @@ $(document).ready(function() { /** * Attach Ajax event handler on the change password anchor + * @see $cfg['AjaxEnable'] */ - $('#change_password_anchor').live('click', function(event) { + $('#change_password_anchor.ajax').live('click', function(event) { event.preventDefault(); /** @@ -2011,8 +2014,9 @@ $(document).ready(function() { * Attach Ajax event handler for Change Password form submission * * @uses PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] */ - $("#change_password_form").find('input[name=change_pw]').live('click', function(event) { + $("#change_password_form.ajax").find('input[name=change_pw]').live('click', function(event) { event.preventDefault(); /** diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index e7bdad29e..4dcb2c907 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -19,7 +19,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) // Displays the form ?> -
+ onsubmit="return checkPassword(this)"> ' . "\n" diff --git a/libraries/display_create_database.lib.php b/libraries/display_create_database.lib.php index 17ebfae96..07db1f799 100644 --- a/libraries/display_create_database.lib.php +++ b/libraries/display_create_database.lib.php @@ -17,7 +17,7 @@ require_once './libraries/check_user_privileges.lib.php'; if ($is_create_db_priv) { // The user is allowed to create a db ?> - + > ' . __('Create new database') . ' ' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?>
diff --git a/main.php b/main.php index 62fbc04da..881803395 100644 --- a/main.php +++ b/main.php @@ -88,8 +88,13 @@ if ($server > 0 // Logout for advanced authentication if ($cfg['Server']['auth_type'] != 'config') { if ($cfg['ShowChgPassword']) { + if ($GLOBALS['cfg']['AjaxEnable']) { + $conditional_class = 'ajax'; + } else { + $conditional_class = null; + } PMA_printListItem(__('Change password'), 'li_change_password', - './user_password.php?' . $common_url_query, null, null, 'change_password_anchor'); + './user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class); } } // end if if (PMA_MYSQL_MAJOR_VERSION < 2009) { @@ -360,8 +365,10 @@ if ($cfg['SuhosinDisableWarning'] == false && @ini_get('suhosin.request.max_valu * @param string $mysql_help_page display a link to MySQL's manual * @param string $target special target for $url * @param string $a_id id for the anchor, used for jQuery to hook in functions + * @param string $class class for the li element + * @param string $a_class class for the anchor element */ -function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null, $target = null, $a_id = null, $class = null) +function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = null, $target = null, $a_id = null, $class = null, $a_class = null) { echo '
  • '; }