diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index b71849b423..dee1dc7346 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -111,6 +111,14 @@ class baseHTML if(strlen(trim($title)) == 0) $title = $href; $newline = $newline ? "\n" : ''; + if(strpos($misc, 'data-app=') === false) + { + global $app, $lang; + $module = $app->rawModule; + $dataApp = (isset($lang->navGroup->$module) and $lang->navGroup->$module != $app->tab) ? "data-app='{$app->tab}'" : ''; + $misc .= ' ' . $dataApp; + } + return "$title$newline"; } @@ -501,6 +509,13 @@ class baseHTML $gobackList = isset($_COOKIE['goback']) ? json_decode($_COOKIE['goback'], true) : array(); $gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : ''; + if(strpos($misc, 'data-app=') === false) + { + $module = $app->rawModule; + $dataApp = (isset($lang->navGroup->$module) and $lang->navGroup->$module != $app->tab) ? "data-app='{$app->tab}'" : ''; + $misc .= ' ' . $dataApp; + } + /* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */ if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", strtolower($refererLink))) { diff --git a/module/index/js/index.js b/module/index/js/index.js index 2d86b251a8..d46dab6ee4 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -671,7 +671,7 @@ defaultOpenUrl = !defaultOpenUrl ? codeApp : defaultOpenUrl + '#app=' + codeApp; } - openTab(defaultOpenUrl ? defaultOpenUrl : defaultApp, $.cookie('tab')); + openTab(defaultOpenUrl ? defaultOpenUrl : defaultApp); /* Refresh more menu on window resize */ $(window).on('resize', refreshMoreMenu); diff --git a/module/project/model.php b/module/project/model.php index 116239aebc..af75722fc4 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2523,9 +2523,6 @@ class projectModel extends model $this->session->set('project', $projectID, 'project'); $this->session->set('noSprint', true); - $this->app->tab = 'project'; - $_COOKIE['tab'] = 'project'; - $navGroup = zget($this->lang->navGroup, $moduleName); $this->lang->$navGroup->menu = $this->lang->noSprint->{$modal}->menu; $this->lang->$navGroup->menuOrder = $this->lang->noSprint->{$modal}->menuOrder;