forked from extern/egroupware
* Mail: replying to a mail should only update icon, not move it to top of list
This commit is contained in:
parent
631587eab1
commit
08acad038c
@ -433,6 +433,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
* Change type parameters allows for quicker refresh then complete server side reload:
|
||||
* - update: request just modified data from given rows. Sorting is not considered,
|
||||
* so if the sort field is changed, the row will not be moved.
|
||||
* - update-in-place: update row, but do NOT move it, or refresh if uid does not exist
|
||||
* - edit: rows changed, but sorting may be affected. May require full reload.
|
||||
* - delete: just delete the given rows clientside (no server interaction neccessary)
|
||||
* - add: put the new row in at the top, unless app says otherwise
|
||||
@ -504,6 +505,9 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
||||
id_loop: for (var i = 0; i < _row_ids.length; i++) {
|
||||
var uid = _row_ids[i].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
|
||||
switch (_type) {
|
||||
case "update-in-place":
|
||||
this.egw().dataRefreshUID(uid);
|
||||
break;
|
||||
case "edit":
|
||||
case "update":
|
||||
if (!this.refresh_update(uid)) {
|
||||
|
@ -681,6 +681,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
* Change type parameters allows for quicker refresh then complete server side reload:
|
||||
* - update: request just modified data from given rows. Sorting is not considered,
|
||||
* so if the sort field is changed, the row will not be moved.
|
||||
* - update-in-place: update row, but do NOT move it, or refresh if uid does not exist
|
||||
* - edit: rows changed, but sorting may be affected. May require full reload.
|
||||
* - delete: just delete the given rows clientside (no server interaction neccessary)
|
||||
* - add: put the new row in at the top, unless app says otherwise
|
||||
@ -769,6 +770,9 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
||||
var uid = _row_ids[i].toString().indexOf(this.controller.dataStorePrefix) == 0 ? _row_ids[i] : this.controller.dataStorePrefix + "::" + _row_ids[i];
|
||||
switch(_type)
|
||||
{
|
||||
case "update-in-place":
|
||||
this.egw().dataRefreshUID(uid);
|
||||
break;
|
||||
case "edit":
|
||||
case "update":
|
||||
if(!this.refresh_update(uid))
|
||||
|
1
api/js/jsapi/egw_global.d.ts
vendored
1
api/js/jsapi/egw_global.d.ts
vendored
@ -875,6 +875,7 @@ declare interface IegwWndLocal extends IegwGlobal
|
||||
* @param {string} _type either 'update', 'edit', 'delete', 'add' or null
|
||||
* - update: request just modified data from given rows. Sorting is not considered,
|
||||
* so if the sort field is changed, the row will not be moved.
|
||||
* - update-in-place: update row, but do NOT move it, or refresh if uid does not exist
|
||||
* - edit: rows changed, but sorting may be affected. Requires full reload.
|
||||
* - delete: just delete the given rows clientside (no server interaction neccessary)
|
||||
* - add: requires full reload for proper sorting
|
||||
|
@ -319,6 +319,7 @@ egw.extend('message', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
* @param {string} _type either 'update', 'edit', 'delete', 'add' or null
|
||||
* - update: request just modified data from given rows. Sorting is not considered,
|
||||
* so if the sort field is changed, the row will not be moved.
|
||||
* - update-in-place: update row, but do NOT move it, or refresh if uid does not exist
|
||||
* - edit: rows changed, but sorting may be affected. Requires full reload.
|
||||
* - delete: just delete the given rows clientside (no server interaction neccessary)
|
||||
* - add: requires full reload for proper sorting
|
||||
|
@ -570,6 +570,7 @@ class mail_compose
|
||||
{
|
||||
$rhA = mail_ui::splitRowID($_content['processedmail_id']);
|
||||
$idsForRefresh[] = mail_ui::generateRowID($rhA['profileID'], $rhA['folder'], $rhA['msgUID'], $_prependApp=false);
|
||||
$workingFolder = $rhA['folder']; // need folder to refresh eg. drafts folder
|
||||
}
|
||||
$response = Api\Json\Response::get();
|
||||
if ($activeProfile != $composeProfile)
|
||||
@ -577,17 +578,19 @@ class mail_compose
|
||||
// we need a message only, when account ids (composeProfile vs. activeProfile) differ
|
||||
$response->call('opener.egw_message',lang('Message send successfully.'));
|
||||
}
|
||||
elseif ($activeProfile == $composeProfile && ($workingFolder==$activeFolder['mailbox'] && $mode != 'compose') || ($this->mail_bo->isSentFolder($workingFolder)||$this->mail_bo->isDraftFolder($workingFolder)))
|
||||
elseif ($activeProfile == $composeProfile && ($workingFolder==$activeFolder['mailbox'] && $mode != 'compose') ||
|
||||
($this->mail_bo->isSentFolder($workingFolder) || $this->mail_bo->isDraftFolder($workingFolder)))
|
||||
{
|
||||
if ($this->mail_bo->isSentFolder($workingFolder)||$this->mail_bo->isDraftFolder($workingFolder))
|
||||
{
|
||||
// we may need a refresh when on sent folder or in drafts, as drafted messages will/should be deleted after succeeded send action
|
||||
$response->call('opener.egw_refresh',lang('Message send successfully.'),'mail');
|
||||
}
|
||||
// we only need to update the icon of the replied or forwarded mails --> 'update-in-place'
|
||||
else
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.array2string($idsForRefresh));
|
||||
$response->call('opener.egw_refresh',lang('Message send successfully.'),'mail',$idsForRefresh,'update');
|
||||
$response->call('opener.egw_refresh',lang('Message send successfully.'),'mail',$idsForRefresh,'update-in-place');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user