diff --git a/module/index/js/index.js b/module/index/js/index.js index fdbac9cb5b..0e45e36856 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -335,13 +335,14 @@ function hideTab(appCode) { var app = openedApps[appCode]; - if(!app || !app.show) return; + if(!app) return; + app.$app.trigger('hideapp', app); + if(!app.show) return; app.$app.hide(); app.show = false; lastOpenedApp = null; - app.$app.trigger('hideapp', app); /* Active last app */ var lastApp = getLastApp(true) || getLastApp(); diff --git a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php index 73d50b9ca1..a76a35cc0c 100644 --- a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php @@ -192,7 +192,7 @@ class xuanxuanIm extends imModel } /** - * Merge notifications with same actor, objectType, actionType. + * Merge notifications with same actor, objectType, actionType. Notifications with contentType of 'text' won't be merged. * * @param array $notificationData * @access public @@ -209,11 +209,16 @@ class xuanxuanIm extends imModel /* Group by $message->content->content->objectType, ...->parentType, ...->action, ...->actor */ $contentData = json_decode($message->content); $contentData = json_decode($contentData->content); + if($contentData->contentType == 'text') + { + $messageGroups[$contentData->contentType][] = $message; + continue; + } $messageGroups["$contentData->objectType-$contentData->parentType-$contentData->action-$contentData->actor"][] = $message; } foreach($messageGroups as $groupKey => $messages) { - if(count($messages) < 2) continue; + if(count($messages) < 2 || $groupKey == 'text') continue; $notification = current($messages); array_shift($messages); diff --git a/xuanxuan/extension/xuan/index/ext/js/index/xuanxuan.js b/xuanxuan/extension/xuan/index/ext/js/index/xuanxuan.js index 66879a0080..298d6b5bb9 100644 --- a/xuanxuan/extension/xuan/index/ext/js/index/xuanxuan.js +++ b/xuanxuan/extension/xuan/index/ext/js/index/xuanxuan.js @@ -18,6 +18,10 @@ if(window.navigator.userAgent.indexOf('xuanxuan') > 0) $(document).on('showapp', function(e, app) { - window.open('xxc://extension.zentao-integrated.activeAppMenuItem/' + app.code); + window.open('xxc://extension.zentao-integrated.activeAppMenuItem/' + encodeURIComponent(JSON.stringify({id: app.code, openedApps:Object.keys($.apps.openedApps)}))); + }); + $(document).on('hideapp', function(e, app) + { + window.open('xxc://extension.zentao-integrated.hideAppMenuItem/' + encodeURIComponent(JSON.stringify({id: app.code, openedApps:Object.keys($.apps.openedApps)}))); }); } diff --git a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php index ec97683aac..a10a4022be 100644 --- a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php +++ b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php @@ -23,7 +23,11 @@ updateAppMenu(); $(document).on('showapp', function(e, app) { - window.open('xxc://extension.zentao-integrated.activeAppMenuItem/' + app.code); + window.open('xxc://extension.zentao-integrated.activeAppMenuItem/' + encodeURIComponent(JSON.stringify({id: app.code, openedApps:Object.keys($.apps.openedApps)}))); +}); +$(document).on('hideapp', function(e, app) +{ + window.open('xxc://extension.zentao-integrated.hideAppMenuItem/' + encodeURIComponent(JSON.stringify({id: app.code, openedApps:Object.keys($.apps.openedApps)}))); }); @@ -48,7 +52,7 @@ if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon)