mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Add some comments and a warning if action string can't be parsed to a function
This commit is contained in:
parent
5755457b04
commit
ba80841c5e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user