mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-02 20:19:27 +01:00
Allow popup menu checkboxes to be toggled base on selected entry data
This commit is contained in:
parent
7a2c5a81f0
commit
2821c9bf43
@ -61,6 +61,15 @@ function egwPopupAction(_id, _handler, _caption, _icon, _onExecute, _allowOnMult
|
|||||||
action.checked = _value;
|
action.checked = _value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Allow checkbox to be set from context using the given function
|
||||||
|
action.set_isChecked = function(_value) {
|
||||||
|
action.isChecked = new egwFnct(this, null, []);
|
||||||
|
if(_value !== null)
|
||||||
|
{
|
||||||
|
action.isChecked.setValue(_value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// If radioGroup is >0 and the element is a checkbox, radioGroup specifies
|
// If radioGroup is >0 and the element is a checkbox, radioGroup specifies
|
||||||
// the group of radio buttons this one belongs to
|
// the group of radio buttons this one belongs to
|
||||||
action.set_radioGroup = function(_value) {
|
action.set_radioGroup = function(_value) {
|
||||||
@ -502,6 +511,10 @@ function egwPopupActionImplementation()
|
|||||||
item.set_hint(link.actionObj.hint);
|
item.set_hint(link.actionObj.hint);
|
||||||
item.set_checkbox(link.actionObj.checkbox);
|
item.set_checkbox(link.actionObj.checkbox);
|
||||||
item.set_checked(link.actionObj.checked);
|
item.set_checked(link.actionObj.checked);
|
||||||
|
if(link.actionObj.checkbox && link.actionObj.isChecked)
|
||||||
|
{
|
||||||
|
item.set_checked(link.actionObj.isChecked.exec(link.actionObj, _selected));
|
||||||
|
}
|
||||||
item.set_groupIndex(link.actionObj.radioGroup);
|
item.set_groupIndex(link.actionObj.radioGroup);
|
||||||
|
|
||||||
if (link.actionObj.shortcut)
|
if (link.actionObj.shortcut)
|
||||||
|
Loading…
Reference in New Issue
Block a user