Fix inline commands

This commit is contained in:
Jannis Moßhammer 2013-10-23 15:09:47 +02:00
parent 4e9e5ca2dc
commit 275275f29e
1 changed files with 4 additions and 7 deletions

View File

@ -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);