mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02: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]);
|
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);
|
$rows = $this->header2gridelements($sortResult['header'],$cols, $_folderName, $folderType=$toSchema,$previewMessage);
|
||||||
//error_log(__METHOD__.__LINE__.array2string($rows));
|
//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;
|
$endtime = microtime(true) - $starttime;
|
||||||
//error_log(__METHOD__.__LINE__. " time used: ".$endtime.' for Folder:'.$_folderName.' Start:'.$query['start'].' NumRows:'.$query['num_rows']);
|
//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)
|
if ($oA)
|
||||||
{
|
{
|
||||||
$response = egw_json_response::get();
|
$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()
|
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;
|
||||||
delete this.et2_obj;
|
delete this.et2_obj;
|
||||||
// call parent
|
// call parent
|
||||||
@ -117,20 +123,14 @@ app.classes.mail = AppJS.extend(
|
|||||||
if (isMainView)
|
if (isMainView)
|
||||||
{
|
{
|
||||||
this.mail_disablePreviewArea(true);
|
this.mail_disablePreviewArea(true);
|
||||||
this.mail_startTimerFolderStatusUpdate(this.mail_refreshTimeOut);
|
|
||||||
//inital call of refresh folderstatus
|
// Bind to nextmatch refresh to update folder status
|
||||||
var self = this;
|
var nm = this.et2.getWidgetById('nm');
|
||||||
window.setTimeout(function() {
|
if(nm != null)
|
||||||
self.mail_refreshFolderStatus.call(self,undefined,undefined,false);
|
{
|
||||||
},1000);
|
var self = this;
|
||||||
// intention was, to enable drag and drop with the tree
|
$j(nm).on('refresh',function() {self.mail_refreshFolderStatus.call(self,undefined,undefined,false);});
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
if (isDisplay)
|
if (isDisplay)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user