Shuffle some stuff around so switching folders works too.

This commit is contained in:
Nathan Gray 2013-12-10 18:13:28 +00:00
parent 1f438436e1
commit 46253ec346

View File

@ -997,16 +997,8 @@ app.classes.mail = AppJS.extend(
*/
mail_changeProfile: function(folder,_widget) {
// alert(folder);
var nm = _widget.getRoot().getWidgetById(this.nm_index);
if(nm)
{
nm.activeFilters['selectedFolder'] = folder;
// Changing dataset entirely, force a reset
nm.controller.reset();
}
egw.json('mail.mail_ui.ajax_changeProfile',[folder])
.sendRequest();
this.mail_refreshMessageGrid();
return true;
},
@ -1026,12 +1018,8 @@ app.classes.mail = AppJS.extend(
if (!(img.search(eval('/'+'thunderbird'+'/'))<0))
{
rv = this.mail_changeProfile(folder,_widget);
if (rv)
{
return rv;
}
}
if (_widget.event_args.length==2)
else if (_widget.event_args.length==2)
{
folder = _widget.event_args[1];
_widget.set_value(folder);
@ -1042,11 +1030,12 @@ app.classes.mail = AppJS.extend(
}
}
var nm = _widget.getRoot().getWidgetById(this.nm_index);
nm.activeFilters["selectedFolder"] = folder;
//nm.applyFilters();// its done in refrefreshMessageGrid
var msg = _widget.getRoot().getWidgetById('msg');
if (msg)
if(nm)
{
nm.activeFilters['selectedFolder'] = folder;
// Changing dataset entirely, force a reset
nm.controller.reset();
}
window.clearInterval(this.doStatus);
displayname = _widget.getSelectedLabel();
inBraket = displayname.search(/\(/);
@ -1061,8 +1050,8 @@ app.classes.mail = AppJS.extend(
}
}
myMsg = (displayname?displayname:folder)+' '+this.egw.lang('selected');
app.mail.app_refresh(myMsg, 'mail');
}
egw_message(myMsg);
//mail_refreshMessageGrid();// its done in refreshFolderStatus already
this.mail_refreshFolderStatus(folder,'forced');
this.mail_refreshQuotaDisplay(server[0]);