From 275275f29e0002a95f14e0723f76d058440b0d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Mo=C3=9Fhammer?= Date: Wed, 23 Oct 2013 15:09:47 +0200 Subject: [PATCH] Fix inline commands --- public/js/icinga/components/mainDetailGrid.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/public/js/icinga/components/mainDetailGrid.js b/public/js/icinga/components/mainDetailGrid.js index 6fb3d523d..6e3d1fb04 100644 --- a/public/js/icinga/components/mainDetailGrid.js +++ b/public/js/icinga/components/mainDetailGrid.js @@ -167,7 +167,10 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection */ this.registerTableLinks = function(domContext) { 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) { var targetEl = ev.target || ev.toElement || ev.relatedTarget, a = $(targetEl).closest('a'); @@ -177,17 +180,11 @@ function(Container, $, logger, URI, tpl, urlMgr, Selectable, TableMultiSelection var nodeNames = []; nodeNames.push($(targetEl).prop('nodeName').toLowerCase()); nodeNames.push($(targetEl).parent().prop('nodeName').toLowerCase()); - if (a.length) { // test if the URL is on the current server, if not open it directly if (Container.isExternalLink(a.attr('href'))) { 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);