fix "restore default" button, should be visible only when field has custom value
added missing validations for setup script added two field descriptions added SkipLockedTables to user preferences
This commit is contained in:
10
js/config.js
10
js/config.js
@@ -437,8 +437,8 @@ function markField(field) {
|
||||
* @param {boolean} display
|
||||
*/
|
||||
function setRestoreDefaultBtn(field, display) {
|
||||
var el = $(field).closest('td').find('.restore-default');
|
||||
el.css('display', (el.css('display') ? '' : 'none'));
|
||||
var el = $(field).closest('td').find('.restore-default img');
|
||||
el[display ? 'show' : 'hide']();
|
||||
}
|
||||
|
||||
$(function() {
|
||||
@@ -596,10 +596,10 @@ $(function() {
|
||||
$('.restore-default, .set-value').each(function() {
|
||||
var link = $(this);
|
||||
// inline-block for IE so opacity inheritance works
|
||||
link.css('display', 'inline-block').css('opacity', 0.25);
|
||||
if (!link.hasClass('restore-default')) {
|
||||
link.css({display: 'inline-block', opacity: 0.25});
|
||||
if (link.hasClass('restore-default')) {
|
||||
// restore-default is handled by markField
|
||||
link.css('display', '');
|
||||
link.find('img').hide();
|
||||
}
|
||||
link.bind({
|
||||
mouseenter: function() {$(this).css('opacity', 1);},
|
||||
|
@@ -97,7 +97,7 @@ $cfg_db['_overrides']['Servers/1/extension'] = extension_loaded('mysqli')
|
||||
? 'mysqli' : 'mysql';
|
||||
|
||||
/**
|
||||
* Validator assignments (functions from libraries/config/validate.lib.php and 'validators'
|
||||
* Basic validator assignments (functions from libraries/config/validate.lib.php and 'validators'
|
||||
* object in js/config.js)
|
||||
* Use only full paths and form ids
|
||||
*/
|
||||
@@ -105,6 +105,7 @@ $cfg_db['_validators'] = array(
|
||||
'CharTextareaCols' => 'validate_positive_number',
|
||||
'CharTextareaRows' => 'validate_positive_number',
|
||||
'DefaultPropDisplay' => 'validate_DefaultPropDisplay',
|
||||
'ExecTimeLimit' => 'validate_non_negative_number',
|
||||
'Export/sql_max_query_size' => 'validate_positive_number',
|
||||
'ForeignKeyMaxLimit' => 'validate_positive_number',
|
||||
'Import/csv_enclosed' => 'validate_str01',
|
||||
@@ -119,8 +120,11 @@ $cfg_db['_validators'] = array(
|
||||
'LimitChars' => 'validate_positive_number',
|
||||
'LoginCookieValidity' => 'validate_positive_number',
|
||||
'LoginCookieStore' => 'validate_non_negative_number',
|
||||
'MaxDbList' => 'validate_positive_number',
|
||||
'MaxCharactersInDisplayedSQL' => 'validate_positive_number',
|
||||
'MaxRows' => 'validate_positive_number',
|
||||
'MaxTableList' => 'validate_positive_number',
|
||||
'MemoryLimit' => 'validate_non_negative_number',
|
||||
'QueryHistoryMax' => 'validate_positive_number',
|
||||
'QueryWindowWidth' => 'validate_positive_number',
|
||||
'QueryWindowHeight' => 'validate_positive_number',
|
||||
|
@@ -267,6 +267,7 @@ $strConfigLeftFrameLight_name = __('Use light version');
|
||||
$strConfigLeftFrameTableLevel_name = __('Maximum table tree depth');
|
||||
$strConfigLeftFrameTableSeparator_desc = __('String that separates tables into different tree levels');
|
||||
$strConfigLeftFrameTableSeparator_name = __('Table tree separator');
|
||||
$strConfigLeftLogoLink_desc = __('URL where logo in the navigation frame will point to');
|
||||
$strConfigLeftLogoLink_name = __('Logo link URL');
|
||||
$strConfigLeftLogoLinkWindow_desc = __('Open the linked page in the main window ([kbd]main[/kbd]) or in a new one ([kbd]new[/kbd])');
|
||||
$strConfigLeftLogoLinkWindow_name = __('Logo link target');
|
||||
@@ -449,6 +450,7 @@ $strConfigSuggestDBName_desc = __('Suggest a database name on the "Create D
|
||||
$strConfigSuggestDBName_name = __('Suggest new database name');
|
||||
$strConfigTextareaCols_desc = __('Textarea size (columns) in edit mode, this value will be emphasized for SQL query textareas (*2) and for query window (*1.25)');
|
||||
$strConfigTextareaCols_name = __('Textarea columns');
|
||||
$strConfigTextareaRows_desc = __('Textarea size (rows) in edit mode, this value will be emphasized for SQL query textareas (*2) and for query window (*1.25)');
|
||||
$strConfigTextareaRows_name = __('Textarea rows');
|
||||
$strConfigTitleDatabase_desc = __('Title of browser window when a database is selected');
|
||||
$strConfigTitleDatabase_name = __('Database');
|
||||
|
@@ -106,7 +106,6 @@ $forms['Features']['Other_core_settings'] = array(
|
||||
'ReplaceHelpImg',
|
||||
'MaxDbList',
|
||||
'MaxTableList',
|
||||
'MaxCharactersInDisplayedSQL',
|
||||
'OBGzip',
|
||||
'PersistentConnections',
|
||||
'ExecTimeLimit',
|
||||
|
@@ -17,7 +17,8 @@ $forms['Features']['General'] = array(
|
||||
'NaturalOrder',
|
||||
'InitialSlidersState',
|
||||
'ErrorIconic',
|
||||
'ReplaceHelpImg');
|
||||
'ReplaceHelpImg',
|
||||
'SkipLockedTables');
|
||||
$forms['Features']['Text_fields'] = array(
|
||||
'CharEditing',
|
||||
'CharTextareaCols',
|
||||
|
@@ -69,7 +69,7 @@ $msg->display();
|
||||
// warn about using session storage for settings
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (!$cfgRelation['userconfigwork']) {
|
||||
$msg = __('Your preferences will be saved only for current session. Storing them permanently requires %spmadb%s.');
|
||||
$msg = __('Your preferences will be saved for current session only. Storing them permanently requires %spmadb%s.');
|
||||
$msg = PMA_sanitize(sprintf($msg, '[a@http://wiki.phpmyadmin.net/pma/pmadb@_blank]', '[/a]'));
|
||||
PMA_Message::notice($msg)->display();
|
||||
}
|
||||
|
Reference in New Issue
Block a user