Send <input type='image'> by AJAX

This commit is contained in:
Jakub Vrana 2011-01-24 15:35:06 +01:00
parent d6611f40cb
commit 12443f2f4c

View 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;
}