forked from extern/egroupware
Fix mail compose toggle buttons set values
This commit is contained in:
parent
04730c83fe
commit
df76d33437
@ -156,14 +156,16 @@ class mail_compose
|
|||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'hint' => 'check to save as infolog on send',
|
'hint' => 'check to save as infolog on send',
|
||||||
'toolbarDefault' => true
|
'toolbarDefault' => true,
|
||||||
|
'onExecute' => 'javaScript:app.mail.compose_setToggle'
|
||||||
),
|
),
|
||||||
'to_tracker' => array(
|
'to_tracker' => array(
|
||||||
'caption' => 'Tracker',
|
'caption' => 'Tracker',
|
||||||
'icon' => 'to_tracker',
|
'icon' => 'to_tracker',
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'hint' => 'check to save as trackerentry on send'
|
'hint' => 'check to save as trackerentry on send',
|
||||||
|
'onExecute' => 'javaScript:app.mail.compose_setToggle'
|
||||||
),
|
),
|
||||||
'disposition' => array(
|
'disposition' => array(
|
||||||
'caption' => 'Notification',
|
'caption' => 'Notification',
|
||||||
@ -171,7 +173,8 @@ class mail_compose
|
|||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'hint' => 'check to recieve a notification when the message is read (note: not all clients support this and/or the reciever may not authorize the notification)',
|
'hint' => 'check to recieve a notification when the message is read (note: not all clients support this and/or the reciever may not authorize the notification)',
|
||||||
'toolbarDefault' => true
|
'toolbarDefault' => true,
|
||||||
|
'onExecute' => 'javaScript:app.mail.compose_setToggle'
|
||||||
),
|
),
|
||||||
'prty' => array(
|
'prty' => array(
|
||||||
'caption' => 'Priority',
|
'caption' => 'Priority',
|
||||||
|
@ -4227,24 +4227,24 @@ app.classes.mail = AppJS.extend(
|
|||||||
*/
|
*/
|
||||||
compose_submitAction: function (_action)
|
compose_submitAction: function (_action)
|
||||||
{
|
{
|
||||||
var action_widget = ['to_infolog','to_tracker','disposition'];
|
|
||||||
var toolbar = this.et2.getWidgetById('composeToolbar');
|
|
||||||
for(var i=0;action_widget.length>i;i++)
|
|
||||||
{
|
|
||||||
var widget = this.et2.getWidgetById(action_widget[i]);
|
|
||||||
if (toolbar._actionManager)
|
|
||||||
{
|
|
||||||
var action_event = toolbar._actionManager.getActionById(action_widget[i]);
|
|
||||||
if (typeof action_event.checkbox != 'undefined' && action_event.checkbox)
|
|
||||||
{
|
|
||||||
widget.set_value(action_event.checked?"on":"off");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.et2._inst.submit(null,null,true);
|
this.et2._inst.submit(null,null,true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the selected checkbox action
|
||||||
|
*
|
||||||
|
* @param {type} _action selected toolbar action with checkbox
|
||||||
|
* @returns {undefined}
|
||||||
|
*/
|
||||||
|
compose_setToggle: function (_action)
|
||||||
|
{
|
||||||
|
var widget = this.et2.getWidgetById (_action.id);
|
||||||
|
if (widget && typeof _action.checkbox != 'undefined' && _action.checkbox)
|
||||||
|
{
|
||||||
|
widget.set_value(_action.checked?"on":"off");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the selected priority value
|
* Set the selected priority value
|
||||||
* @param {type} _action selected action
|
* @param {type} _action selected action
|
||||||
@ -4258,6 +4258,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
widget.set_value(_action.id);
|
widget.set_value(_action.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triger relative widget via its toolbar identical action
|
* Triger relative widget via its toolbar identical action
|
||||||
* @param {type} _action toolbar action
|
* @param {type} _action toolbar action
|
||||||
|
Loading…
Reference in New Issue
Block a user