From 2ec0de3a9f8d77c750f02c27ba8d83b407a87ea5 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Mon, 4 Jul 2011 12:51:17 +0100 Subject: [PATCH 1/3] Fix for bug #3350790 - JS error in Table->Structure->Index->Edit --- ChangeLog | 1 + js/indexes.js | 12 ++++++------ tbl_indexes.php | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 459bd1f05b..377449c460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog - bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option - bug #3340151 [export] Working SQL query exports error page - bug #3353649 [interface] "Create an index on X columns" form not validated +- bug #3350790 [interface] JS error in Table->Structure->Index->Edit 3.4.3.1 (2011-07-02) - [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5 diff --git a/js/indexes.js b/js/indexes.js index a15b249150..c7bed94bed 100644 --- a/js/indexes.js +++ b/js/indexes.js @@ -17,24 +17,24 @@ function checkIndexName() } // Gets the elements pointers - var the_idx_name = document.forms['index_frm'].elements['index']; - var the_idx_type = document.forms['index_frm'].elements['index_type']; + var the_idx_name = document.forms['index_frm'].elements['index[Key_name]']; + var the_idx_type = document.forms['index_frm'].elements['index[Index_type]']; // Index is a primary key if (the_idx_type.options[0].value == 'PRIMARY' && the_idx_type.options[0].selected) { - document.forms['index_frm'].elements['index'].value = 'PRIMARY'; + document.forms['index_frm'].elements['index[Key_name]'].value = 'PRIMARY'; if (typeof(the_idx_name.disabled) != 'undefined') { - document.forms['index_frm'].elements['index'].disabled = true; + document.forms['index_frm'].elements['index[Key_name]'].disabled = true; } } // Other cases else { if (the_idx_name.value == 'PRIMARY') { - document.forms['index_frm'].elements['index'].value = ''; + document.forms['index_frm'].elements['index[Key_name]'].value = ''; } if (typeof(the_idx_name.disabled) != 'undefined') { - document.forms['index_frm'].elements['index'].disabled = false; + document.forms['index_frm'].elements['index[Key_name]'].disabled = false; } } diff --git a/tbl_indexes.php b/tbl_indexes.php index 46e5e1ce78..e2ef2880e8 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -133,8 +133,8 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) { ?>
+ onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') { + this.elements['index[Key_name]'].disabled = false}"> $db, From 39cb4d4798f495db25bf65dda95fc8c4e9893367 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Mon, 4 Jul 2011 19:04:04 +0100 Subject: [PATCH 2/3] Fix for bug #3353811 - Info message has "error" class --- ChangeLog | 1 + tbl_indexes.php | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 377449c460..00f3ba4937 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - bug #3340151 [export] Working SQL query exports error page - bug #3353649 [interface] "Create an index on X columns" form not validated - bug #3350790 [interface] JS error in Table->Structure->Index->Edit +- bug #3353811 [interface] Info message has "error" class 3.4.3.1 (2011-07-02) - [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5 diff --git a/tbl_indexes.php b/tbl_indexes.php index e2ef2880e8..54923a0f85 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -161,7 +161,9 @@ if (isset($_REQUEST['create_index'])) { } ?> - +must be the name of and only of a primary key!)'))->display(); +?>
- -
-must be the name of and only of a primary key!)'))->display(); -?> +

From 70c70db1392e703346434e65d59110a6ba321367 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Tue, 5 Jul 2011 13:00:21 +0100 Subject: [PATCH 3/3] Fix for bug #3353856 - AJAX dialogs use wrong font-size --- ChangeLog | 1 + js/db_routines.js | 4 ++-- js/functions.js | 2 +- libraries/header_meta_style.inc.php | 7 +++++++ themes/original/jquery/jquery-ui-1.8.override.css | 7 +++++++ themes/pmahomme/jquery/jquery-ui-1.8.override.css | 7 +++++++ 6 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 themes/original/jquery/jquery-ui-1.8.override.css create mode 100644 themes/pmahomme/jquery/jquery-ui-1.8.override.css diff --git a/ChangeLog b/ChangeLog index ff4f0ae795..4ae25e9a61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,7 @@ phpMyAdmin - ChangeLog + Display direction (horizontal/vertical) no longer displayed by default + Shift/click support in database Structure + Show/hide column in table Browse +- bug #3353856 [AJAX] AJAX dialogs use wrong font-size 3.4.4.0 (not yet released) - bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes diff --git a/js/db_routines.js b/js/db_routines.js index 95254ca064..ceb09626dd 100644 --- a/js/db_routines.js +++ b/js/db_routines.js @@ -308,7 +308,7 @@ $(document).ready(function() { /** * Display the dialog to the user */ - $ajaxDialog = $('
'+data.message+'
').dialog({ + $ajaxDialog = $('
'+data.message+'
').dialog({ width: 700, // TODO: make a better decision about the size height: 550, // of the dialog based on the size of the viewport buttons: button_options, @@ -529,7 +529,7 @@ $(document).ready(function() { /** * Display the dialog to the user */ - $ajaxDialog = $('
'+data.message+'
').dialog({ + $ajaxDialog = $('
'+data.message+'
').dialog({ width: 650, // TODO: make a better decision about the size // of the dialog based on the size of the viewport buttons: button_options, diff --git a/js/functions.js b/js/functions.js index e25ec982ea..9cdb44e751 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2445,7 +2445,7 @@ $(document).ready(function() { /** * Display the dialog to the user */ - var $ajaxDialog = $('
'+data.message+'
').dialog({ + var $ajaxDialog = $('
'+data.message+'
').dialog({ width: 500, buttons: button_options, title: data.title diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php index 5e5c533da4..e78b653081 100644 --- a/libraries/header_meta_style.inc.php +++ b/libraries/header_meta_style.inc.php @@ -48,4 +48,11 @@ if ($GLOBALS['text_dir'] == 'ltr') { + + + diff --git a/themes/original/jquery/jquery-ui-1.8.override.css b/themes/original/jquery/jquery-ui-1.8.override.css new file mode 100644 index 0000000000..4aee6fbb1e --- /dev/null +++ b/themes/original/jquery/jquery-ui-1.8.override.css @@ -0,0 +1,7 @@ +/** + * Use this file to override styles set by jquery-ui-1.8.custom.css + */ + +/* Component containers +----------------------------------*/ +.ui-widget { font-size: 1em; } diff --git a/themes/pmahomme/jquery/jquery-ui-1.8.override.css b/themes/pmahomme/jquery/jquery-ui-1.8.override.css new file mode 100644 index 0000000000..4aee6fbb1e --- /dev/null +++ b/themes/pmahomme/jquery/jquery-ui-1.8.override.css @@ -0,0 +1,7 @@ +/** + * Use this file to override styles set by jquery-ui-1.8.custom.css + */ + +/* Component containers +----------------------------------*/ +.ui-widget { font-size: 1em; }