* code for add data-app attr.
This commit is contained in:
@@ -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 "<a href='$href' $misc>$title</a>$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)))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user