Add a isDefault flag to allow changing default execution function

This commit is contained in:
Nathan Gray 2014-03-11 16:25:18 +00:00
parent 45871d6212
commit 26eaf7e1fe
2 changed files with 4 additions and 1 deletions

View File

@ -534,6 +534,7 @@ egwAction.prototype.setDefaultExecute = function(_value)
// Check whether the onExecute handler of this action should be set
if (this.type != "actionManager" && !this.onExecute.hasHandler())
{
this.onExecute.isDefault = true;
this.onExecute.setValue(_value);
}

View File

@ -343,12 +343,14 @@ function egwFnct(_context, _default, _acceptedTypes)
this.acceptedTypes = _acceptedTypes;
this.fnct = null;
this.value = null;
// Flag for if this action is using a default handler
this.isDefault = false;
this.setValue(_default);
}
egwFnct.prototype.hasHandler = function()
{
return this.fnct !== null;
return this.fnct !== null && !this.isDefault;
}
/**