mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +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(
|
||||
'caption' => lang('Open'),
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.mail.mail_preview', //dummy by nathan
|
||||
'onExecute' => 'javaScript:app.mail.mail_open',
|
||||
'allowOnMultiple' => false,
|
||||
'default' => true,
|
||||
),
|
||||
@ -890,7 +890,7 @@ class mail_ui
|
||||
'dragType' => array('mail','file'),
|
||||
'type' => 'drag',
|
||||
'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
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['infolog']))
|
||||
|
@ -49,13 +49,19 @@ mail_open: function(_action, _senders) {
|
||||
/**
|
||||
* mail_preview - implementation of the copy action
|
||||
*
|
||||
* @param _action
|
||||
* @param _senders - the representation of the elements(s) the action is to be performed on
|
||||
* @param nextmatch et2_nextmatch The widget whose row was selected
|
||||
* @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);
|
||||
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);
|
||||
var subject =dataElem.data.subject;
|
||||
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"/>
|
||||
<html id="msg"/>
|
||||
<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">
|
||||
<grid>
|
||||
<columns>
|
||||
@ -106,4 +106,4 @@
|
||||
</vbox>
|
||||
</split>
|
||||
</template>
|
||||
</overlay>
|
||||
</overlay>
|
||||
|
Loading…
Reference in New Issue
Block a user