mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 00:09:13 +01:00
* Mail: Fix changing flags does not affect immidiately on mail list
This commit is contained in:
parent
6e831aaad9
commit
8460b4d44a
@ -1942,7 +1942,10 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
// Update cache & call callbacks - updates list
|
||||
dataElem.data.class = classes.join(' ');
|
||||
egw.dataStoreUID(msg.msg[i],dataElem.data);
|
||||
egw.dataStoreUID(msg.msg[i],dataElem.data);
|
||||
|
||||
//Refresh the nm rows after we told dataComponent about all changes, since the dataComponent doesn't talk to nm, we need to do it manually
|
||||
this.updateFilter_data(msg.msg[i], _action.id, msg.activeFilters);
|
||||
}
|
||||
|
||||
// Notify server of changes
|
||||
@ -1970,7 +1973,55 @@ app.classes.mail = AppJS.extend(
|
||||
if (_action.id=='read' || _action.id=='readall') this.mail_refreshFolderStatus(_folder,'thisfolderonly',false,true);
|
||||
//this.mail_refreshFolderStatus();
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Update changes on filtered mail rows in nm, triggers manual refresh
|
||||
*
|
||||
* @param {type} _uid mail uid
|
||||
* @param {type} _actionId action id sended by nm action
|
||||
* @param {type} _filters activefilters
|
||||
*/
|
||||
updateFilter_data: function (_uid, _actionId, _filters)
|
||||
{
|
||||
var uid = _uid.replace('mail::','');
|
||||
var action = '';
|
||||
switch (_actionId)
|
||||
{
|
||||
case 'flagged':
|
||||
action = 'flagged';
|
||||
break;
|
||||
case 'read':
|
||||
if (_filters.filter == 'seen')
|
||||
{
|
||||
action = 'seen';
|
||||
}
|
||||
else if (_filters.filter == 'unseen')
|
||||
{
|
||||
action = 'unseen';
|
||||
}
|
||||
break;
|
||||
case 'label1':
|
||||
action = 'keyword1';
|
||||
break;
|
||||
case 'label2':
|
||||
action = 'keyword2';
|
||||
break;
|
||||
case 'label3':
|
||||
action = 'keyword3';
|
||||
break;
|
||||
case 'label4':
|
||||
action = 'keyword4';
|
||||
break;
|
||||
case 'label4':
|
||||
action = 'keyword4';
|
||||
break;
|
||||
}
|
||||
if (action == _filters.filter)
|
||||
{
|
||||
egw.refresh('','mail',uid, 'delete');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Flag mail as 'read', 'unread', 'flagged' or 'unflagged'
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user