OSDN Git Service

Improved the method of opening a dialog. master
authorTaku Amano <taku@toi-planning.net>
Thu, 22 Oct 2009 05:27:04 +0000 (14:27 +0900)
committerTaku Amano <taku@toi-planning.net>
Thu, 22 Oct 2009 05:27:04 +0000 (14:27 +0900)
tmpl/pm_import.tmpl
tmpl/pm_package_list.tmpl

index 6fed65b..792814a 100644 (file)
@@ -40,15 +40,10 @@ jQuery(function() {
                        return false;
                }
 
-               jQuery('<a />').
-                       attr(
-                               'href',
-                               ScriptURI + '?' + '__mode=pluginmanager&' +
-                               'op=ftp_prompt&blog_id=0&id=' + this.id
-                       ).
-                       insertAfter('#footer').
-                       mtDialog().
-                       trigger('click');
+               jQuery.fn.mtDialog.open(
+                       ScriptURI + '?' + '__mode=pluginmanager&' +
+                       'op=ftp_prompt&blog_id=0&id=' + this.id
+               );
        }).
        bind('process', function(ev, ftp_pass) {
                $(this.form).find('input[name="ftp_password"]').val(ftp_pass);
index 25a89e2..d303132 100644 (file)
@@ -94,15 +94,10 @@ jQuery(function() {
                        return false;
                }
 
-               jQuery('<a />').
-                       attr(
-                               'href',
-                               ScriptURI + '?' + '__mode=pluginmanager&' +
-                               'op=ftp_prompt&blog_id=0&id=' + this.id
-                       ).
-                       insertAfter('#footer').
-                       mtDialog().
-                       trigger('click');
+               jQuery.fn.mtDialog.open(
+                       ScriptURI + '?' + '__mode=pluginmanager&' +
+                       'op=ftp_prompt&blog_id=0&id=' + this.id
+               );
        }).
        bind('process', function(ev, ftp_pass) {
                var command = this.id;