* Mail: Move modify subject action from list view into preview

This commit is contained in:
Hadi Nategh 2018-12-07 11:18:06 +01:00
parent 80fb0315d4
commit 913a0095d0
2 changed files with 5 additions and 2 deletions

View File

@ -6126,6 +6126,7 @@ app.classes.mail = AppJS.extend(
*/
modifyMessageSubjectDialog: function (_action, _sender)
{
_sender = _sender ? _sender : [{id:this.mail_currentlyFocussed}];
var id = (_sender && _sender.uid) ? _sender.row_id:
_sender[0].id != 'nm'? _sender[0].id:_sender[1].id;
var data = (_sender && _sender.uid) ? {data:_sender} : egw.dataGetUIDdata(id);
@ -6147,7 +6148,9 @@ app.classes.mail = AppJS.extend(
switch (_button_id)
{
case "save":
egw.loading_prompt('modifyMessageSubjectDialog', true);
egw.json('mail.mail_ui.ajax_saveModifiedMessageSubject',[id, newSubject], function(_data){
egw.loading_prompt('modifyMessageSubjectDialog', false);
if (_data && !_data.success)
{
egw.message(_data.msg, "error");

View File

@ -17,7 +17,7 @@
</hbox>
<hbox id="mailPreviewHeadersSubject" class="mailPreviewHeaders">
<description value="Subject"/>
<description align="left" id="previewSubject" readonly="true"/>
<description align="left" id="previewSubject" readonly="true" hover_action="app.mail.modifyMessageSubjectDialog"/>
</hbox>
<hbox id="mailPreviewHeadersDate" class="mailPreviewHeaders">
<description value="Date"/>
@ -111,7 +111,7 @@
<description span="1" class="status_img"/>
<html id="${row}[attachments]"/>
<vbox>
<description id="${row}[subject]" no_lang="1" hover_action="app.mail.modifyMessageSubjectDialog"/>
<description id="${row}[subject]" no_lang="1"/>
<description id="${row}[bodypreview]" no_lang="1" class='et2_label bodypreview'/>
</vbox>
<hbox>