From 4c22eeb77e7ff4f49295e16c6e67d2940a9bacf1 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 3 Feb 2016 13:12:37 +0000 Subject: [PATCH] Mobile theme W.I.P.: - Implement hideOnMobile option for action system in order to be able to disable specific action in mobile --- phpgwapi/js/egw_action/egw_action.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpgwapi/js/egw_action/egw_action.js b/phpgwapi/js/egw_action/egw_action.js index 52baffc5e4..2c620db1dd 100644 --- a/phpgwapi/js/egw_action/egw_action.js +++ b/phpgwapi/js/egw_action/egw_action.js @@ -197,6 +197,7 @@ function egwAction(_parent, _id, _caption, _iconUrl, _onExecute, _allowOnMultipl { this.set_onExecute(_onExecute); } + this.hideOnMobile = false; } /** @@ -643,6 +644,11 @@ egwAction.prototype.set_hideOnDisabled = function(_value) this.hideOnDisabled = _value; }; +egwAction.prototype.set_hideOnMobile = function(_value) +{ + this.hideOnMobile = _value; +}; + egwAction.prototype.set_data = function(_value) { this.data = _value; @@ -2075,7 +2081,8 @@ egwActionObject.prototype._getLinks = function(_objs, _actionType) (actionLinks[k].actionObj.allowOnMultiple == "only" && actionLinks[k].cnt > 1) || (actionLinks[k].actionObj.allowOnMultiple == false && actionLinks[k].cnt == 1) ); - actionLinks[k].visible = actionLinks[k].visible && + if (!egwIsMobile()) actionLinks[k].actionObj.hideOnMobile = false; + actionLinks[k].visible = actionLinks[k].visible && !actionLinks[k].actionObj.hideOnMobile && (actionLinks[k].enabled || !actionLinks[k].actionObj.hideOnDisabled); }