Detail view UI: Fix embedded list view actions

Fixes case when detail view has an embedded list view with action, that
the action is handled by detail view instead of list view, causing
unexpected behavior
This commit is contained in:
Brian Federle 2014-02-05 11:47:04 -08:00
parent a873a0efdd
commit c2c7d33d8e

View File

@ -1486,7 +1486,8 @@
}
// Detail action
if ($target.closest('div.detail-view [detail-action], div.detail-view .action.text').size()) {
if ($target.closest('div.detail-view [detail-action], div.detail-view .action.text').size() &&
!$target.closest('.list-view').size()) {
var $action = $target.closest('.action').find('[detail-action]');
var actionName = $action.attr('detail-action');
var actionCallback = $action.data('detail-view-action-callback');