diff --git a/js/makegrid.js b/js/makegrid.js index 70e9b9adb1..e7f2d32f5a 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -654,7 +654,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi g.isCellEditActive = false; g.currentEditCell = null; // destroy datepicker in edit area, if exist - $(g.cEdit).find('.hasDatepicker').datepicker('destroy'); + var $dp = $(g.cEdit).find('.hasDatepicker'); + if ($dp.length > 0) { + $dp.datepicker('destroy'); + // change the cursor in edit box back to normal + // (the cursor become a hand pointer when we add datepicker) + $(g.cEdit).find('.edit_box').css('cursor', 'inherit'); + } }, /** @@ -785,11 +791,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi g.lastXHR = $.post('sql.php', post_params, function(data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); - // save original_data - var value = $(data.dropdown).val(); - $td.data('original_data', value); - // update the text input field, in case where the "Relational display column" is checked - $(g.cEdit).find('.edit_box').val(value); + if ($(data.dropdown).is('select')) { + // save original_data + var value = $(data.dropdown).val(); + $td.data('original_data', value); + // update the text input field, in case where the "Relational display column" is checked + $(g.cEdit).find('.edit_box').val(value); + } $editArea.append(data.dropdown); $editArea.append('
';
+ $button .= '
';
}
}
@@ -386,15 +386,21 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
if (defined('PMA_MYSQL_INT_VERSION')) {
if (PMA_MYSQL_INT_VERSION >= 50500) {
$mysql = '5.5';
- /* l10n: Language to use for MySQL 5.5 documentation, please use only languages which do exist in official documentation. */
+ /* l10n: Language to use for MySQL 5.5 documentation, please
+ * use only languages which do exist in official documentation.
+ */
$lang = _pgettext('MySQL 5.5 documentation language', 'en');
} else if (PMA_MYSQL_INT_VERSION >= 50100) {
$mysql = '5.1';
- /* l10n: Language to use for MySQL 5.1 documentation, please use only languages which do exist in official documentation. */
+ /* l10n: Language to use for MySQL 5.1 documentation, please
+ * use only languages which do exist in official documentation.
+ */
$lang = _pgettext('MySQL 5.1 documentation language', 'en');
} else {
$mysql = '5.0';
- /* l10n: Language to use for MySQL 5.0 documentation, please use only languages which do exist in official documentation. */
+ /* l10n: Language to use for MySQL 5.0 documentation, please use
+ * only languages which do exist in official documentation.
+ */
$lang = _pgettext('MySQL 5.0 documentation language', 'en');
}
}
@@ -409,9 +415,11 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
if ($just_open) {
return $open_link;
} elseif ($big_icon) {
- return $open_link . '
';
+ return $open_link . '
';
} elseif ($GLOBALS['cfg']['ReplaceHelpImg']) {
- return $open_link . '
';
+ return $open_link . '
';
} else {
return '[' . $open_link . __('Documentation') . ']';
}
@@ -430,9 +438,12 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
function PMA_showDocu($anchor)
{
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
- return '
';
+ return ''
+ . '
';
} else {
- return '[' . __('Documentation') . ']';
+ return '['
+ . __('Documentation') . ']';
}
} // end of the 'PMA_showDocu()' function
@@ -450,7 +461,9 @@ function PMA_showPHPDocu($target)
$url = PMA_getPHPDocLink($target);
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
- return '
';
+ return ''
+ . '
';
} else {
return '[' . __('Documentation') . ']';
}
@@ -559,7 +572,8 @@ $is_modify_link = true, $back_url = '', $exit = true)
// ---
// modified to show the help on sql errors
$error_msg_output .= ' ' . __('SQL query') . ':' . "\n"; - if (strstr(strtolower($formatted_sql), 'select')) { // please show me help to the error on select + if (strstr(strtolower($formatted_sql), 'select')) { + // please show me help to the error on select $error_msg_output .= PMA_showMySQLDocu('SQL-Syntax', 'SELECT'); } if ($is_modify_link) { @@ -588,8 +602,12 @@ $is_modify_link = true, $back_url = '', $exit = true) .'
' . "\n"; } // end if - if (!empty($error_message)) { - $error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message); + if (! empty($error_message)) { + $error_message = preg_replace( + "@((\015\012)|(\015)|(\012)){3,}@", + "\n\n", + $error_message + ); } // modified to show the help on error-returns // (now error-messages-server) @@ -600,7 +618,8 @@ $is_modify_link = true, $back_url = '', $exit = true) . '' . "\n"; // The error message will be displayed within a CODE segment. - // To preserve original formatting, but allow wordwrapping, we do a couple of replacements + // To preserve original formatting, but allow wordwrapping, + // we do a couple of replacements // Replace all non-single blanks with their HTML-counterpart $error_message = str_replace(' ', ' ', $error_message); @@ -928,7 +947,8 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view echo "\n"; echo '' . "\n"; } // end if ... elseif @@ -947,7 +967,9 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view // In an Ajax request, $GLOBALS['cell_align_left'] may not be defined. Hence, // check for it's presence before using it - echo '