Merge branch 'master' of github.com:phpmyadmin/phpmyadmin
This commit is contained in:
commit
856b984aec
@ -9,6 +9,7 @@ phpMyAdmin - ChangeLog
|
||||
+ rfe #1609 Additional page locking
|
||||
+ rfe #1620 Support MySQL 5.7 syntax for password change
|
||||
+ rfe #1626 Display/edit index name
|
||||
+ rfe #1625 Toggle autocomplete of table and column names
|
||||
|
||||
4.4.0.0 (not yet released)
|
||||
+ rfe #1553 InnoDB presently supports one FULLTEXT index creation at a time
|
||||
|
||||
@ -8,17 +8,19 @@
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
$db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db'];
|
||||
$sql_autocomplete = array();
|
||||
|
||||
if ($db) {
|
||||
$tableNames = $GLOBALS['dbi']->getTables($db);
|
||||
foreach ($tableNames as $tableName) {
|
||||
$sql_autocomplete[$tableName] = $GLOBALS['dbi']->getColumns(
|
||||
$db, $tableName
|
||||
);
|
||||
if ($GLOBALS['cfg']['EnableAutocompleteForTablesAndColumns']) {
|
||||
$db = isset($_POST['db']) ? $_POST['db'] : $GLOBALS['db'];
|
||||
$sql_autocomplete = array();
|
||||
if ($db) {
|
||||
$tableNames = $GLOBALS['dbi']->getTables($db);
|
||||
foreach ($tableNames as $tableName) {
|
||||
$sql_autocomplete[$tableName] = $GLOBALS['dbi']->getColumns(
|
||||
$db, $tableName
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql_autocomplete = true;
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->addJSON("tables", json_encode($sql_autocomplete));
|
||||
|
||||
@ -2435,6 +2435,14 @@ Text fields
|
||||
Defines if the whole textarea of the query box will be selected on
|
||||
click.
|
||||
|
||||
.. config:option:: $cfg['EnableAutocompleteForTablesAndColumns']
|
||||
|
||||
:type: boolean
|
||||
:default: true
|
||||
|
||||
Whether to enable autocomplete for table and column names in any
|
||||
SQL query box.
|
||||
|
||||
|
||||
SQL query box settings
|
||||
----------------------
|
||||
|
||||
@ -4300,6 +4300,35 @@ $(document).on("change", "input.checkall_box", function () {
|
||||
.parents("tr").toggleClass("marked", is_checked);
|
||||
});
|
||||
|
||||
/**
|
||||
* Watches checkboxes in a sub form to set the sub checkall box accordingly
|
||||
*/
|
||||
var sub_checkboxes_changed = function () {
|
||||
var $form = $(this).parent().parent();
|
||||
// total number of checkboxes in current sub form
|
||||
var total_boxes = $form.find(checkboxes_sel).length;
|
||||
// number of checkboxes checked in current sub form
|
||||
var checked_boxes = $form.find(checkboxes_sel + ":checked").length;
|
||||
var $checkall = $form.find("input.sub_checkall_box");
|
||||
if (total_boxes == checked_boxes) {
|
||||
$checkall.prop({checked: true, indeterminate: false});
|
||||
}
|
||||
else if (checked_boxes > 0) {
|
||||
$checkall.prop({checked: true, indeterminate: true});
|
||||
}
|
||||
else {
|
||||
$checkall.prop({checked: false, indeterminate: false});
|
||||
}
|
||||
};
|
||||
$(document).on("change", checkboxes_sel + ", input.checkall_box:checkbox:enabled", sub_checkboxes_changed);
|
||||
|
||||
$(document).on("change", "input.sub_checkall_box", function () {
|
||||
var is_checked = $(this).is(":checked");
|
||||
var $form = $(this).parent().parent();
|
||||
$form.find(checkboxes_sel).prop("checked", is_checked)
|
||||
.parents("tr").toggleClass("marked", is_checked);
|
||||
});
|
||||
|
||||
/**
|
||||
* Toggles row colors of a set of 'tr' elements starting from a given element
|
||||
*
|
||||
|
||||
@ -1006,7 +1006,7 @@ function PMA_getHTMLforCentralColumnsEditTableRow($row, $odd_row, $row_num)
|
||||
'<td class="nowrap" name="col_isNull">'
|
||||
. PMA_getHtmlForColumnNull($row_num, 6, 0, array('Null'=>$row['col_isNull']))
|
||||
. '</td>';
|
||||
$extra_val = $row['col_extra'];
|
||||
|
||||
$tableHtml .=
|
||||
'<td class="nowrap" name="col_extra">'
|
||||
. PMA_getHtmlForColumnExtra(
|
||||
|
||||
@ -2875,6 +2875,13 @@ $cfg['SQLQuery']['ShowAsPHP'] = true;
|
||||
*/
|
||||
$cfg['SQLQuery']['Refresh'] = true;
|
||||
|
||||
/**
|
||||
* Enables autoComplete for table & column names in SQL queries
|
||||
*
|
||||
* default = 'true'
|
||||
*/
|
||||
$cfg['EnableAutocompleteForTablesAndColumns'] = true;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Web server upload/save/import directories
|
||||
|
||||
@ -91,6 +91,8 @@ $strConfigDefaultTabServer_desc = __('Tab that is displayed when entering a serv
|
||||
$strConfigDefaultTabServer_name = __('Default server tab');
|
||||
$strConfigDefaultTabTable_desc = __('Tab that is displayed when entering a table.');
|
||||
$strConfigDefaultTabTable_name = __('Default table tab');
|
||||
$strConfigEnableAutocompleteForTablesAndColumns_desc = __('Autocomplete of the table and column names in the SQL queries.');
|
||||
$strConfigEnableAutocompleteForTablesAndColumns_name = __('Enable autocomplete for table and column names');
|
||||
$strConfigHideStructureActions_desc
|
||||
= __('Whether the table structure actions should be hidden.');
|
||||
$strConfigHideStructureActions_name = __('Hide table structure actions');
|
||||
|
||||
@ -159,7 +159,8 @@ $forms['Sql_queries']['Sql_queries'] = array(
|
||||
'IgnoreMultiSubmitErrors',
|
||||
'MaxCharactersInDisplayedSQL',
|
||||
'RetainQueryBox',
|
||||
'CodemirrorEnable');
|
||||
'CodemirrorEnable',
|
||||
'EnableAutocompleteForTablesAndColumns');
|
||||
$forms['Sql_queries']['Sql_box'] = array('SQLQuery' => array(
|
||||
'Edit',
|
||||
'Explain',
|
||||
|
||||
@ -68,7 +68,8 @@ $forms['Sql_queries']['Sql_queries'] = array(
|
||||
'IgnoreMultiSubmitErrors',
|
||||
'MaxCharactersInDisplayedSQL',
|
||||
'RetainQueryBox',
|
||||
'CodemirrorEnable');
|
||||
'CodemirrorEnable',
|
||||
'EnableAutocompleteForTablesAndColumns');
|
||||
$forms['Sql_queries']['Sql_box'] = array(
|
||||
'SQLQuery/Edit',
|
||||
'SQLQuery/Explain',
|
||||
|
||||
@ -1403,7 +1403,13 @@ function PMA_getHtmlForGlobalPrivTableWithCheckboxes(
|
||||
$html_output = '';
|
||||
foreach ($privTable as $i => $table) {
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
. '<legend>' . $privTable_names[$i] . '</legend>' . "\n";
|
||||
. '<legend>' . "\n"
|
||||
. '<input type="checkbox" class="sub_checkall_box"'
|
||||
. ' id="checkall_' . $privTable_names[$i] . '_priv"'
|
||||
. ' title="' . __('Check All') . '"/>'
|
||||
. '<label for="checkall_' . $privTable_names[$i] . '_priv">'
|
||||
. $privTable_names[$i] . '</label>' . "\n"
|
||||
. '</legend>' . "\n";
|
||||
foreach ($table as $priv) {
|
||||
$html_output .= '<div class="item">' . "\n"
|
||||
. '<input type="checkbox" class="checkall"'
|
||||
|
||||
1369
po/be@latin.po
1369
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1389
po/en_GB.po
1389
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1344
po/phpmyadmin.pot
1344
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
1481
po/pt_BR.po
1481
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1353
po/sr@latin.po
1353
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1373
po/uz@latin.po
1373
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
1342
po/zh_CN.po
1342
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1337
po/zh_TW.po
1337
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user