From edec9c6c2be90c74ebc41180ad511509b8d84af4 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 18 Dec 2013 08:46:31 +0000 Subject: [PATCH] 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 --- mail/inc/class.mail_ui.inc.php | 2 +- mail/js/app.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 19fe38fcfb..ebe9720f75 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -143,7 +143,7 @@ class mail_ui )); } - //$GLOBALS['egw']->session->commit_session(); + $GLOBALS['egw']->session->commit_session(); //_debug_array($this->mail_bo->mailPreferences); //$endtime = microtime(true) - $starttime; //error_log(__METHOD__.__LINE__. " time used: ".$endtime); diff --git a/mail/js/app.js b/mail/js/app.js index 812d577477..a50ba9f751 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -110,6 +110,9 @@ app.classes.mail = AppJS.extend( this.mail_startTimerFolderStatusUpdate(this.mail_refreshTimeOut); //inital call of refresh folderstatus var self = this; + window.setTimeout(function() { + self.mail_refreshFolderStatus.call(self,undefined,undefined,false); + },1000); } if (isDisplay) { @@ -484,7 +487,7 @@ app.classes.mail = AppJS.extend( //console.log("mail_preview",nextmatch, selected); // 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) - 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) { 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 var self = this; + this.mail_doTimedRefresh = window.setInterval(function() { + self.mail_refreshFolderStatus.call(self,undefined,undefined,true); + },_refreshTimeOut); } },