diff --git a/ChangeLog b/ChangeLog index 3935ec69ca..66bc93bc81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ + Patch #3256122 [search] Show/hide db search results + Patch #3302354 Add gettext wrappers around a message + Remove deprecated function PMA_DBI_get_fields ++ rfe #2098927 Remember recent tables ++ rfe #3078542 Remember the last sort order for each table ++ AJAX for Create table in navigation panel 3.4.2.0 (not yet released) - bug #3301249 [interface] Iconic table operations does not remove inline edit label @@ -19,6 +22,8 @@ - [auth] Fixed error handling for signon auth method. - bug #3276001 [core] Avoid caching of index.php. - bug #3306958 [interface] Unnecessary Details slider +- bug #3308476 [interface] "Show all" not persistent after a sort +- bug #3308072 [auth] Version disclosure to anonymous visitors 3.4.1.0 (2011-05-20) - bug #3301108 [interface] Synchronize and already configured host diff --git a/db_datadict.php b/db_datadict.php index e9d18fdf1e..9941ef4440 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -135,7 +135,7 @@ while ($row = PMA_DBI_fetch_assoc($rowset)) { $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table)); } - // Check if we can use Relations (Mike Beck) + // Check if we can use Relations if (!empty($cfgRelation['relation'])) { // Find which tables are related with the current one and write it in // an array diff --git a/db_qbe.php b/db_qbe.php index a076798741..a5bd7a7e4e 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -686,7 +686,6 @@ if (!empty($qry_select)) { // 2. FROM // Create LEFT JOINS out of Relations -// Code originally by Mike Beck // If we can use Relations we could make some left joins. // First find out if relations are available in this database. diff --git a/js/functions.js b/js/functions.js index c9f6112dff..be5a8bbc40 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1309,6 +1309,53 @@ function PMA_showNoticeForEnum(selectElement) { } } +/** + * Generates a dialog box to pop up the create_table form + */ +function PMA_createTableDialog( div, url , target){ + /** + * @var button_options Object that stores the options passed to jQueryUI + * dialog + */ + var button_options = {}; + // in the following function we need to use $(this) + button_options[PMA_messages['strCancel']] = function() {$(this).parent().dialog('close').remove();} + + var button_options_error = {}; + button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();} + + var $msgbox = PMA_ajaxShowMessage(); + + $.get( target , url , function(data) { + //in the case of an error, show the error message returned. + if (data.success != undefined && data.success == false) { + div + .append(data.error) + .dialog({ + title: PMA_messages['strCreateTable'], + height: 230, + width: 900, + open: PMA_verifyTypeOfAllColumns, + buttons : button_options_error + })// end dialog options + //remove the redundant [Back] link in the error message. + .find('fieldset').remove(); + } else { + div + .append(data) + .dialog({ + title: PMA_messages['strCreateTable'], + height: 600, + width: 900, + open: PMA_verifyTypeOfAllColumns, + buttons : button_options + }); // end dialog options + } + PMA_ajaxRemoveMessage($msgbox); + }) // end $.get() + +} + /** * jQuery function that uses jQueryUI's dialogs to confirm with user. Does not * return a jQuery object yet and hence cannot be chained @@ -1403,7 +1450,7 @@ jQuery.fn.PMA_sort_table = function(text_selector) { */ $(document).ready(function() { - /** + /** * Attach event handler to the submit action of the create table minimal form * and retrieve the full table form and display it in a dialog * @@ -1412,50 +1459,15 @@ $(document).ready(function() { $("#create_table_form_minimal.ajax").live('submit', function(event) { event.preventDefault(); $form = $(this); - - /* @todo Validate this form! */ - - /** - * @var button_options Object that stores the options passed to jQueryUI - * dialog - */ - var button_options = {}; - // in the following function we need to use $(this) - button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();} - - var button_options_error = {}; - button_options_error[PMA_messages['strOK']] = function() {$(this).dialog('close').remove();} - - var $msgbox = PMA_ajaxShowMessage(); PMA_prepareForAjaxRequest($form); - $.get($form.attr('action'), $form.serialize(), function(data) { - //in the case of an error, show the error message returned. - if (data.success != undefined && data.success == false) { - $('
') - .append(data.error) - .dialog({ - title: PMA_messages['strCreateTable'], - height: 230, - width: 900, - open: PMA_verifyTypeOfAllColumns, - buttons : button_options_error - })// end dialog options - //remove the redundant [Back] link in the error message. - .find('fieldset').remove(); - } else { - $('
') - .append(data) - .dialog({ - title: PMA_messages['strCreateTable'], - height: 600, - width: 900, - open: PMA_verifyTypeOfAllColumns, - buttons : button_options - }); // end dialog options - } - PMA_ajaxRemoveMessage($msgbox); - }) // end $.get() + /*variables which stores the common attributes*/ + var url = $form.serialize(); + var action = $form.attr('action'); + var div = $('
'); + + /*Calling to the createTableDialog function*/ + PMA_createTableDialog(div, url, action); // empty table name and number of columns from the minimal form $form.find('input[name=table],input[name=num_fields]').val(''); diff --git a/js/navigation.js b/js/navigation.js index 52d13cfd4d..7f9a013119 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -202,4 +202,22 @@ $(document).ready(function(){ window.parent.refreshMain($('#LeftDefaultTabTable')[0].value); } }); -}); + + /* Create table */ + $('#newtable a.ajax').click(function(event){ + event.preventDefault(); + /*Getting the url */ + var url = $('#newtable a').attr("href"); + if (url.substring(0, 15) == "tbl_create.php?") { + url = url.substring(15); + } + url = url +"&num_fields=&ajax_request=true"; + /*Creating a div on the frame_content frame */ + var div = parent.frame_content.$('
'); + var target = "tbl_create.php"; + + /*Calling to the createTableDialog function*/ + PMA_createTableDialog(div , url , target); + });//end of create new table +});//end of document get ready + diff --git a/js/server_privileges.js b/js/server_privileges.js index 8b9c5e99c3..314663f2e4 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -241,11 +241,11 @@ $(document).ready(function() { $("#reload_privileges_anchor.ajax").live("click", function(event) { event.preventDefault(); - PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']); + var $msgbox = PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']); $.get($(this).attr("href"), {'ajax_request': true}, function(data) { if(data.success == true) { - PMA_ajaxShowMessage(data.message); + PMA_ajaxRemoveMessage($msgbox); } else { PMA_ajaxShowMessage(data.error); diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 84bfa80ad9..c04d5a2b65 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -169,6 +169,7 @@ function PMA_auth() /* HTML header; do not show here the PMA version to improve security */ $page_title = 'phpMyAdmin '; require './libraries/header_meta_style.inc.php'; + // if $page_title is set, this script uses it as the title: require './libraries/header_scripts.inc.php'; ?> + +