mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-13 00:44:25 +02:00
Fix inline commands
This commit is contained in:
parent
4e9e5ca2dc
commit
275275f29e
@ -167,7 +167,10 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection
|
|||||||
*/
|
*/
|
||||||
this.registerTableLinks = function(domContext) {
|
this.registerTableLinks = function(domContext) {
|
||||||
domContext = domContext || contentNode;
|
domContext = domContext || contentNode;
|
||||||
|
$('tbody tr button[type=submit], tbody tr submit', domContext).click(function(ev) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
$('tbody tr', domContext).click(function(ev) {
|
$('tbody tr', domContext).click(function(ev) {
|
||||||
var targetEl = ev.target || ev.toElement || ev.relatedTarget,
|
var targetEl = ev.target || ev.toElement || ev.relatedTarget,
|
||||||
a = $(targetEl).closest('a');
|
a = $(targetEl).closest('a');
|
||||||
@ -177,17 +180,11 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection
|
|||||||
var nodeNames = [];
|
var nodeNames = [];
|
||||||
nodeNames.push($(targetEl).prop('nodeName').toLowerCase());
|
nodeNames.push($(targetEl).prop('nodeName').toLowerCase());
|
||||||
nodeNames.push($(targetEl).parent().prop('nodeName').toLowerCase());
|
nodeNames.push($(targetEl).parent().prop('nodeName').toLowerCase());
|
||||||
|
|
||||||
if (a.length) {
|
if (a.length) {
|
||||||
// test if the URL is on the current server, if not open it directly
|
// test if the URL is on the current server, if not open it directly
|
||||||
if (Container.isExternalLink(a.attr('href'))) {
|
if (Container.isExternalLink(a.attr('href'))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if ($.inArray('input', nodeNames) > -1 || $.inArray('button', nodeNames) > -1) {
|
|
||||||
var type = $(targetEl).attr('type') || $(targetEl).parent().attr('type');
|
|
||||||
if (type === 'submit') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var selected = new Selectable(this);
|
var selected = new Selectable(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user