mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Change mail preview to use new nextmatch onselect method
This commit is contained in:
parent
b994f33825
commit
ea175ca89d
@ -638,7 +638,7 @@ class mail_ui
|
|||||||
'open' => array(
|
'open' => array(
|
||||||
'caption' => lang('Open'),
|
'caption' => lang('Open'),
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'onExecute' => 'javaScript:app.mail.mail_preview', //dummy by nathan
|
'onExecute' => 'javaScript:app.mail.mail_open',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'default' => true,
|
'default' => true,
|
||||||
),
|
),
|
||||||
@ -890,7 +890,7 @@ class mail_ui
|
|||||||
'dragType' => array('mail','file'),
|
'dragType' => array('mail','file'),
|
||||||
'type' => 'drag',
|
'type' => 'drag',
|
||||||
'onExecute' => 'javaScript:app.mail.mail_dragStart',
|
'onExecute' => 'javaScript:app.mail.mail_dragStart',
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
// save as tracker, save as infolog, as this are actions that are either available for all, or not, we do that for all and not via css-class disabling
|
// save as tracker, save as infolog, as this are actions that are either available for all, or not, we do that for all and not via css-class disabling
|
||||||
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
||||||
|
@ -49,13 +49,19 @@ mail_open: function(_action, _senders) {
|
|||||||
/**
|
/**
|
||||||
* mail_preview - implementation of the copy action
|
* mail_preview - implementation of the copy action
|
||||||
*
|
*
|
||||||
* @param _action
|
* @param nextmatch et2_nextmatch The widget whose row was selected
|
||||||
* @param _senders - the representation of the elements(s) the action is to be performed on
|
* @param selected Array Selected row IDs. May be empty if user unselected all rows.
|
||||||
*/
|
*/
|
||||||
mail_preview: function(_action, _senders) {
|
mail_preview: function(nextmatch, selected) {
|
||||||
//console.log("mail_preview",_action, _senders);
|
//console.log("mail_preview",_action, _senders);
|
||||||
var _id = _senders[0].id;
|
|
||||||
var dataElem = egw.dataGetUIDdata(_id);
|
// Empty values, just in case selected is empty (user cleared selection)
|
||||||
|
var dataElem = {data:{subject:"",fromaddress:"",toaddress:"",date:"",subject:""}};
|
||||||
|
if(selected.length > 0)
|
||||||
|
{
|
||||||
|
var _id = selected[0];
|
||||||
|
dataElem = egw.dataGetUIDdata(_id);
|
||||||
|
}
|
||||||
console.log("mail_preview",dataElem);
|
console.log("mail_preview",dataElem);
|
||||||
var subject =dataElem.data.subject;
|
var subject =dataElem.data.subject;
|
||||||
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewFromAddress').set_value(dataElem.data.fromaddress);
|
etemplate2.getByApplication('mail')[0].widgetContainer.getWidgetById('previewFromAddress').set_value(dataElem.data.fromaddress);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<tree autoloading="mail.mail_ui.ajax_foldertree" id="nm[foldertree]" onclick="app.mail.mail_changeFolder(widget.event_args[0],widget);" parent_node="tree_target"/>
|
<tree autoloading="mail.mail_ui.ajax_foldertree" id="nm[foldertree]" onclick="app.mail.mail_changeFolder(widget.event_args[0],widget);" parent_node="tree_target"/>
|
||||||
<html id="msg"/>
|
<html id="msg"/>
|
||||||
<split dock_side="bottomDock" id="splitter" orientation="h">
|
<split dock_side="bottomDock" id="splitter" orientation="h">
|
||||||
<nextmatch id="nm" template="mail.index.rows"/>
|
<nextmatch id="nm" template="mail.index.rows" onselect="app.mail.mail_preview"/>
|
||||||
<vbox id="spanMessagePreview">
|
<vbox id="spanMessagePreview">
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
<columns>
|
||||||
|
Loading…
Reference in New Issue
Block a user