diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js index 6ff36c444bb..8824adc2249 100644 --- a/ui/scripts/ui/widgets/detailView.js +++ b/ui/scripts/ui/widgets/detailView.js @@ -835,9 +835,11 @@ }); $.each(actions, function(key, value) { - if ($.inArray(key, allowedActions) == -1 || + if ((!value.preFilter && $.inArray(key, allowedActions) == -1) || + (value.preFilter && !value.preFilter({ context: options.context })) || (options.ignoreAddAction && key == 'add') || (key == 'edit' && options.compact)) { + return true; }