fix problems introduced by rev44904; refresh for folder counters removed by that commit in favour to rely on grids refresh call. sadly grids refresh does not provide a method to hook into so far (, so that counters of folders in tree are refreshed as well); until this is solved I reintroduce the application side triggered refresh

This commit is contained in:
Klaus Leithoff 2013-12-18 08:46:31 +00:00
parent 8ad1e7ed20
commit edec9c6c2b
2 changed files with 8 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class mail_ui
)); ));
} }
//$GLOBALS['egw']->session->commit_session(); $GLOBALS['egw']->session->commit_session();
//_debug_array($this->mail_bo->mailPreferences); //_debug_array($this->mail_bo->mailPreferences);
//$endtime = microtime(true) - $starttime; //$endtime = microtime(true) - $starttime;
//error_log(__METHOD__.__LINE__. " time used: ".$endtime); //error_log(__METHOD__.__LINE__. " time used: ".$endtime);

View File

@ -110,6 +110,9 @@ app.classes.mail = AppJS.extend(
this.mail_startTimerFolderStatusUpdate(this.mail_refreshTimeOut); this.mail_startTimerFolderStatusUpdate(this.mail_refreshTimeOut);
//inital call of refresh folderstatus //inital call of refresh folderstatus
var self = this; var self = this;
window.setTimeout(function() {
self.mail_refreshFolderStatus.call(self,undefined,undefined,false);
},1000);
} }
if (isDisplay) if (isDisplay)
{ {
@ -484,7 +487,7 @@ app.classes.mail = AppJS.extend(
//console.log("mail_preview",nextmatch, selected); //console.log("mail_preview",nextmatch, selected);
// Empty values, just in case selected is empty (user cleared selection) // Empty values, just in case selected is empty (user cleared selection)
//dataElem.data is populated, when available with fromaddress(string),toaddress(string),additionaltoaddress(array),ccaddress (array) //dataElem.data is populated, when available with fromaddress(string),toaddress(string),additionaltoaddress(array),ccaddress (array)
var dataElem = {data:{subject:"",fromaddress:"",toaddress:"",ccaddress:"",date:"",subject:""}}; var dataElem = {data:{subject:"",fromaddress:"",toaddress:"",ccaddress:"",date:"",subject:"",attachmentsBlock:""}};
if(typeof selected != 'undefined' && selected.length == 1) if(typeof selected != 'undefined' && selected.length == 1)
{ {
var _id = this.mail_fetchCurrentlyFocussed(selected); var _id = this.mail_fetchCurrentlyFocussed(selected);
@ -632,6 +635,9 @@ app.classes.mail = AppJS.extend(
} }
if(_refreshTimeOut > 9999) {//we do not set _refreshTimeOut's less than 10 seconds if(_refreshTimeOut > 9999) {//we do not set _refreshTimeOut's less than 10 seconds
var self = this; var self = this;
this.mail_doTimedRefresh = window.setInterval(function() {
self.mail_refreshFolderStatus.call(self,undefined,undefined,true);
},_refreshTimeOut);
} }
}, },