Ctrl+click on button opens form to blank window
This commit is contained in:
parent
dd85aa5d6a
commit
3ed7f453bc
|
@ -488,7 +488,7 @@ function selectDblClick(td, event, text) {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function bodyClick(event, db, ns) {
|
function bodyClick(event, db, ns) {
|
||||||
if (event.button || event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) {
|
if (event.button || event.shiftKey || event.altKey || event.metaKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.getPreventDefault ? event.getPreventDefault() : event.returnValue === false || event.defaultPrevented) {
|
if (event.getPreventDefault ? event.getPreventDefault() : event.returnValue === false || event.defaultPrevented) {
|
||||||
|
@ -498,14 +498,18 @@ function bodyClick(event, db, ns) {
|
||||||
if (/^a$/i.test(el.parentNode.tagName)) {
|
if (/^a$/i.test(el.parentNode.tagName)) {
|
||||||
el = el.parentNode;
|
el = el.parentNode;
|
||||||
}
|
}
|
||||||
if (/^a$/i.test(el.tagName) && !/:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.test(el.href)) {
|
if (/^a$/i.test(el.tagName) && !/:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.test(el.href) && !event.ctrlKey) {
|
||||||
var match = /&db=([^&]*)/.exec(el.href);
|
var match = /&db=([^&]*)/.exec(el.href);
|
||||||
var match2 = /&ns=([^&]*)/.exec(el.href);
|
var match2 = /&ns=([^&]*)/.exec(el.href);
|
||||||
return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxSend(el.href));
|
return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxSend(el.href));
|
||||||
}
|
}
|
||||||
if (/^input$/i.test(el.tagName) && /image|submit/.test(el.type)) {
|
if (/^input$/i.test(el.tagName) && /image|submit/.test(el.type)) {
|
||||||
|
if (event.ctrlKey) {
|
||||||
|
el.form.target = '_blank';
|
||||||
|
} else {
|
||||||
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''), el.type == 'image');
|
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''), el.type == 'image');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Adminer 3.3.4-dev:
|
Adminer 3.3.4-dev:
|
||||||
Foreign keys default actions (bug #3397606)
|
Foreign keys default actions (bug #3397606)
|
||||||
Fix minor parser bug in SQL command with webserver file
|
Fix minor parser bug in SQL command with webserver file
|
||||||
|
Ctrl+click on button opens form to blank window
|
||||||
PostgreSQL: fix alter foreign key
|
PostgreSQL: fix alter foreign key
|
||||||
SET DEFAULT foreign key action
|
SET DEFAULT foreign key action
|
||||||
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
||||||
|
|
Loading…
Reference in a new issue