[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_8-24688-g716b48e

Rouslan Placella roccivic at users.sourceforge.net
Mon Dec 12 17:19:56 CET 2011


The branch, master has been updated
       via  716b48ed78ab624f304272f3d8d4434b5336dfe0 (commit)
       via  5e7cfba8d871af2c44ffcb03adb7e4c9e8305ef5 (commit)
      from  cb8eb5cc30e0f7e59ebcd2e409714fb4867835c4 (commit)


- Log -----------------------------------------------------------------
commit 716b48ed78ab624f304272f3d8d4434b5336dfe0
Author: Rouslan Placella <rouslan at placella.com>
Date:   Mon Dec 12 16:13:40 2011 +0000

    Use a callback for destroying dialogs

commit 5e7cfba8d871af2c44ffcb03adb7e4c9e8305ef5
Author: Rouslan Placella <rouslan at placella.com>
Date:   Mon Dec 12 16:09:37 2011 +0000

    Use PMA_convertFootnotesToTooltips() in ajax "add user" functionality

-----------------------------------------------------------------------

Summary of changes:
 js/server_privileges.js |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/js/server_privileges.js b/js/server_privileges.js
index c6636f3..6b9e622 100644
--- a/js/server_privileges.js
+++ b/js/server_privileges.js
@@ -185,7 +185,7 @@ $(document).ready(function() {
             //We also need to post the value of the submit button in order to get this to work correctly
             $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) {
                 if (data.success == true) {
-                    $("#add_user_dialog").dialog("close").remove();
+                    $("#add_user_dialog").dialog("close");
                     PMA_ajaxShowMessage(data.message);
                     $("#floating_menubar")
                      .next('div')
@@ -243,10 +243,10 @@ $(document).ready(function() {
                 }
             })
         };
-        button_options[PMA_messages['strCancel']] = function() { $(this).dialog("close").remove(); }
+        button_options[PMA_messages['strCancel']] = function() { $(this).dialog("close"); };
 
         $.get($(this).attr("href"), {'ajax_request':true}, function(data) {
-            $('<div id="add_user_dialog"></div>')
+            var $div = $('<div id="add_user_dialog"></div>')
             .prepend(data)
             .find("#fieldset_add_user_footer").hide() //showing the "Go" and "Create User" buttons together will confuse the user
             .end()
@@ -260,9 +260,13 @@ $(document).ready(function() {
                 // also it's interesting to be able to scroll this window
                 height: 600,
                 modal: true,
-                buttons: button_options
+                buttons: button_options,
+                close: function () {
+                    $(this).remove();
+                }
             }); //dialog options end
             displayPasswordGenerateButton();
+            PMA_convertFootnotesToTooltips($div);
             PMA_ajaxRemoveMessage($msgbox);
         }); // end $.get()
 
@@ -362,7 +366,7 @@ $(document).ready(function() {
          * @var button_options  Object containing options for jQueryUI dialog buttons
          */
         var button_options = {};
-        button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close").remove();}
+        button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close");};
 
         var token = $(this).parents('form').find('input[name="token"]').val();
         $.get($(this).attr('href'), {'ajax_request':true, 'edit_user_dialog': true, 'token': token}, function(data) {
@@ -371,7 +375,10 @@ $(document).ready(function() {
             .dialog({
                 width: 900,
                 height: 600,
-                buttons: button_options
+                buttons: button_options,
+                close: function () {
+                    $(this).remove();
+                }
             }); //dialog options end
             displayPasswordGenerateButton();
             PMA_ajaxRemoveMessage($msgbox);
@@ -411,7 +418,7 @@ $(document).ready(function() {
                 PMA_ajaxShowMessage(data.message);
 
                 //Close the jQueryUI dialog
-                $("#edit_user_dialog").dialog("close").remove();
+                $("#edit_user_dialog").dialog("close");
 
                 if(data.sql_query) {
                     $("#floating_menubar")


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list