mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
Bind to nextmatch refresh event to update folder status too
This commit is contained in:
parent
5f12847fb3
commit
c8cfe6464e
@ -1334,8 +1334,6 @@ unset($query['actions']);
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['common']['select_mode']=='EGW_SELECTMODE_TOGGLE') unset($cols[0]);
|
||||
$rows = $this->header2gridelements($sortResult['header'],$cols, $_folderName, $folderType=$toSchema,$previewMessage);
|
||||
//error_log(__METHOD__.__LINE__.array2string($rows));
|
||||
$response = egw_json_response::get();
|
||||
$response->call('app.mail.mail_refreshFolderStatus',array('_nodeID'=>$_profileID.self::$delimiter.$_folderName,'mode'=>null,'_refreshGridArea'=>false),'mail');
|
||||
|
||||
$endtime = microtime(true) - $starttime;
|
||||
//error_log(__METHOD__.__LINE__. " time used: ".$endtime.' for Folder:'.$_folderName.' Start:'.$query['start'].' NumRows:'.$query['num_rows']);
|
||||
@ -3238,7 +3236,7 @@ blockquote[type=cite] {
|
||||
if ($oA)
|
||||
{
|
||||
$response = egw_json_response::get();
|
||||
$response->call('app.mail.mail_setFolderStatus',$oA,'mail');
|
||||
$response->call('app.mail.mail_setFolderStatus',$oA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,12 @@ app.classes.mail = AppJS.extend(
|
||||
*/
|
||||
destroy: function()
|
||||
{
|
||||
// Unbind from nm refresh
|
||||
var nm = this.et2.getWidgetById('nm');
|
||||
if(nm != null)
|
||||
{
|
||||
$j(nm).off('refresh');
|
||||
}
|
||||
delete this.et2;
|
||||
delete this.et2_obj;
|
||||
// call parent
|
||||
@ -117,20 +123,14 @@ app.classes.mail = AppJS.extend(
|
||||
if (isMainView)
|
||||
{
|
||||
this.mail_disablePreviewArea(true);
|
||||
this.mail_startTimerFolderStatusUpdate(this.mail_refreshTimeOut);
|
||||
//inital call of refresh folderstatus
|
||||
|
||||
// Bind to nextmatch refresh to update folder status
|
||||
var nm = this.et2.getWidgetById('nm');
|
||||
if(nm != null)
|
||||
{
|
||||
var self = this;
|
||||
window.setTimeout(function() {
|
||||
self.mail_refreshFolderStatus.call(self,undefined,undefined,false);
|
||||
},1000);
|
||||
// intention was, to enable drag and drop with the tree
|
||||
// and then somehow hook into the event and do the server side action
|
||||
// does not work here at that time, do not know why, so we go for
|
||||
// the traditional way of a rightclick action on the tree
|
||||
//var tree_wdg = this.et2.getWidgetById(this.nm_index+'[foldertree]');
|
||||
//tree_wdg.enableDragAndDrop(true,false);
|
||||
//tree_wdg.setDragBehavior('child',true);
|
||||
//tree_wdg.enableDragAndDropScrolling(true);
|
||||
$j(nm).on('refresh',function() {self.mail_refreshFolderStatus.call(self,undefined,undefined,false);});
|
||||
}
|
||||
}
|
||||
if (isDisplay)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user