Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

This commit is contained in:
Madhura Jayaratne
2011-02-03 00:57:10 +05:30
5 changed files with 22 additions and 7 deletions

View File

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

View File

@@ -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();
/**

View File

@@ -19,7 +19,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
// Displays the form
?>
<form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" onsubmit="return checkPassword(this)">
<form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?> onsubmit="return checkPassword(this)">
<?php echo PMA_generate_common_hidden_inputs();
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
echo '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"

View File

@@ -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
?>
<form method="post" action="db_create.php" id="create_database_form" ><strong>
<form method="post" action="db_create.php" id="create_database_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?>><strong>
<?php echo '<label for="text_create_db">' . __('Create new database') . '</label>&nbsp;' . PMA_showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />

View File

@@ -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 '<li id="' . $id . '"';
if (null !== $class) {
@@ -376,6 +383,9 @@ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = nu
if (null != $a_id) {
echo ' id="' . $a_id .'"';
}
if (null != $a_class) {
echo ' class="' . $a_class .'"';
}
echo '>';
}