forked from extern/egroupware
Add a isDefault flag to allow changing default execution function
This commit is contained in:
parent
45871d6212
commit
26eaf7e1fe
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user