From 6db79a72d57fb009f86d65d7326a1ec2dda9822b Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 29 Jul 2015 15:10:32 +0200 Subject: [PATCH] Display the rows in the auth backend configuration as active without any delay refs #8623 --- application/views/scripts/form/reorder-authbackend.phtml | 3 ++- public/js/icinga/behavior/actiontable.js | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/application/views/scripts/form/reorder-authbackend.phtml b/application/views/scripts/form/reorder-authbackend.phtml index be73f17872..2e6619551e 100644 --- a/application/views/scripts/form/reorder-authbackend.phtml +++ b/application/views/scripts/form/reorder-authbackend.phtml @@ -16,7 +16,8 @@ array('backend' => $backendNames[$i]), array( 'icon' => 'edit', - 'title' => sprintf($this->translate('Edit user backend %s'), $backendNames[$i]) + 'class' => 'rowaction', + 'title' => sprintf($this->translate('rEdit user backend %s'), $backendNames[$i]) ) ); ?> diff --git a/public/js/icinga/behavior/actiontable.js b/public/js/icinga/behavior/actiontable.js index 3f1cf1f9e4..51a91e1d82 100644 --- a/public/js/icinga/behavior/actiontable.js +++ b/public/js/icinga/behavior/actiontable.js @@ -313,13 +313,16 @@ */ ActionTable.prototype.onRowClicked = function (event) { var self = event.data.self; - var $tr = $(event.target).closest('tr'); + var $target = $(event.target); + var $tr = $target.closest('tr'); var table = new Selection($tr.closest('table.action')[0], self.icinga); - // allow form actions in table rows to pass through - if ($(event.target).closest('form').length) { + // some rows may contain form actions that trigger a different action, pass those through + if (!$target.hasClass('rowaction') && $target.closest('form').length && + ($target.closest('a').length || $target.closest('button').length)) { return; } + event.stopPropagation(); event.preventDefault();