mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
implement some >mark all messages in folder as read< action
This commit is contained in:
@ -1687,7 +1687,7 @@ app.classes.mail = AppJS.extend(
|
||||
var obj_manager = egw_getObjectManager(this.appname).getObjectById(this.nm_index);
|
||||
var that = this;
|
||||
var rvMain = false;
|
||||
if (obj_manager && _elems.length>1 && obj_manager.getAllSelected())
|
||||
if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected()) || _action.id=='readall')
|
||||
{
|
||||
if (_confirm)
|
||||
{
|
||||
@ -1698,6 +1698,9 @@ app.classes.mail = AppJS.extend(
|
||||
var messageToDisplay = '';
|
||||
switch (_action.id)
|
||||
{
|
||||
case "readall":
|
||||
messageToDisplay = this.egw.lang("Do you really want to mark ALL messages as read in the current folder?")+" ";
|
||||
break;
|
||||
case "unlabel":
|
||||
case "label1":
|
||||
case "label2":
|
||||
@ -1737,6 +1740,7 @@ app.classes.mail = AppJS.extend(
|
||||
case "delete":
|
||||
that.mail_callDelete(_action, _elems,rv);
|
||||
break;
|
||||
case "readall":
|
||||
case "unlabel":
|
||||
case "label1":
|
||||
case "label2":
|
||||
@ -1877,6 +1881,7 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
var classToProcess = _action.id;
|
||||
if (_action.id=='read') classToProcess='seen';
|
||||
else if (_action.id=='readall') classToProcess='seen';
|
||||
else if (_action.id=='label1') classToProcess='labelone';
|
||||
else if (_action.id=='label2') classToProcess='labeltwo';
|
||||
else if (_action.id=='label3') classToProcess='labelthree';
|
||||
@ -1888,7 +1893,7 @@ app.classes.mail = AppJS.extend(
|
||||
msg = this.mail_getFormData(_elems);
|
||||
msg['all'] = _allMessagesChecked;
|
||||
if (msg['all']=='cancel') return false;
|
||||
msg['activeFilters'] = this.mail_getActiveFilters(_action);
|
||||
msg['activeFilters'] = (_action.id=='readall'?false:this.mail_getActiveFilters(_action));
|
||||
if (_action.id.substring(0,2)=='un') {
|
||||
//old style, only available for undelete and unlabel (no toggle)
|
||||
if ( _action.id=='unlabel') // this means all labels should be removed
|
||||
@ -1904,6 +1909,10 @@ app.classes.mail = AppJS.extend(
|
||||
this.mail_flagMessages(_action.id,msg,(do_nmactions?false:true));
|
||||
}
|
||||
}
|
||||
else if (_action.id=='readall')
|
||||
{
|
||||
this.mail_flagMessages('read',msg,(do_nmactions?false:true));
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg_set = {msg:[]};
|
||||
@ -1972,7 +1981,7 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
// only refresh counter. not grid as the ajaxmethod is called asyncronously
|
||||
// on flagging, only seen/unseen has effect on counterdisplay
|
||||
if (_action.id=='read') this.mail_refreshFolderStatus(_folder,'thisfolderonly',false,true);
|
||||
if (_action.id=='read' || _action.id=='readall') this.mail_refreshFolderStatus(_folder,'thisfolderonly',false,true);
|
||||
//this.mail_refreshFolderStatus();
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user