]> git.joonet.de Git - adminer.git/commitdiff
Send <input type='image'> by AJAX
authorJakub Vrana <jakub@vrana.cz>
Mon, 24 Jan 2011 14:35:06 +0000 (15:35 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 24 Jan 2011 14:35:06 +0000 (15:35 +0100)
adminer/static/functions.js

index 857a07cba68a47ba93729291f16b43ce968f72ab..d766628be0d1d5d6cdfa18c61157cbc4c6089912 100644 (file)
@@ -396,8 +396,8 @@ function bodyClick(event, db, ns) {
                var match2 = /&ns=([^&]*)/.exec(el.href);
                return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxMain(el.href, '', event));
        }
-       if (/^input$/i.test(el.tagName) && /submit|image/.test(el.type) && el.name != 'logout' && !/&(database|scheme|create|view|sql|user|dump)=/.test(location.href)) {
-               return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + '=1' : ''));
+       if (/^input$/i.test(el.tagName) && (el.type == 'image' || (el.type == 'submit' && el.name != 'logout' && !/&(database|scheme|create|view|sql|user|dump)=/.test(location.href)))) {
+               return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''));
        }
        return true;
 }