From ba80841c5e77d20b24b38902941aec00c21bf533 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 19 Aug 2013 17:41:16 +0000 Subject: [PATCH] Add some comments and a warning if action string can't be parsed to a function --- phpgwapi/js/egw_action/egw_action_common.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpgwapi/js/egw_action/egw_action_common.js b/phpgwapi/js/egw_action/egw_action_common.js index aff2cbd36e..f3bd06f8cf 100644 --- a/phpgwapi/js/egw_action/egw_action_common.js +++ b/phpgwapi/js/egw_action/egw_action_common.js @@ -359,10 +359,13 @@ egwFnct.prototype.setValue = function(_value) this.value = null; this.fnct = null; + // Actual function if (typeof _value == "function") { this.fnct = _value; } + + // Global function (on window) else if (typeof _value == "string" && _value.substr(0,11) == "javaScript:" && typeof window[_value.substr(11)] == "function") @@ -374,6 +377,8 @@ egwFnct.prototype.setValue = function(_value) { this.value = _value; } + + // egw application specific function else if (typeof _value == "string" && _value.substr(0,15) == "javaScript:app." && window.app) { @@ -385,6 +390,12 @@ egwFnct.prototype.setValue = function(_value) this.context = window.app[parts[1]]; } } + + // Something, but could not figure it out + else if (_value) + { + egw.debug("warn", "Unable to parse Exec function %o for action '%s'",_value, this.context.id); + } } /**