From 7843da6e088e3f09e55dc02dc24ac1876398de74 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 31 May 2018 09:19:39 -0600 Subject: [PATCH] Change allowOnMultiple check to use count of selected objects, not count of actionLinks Allows enabled check functions to call other actions's enabled functions. --- api/js/egw_action/egw_action.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/egw_action/egw_action.js b/api/js/egw_action/egw_action.js index f7447dede6..b19ee9f53e 100644 --- a/api/js/egw_action/egw_action.js +++ b/api/js/egw_action/egw_action.js @@ -2078,8 +2078,8 @@ egwActionObject.prototype._getLinks = function(_objs, _actionType) (actionLinks[k].cnt >= testedSelected.length) && ( (actionLinks[k].actionObj.allowOnMultiple === true) || - (actionLinks[k].actionObj.allowOnMultiple == "only" && actionLinks[k].cnt > 1) || - (actionLinks[k].actionObj.allowOnMultiple == false && actionLinks[k].cnt == 1) + (actionLinks[k].actionObj.allowOnMultiple == "only" && _objs.length > 1) || + (actionLinks[k].actionObj.allowOnMultiple == false && _objs.length === 1) ); if (!egwIsMobile()) actionLinks[k].actionObj.hideOnMobile = false; actionLinks[k].visible = actionLinks[k].visible && !actionLinks[k].actionObj.hideOnMobile &&