Merge branch 'sprint/285_navigation' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/285_navigation

This commit is contained in:
guofeilong
2023-02-07 11:22:14 +08:00
10 changed files with 19 additions and 31 deletions
@@ -22,6 +22,7 @@ $lang->custom->menuOrder[30] = 'user';
$lang->custom->menuOrder[35] = 'block';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = 'Required Field';
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
@@ -22,6 +22,7 @@ $lang->custom->menuOrder[30] = 'user';
$lang->custom->menuOrder[35] = 'block';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = 'Required Field';
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
@@ -22,6 +22,7 @@ $lang->custom->menuOrder[30] = 'user';
$lang->custom->menuOrder[35] = 'block';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = 'Required Field';
$lang->custom->task->fields['priList'] = 'Priority';
$lang->custom->task->fields['typeList'] = 'Type';
@@ -22,6 +22,7 @@ $lang->custom->menuOrder[30] = 'user';
$lang->custom->menuOrder[35] = 'block';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['required'] = '必填项';
$lang->custom->task->fields['priList'] = '优先级';
$lang->custom->task->fields['typeList'] = '类型';
+2 -2
View File
@@ -88,12 +88,12 @@ $lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$l
$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|");
$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug", 'exclude' => 'set,required');
$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|");
$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc");
$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc", 'exclude' => 'required');
$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$lang->user->common}|custom|set|module=user", 'exclude' => 'set,required');
$lang->admin->menuList->feature['tabMenu']['my']['todo'] = array('link' => "{$lang->todo->common}|custom|set|module=todo&field=priList");
$lang->admin->menuList->feature['tabMenu']['my']['block'] = array('link' => "{$lang->block->common}|custom|set|module=block&field=closed");
if($this->config->vision == 'lite') $lang->admin->menuList->feature['tabMenu']['my']['task'] = array();
if($config->vision == 'lite') $lang->admin->menuList->feature['tabMenu']['my']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task");
$lang->admin->menuList->feature['tabMenu']['product']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'links' => array("custom|browsestoryconcept|", 'custom|product|'));
+1
View File
@@ -277,6 +277,7 @@ class adminModel extends model
if($moduleName == 'custom' and strpos(',required,set,', $methodName) !== false)
{
if(strpos(',todo,block,', $paramName) !== false) $subMenuKey = 'my';
if($this->config->vision == 'lite' and $paramName == 'task') $subMenuKey = 'my';
if(isset($subMenuKey)) $this->lang->admin->menuList->$menuKey['subMenu'][$subMenuKey]['subModule'] = $moduleName;
}
+2 -2
View File
@@ -11,8 +11,8 @@
$name = $lang->custom->object[$tabMenuKey];
$paramName = $this->app->rawParams ? reset($this->app->rawParams) : '';
$active = ($tabMethod == $tabMenuKey and strpos(',required,set,', ",$tabMethod",) === false) ? 'btn-active-text' : '';
$active = ($paramName == $tabMenuKey and strpos(',required,set,', ",$tabMethod",)) ? 'btn-active-text' : $active;
$active = ($tabMethod == $tabMenuKey and strpos(',required,set,', ",$tabMethod,",) === false) ? 'btn-active-text' : '';
$active = ($paramName == $tabMenuKey and strpos(',required,set,', ",$tabMethod,",) !== false) ? 'btn-active-text' : $active;
common::printLink($tabModule, $tabMethod, $tabParams, "<span class='text'>{$name}</span>", '', "class='btn btn-link {$active}' id='{$tabMenuKey}Tab'");
}
?>
-6
View File
@@ -8,12 +8,6 @@ function delItem(clickedButton)
$(clickedButton).parent().parent().remove();
}
$(function()
{
$('#' + module + 'Tab').addClass('btn-active-text');
$('#' + field + 'Tab').addClass('active');
})
$('[name*=unitList]').change(function()
{
var defaultCurrency = $('#defaultCurrency').val();
+6 -20
View File
@@ -11,24 +11,17 @@
*/
?>
<?php include 'header.html.php';?>
<script>
$('#navbar ul.nav li').removeClass('active');
$('#navbar ul.nav li[data-id=<?php echo $moduleName?>]').addClass('active');
<?php if($moduleName == 'bug'):?>
$('#navbar ul.nav li[data-id=qa]').addClass('active');
<?php endif;?>
if($('#navbar ul.nav li[data-id=common]').length > 0) $('#navbar ul.nav li[data-id=common]').addClass('active');
</script>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<div class='cell'>
<div class='list-group'>
<?php
ksort($config->custom->requiredModules);
foreach($config->custom->requiredModules as $requiredModule)
foreach($lang->custom->{$moduleName}->fields as $key => $value)
{
$requiredModuleName = zget($lang->custom->moduleName, $requiredModule, $lang->$requiredModule->common);
echo html::a(inlink('required', "module=$requiredModule"), $requiredModuleName, '', "id='{$requiredModule}Tab'");
$method = $key == 'required' ? 'required' : 'set';
$params = $key == 'required' ? "module=$moduleName" : "module=$moduleName&field=$key";
$active = $key == 'required' ? 'active' : '';
echo html::a(inlink($method, $params), $value, '', "class='$active'");
}
?>
</div>
@@ -38,7 +31,7 @@ if($('#navbar ul.nav li[data-id=common]').length > 0) $('#navbar ul.nav li[data-
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->$moduleName->common?></strong>
<strong><?php echo $lang->custom->object[$moduleName] . $lang->arrow . $lang->custom->$moduleName->fields['required']?></strong>
</div>
</div>
<table class='table table-form mw-800px'>
@@ -78,11 +71,4 @@ if($('#navbar ul.nav li[data-id=common]').length > 0) $('#navbar ul.nav li[data-
</form>
</div>
</div>
<script>
$(function()
{
$('#mainMenu #requiredTab').addClass('btn-active-text');
$('#sidebar #<?php echo $moduleName?>Tab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+4 -1
View File
@@ -55,7 +55,10 @@ EOT;
<?php
foreach($lang->custom->{$module}->fields as $key => $value)
{
echo html::a(inlink('set', "module=$module&field=$key"), $value, '', " id='{$key}Tab'");
$method = $key == 'required' ? 'required' : 'set';
$params = $key == 'required' ? "module=$module" : "module=$module&field=$key";
$active = $field == $key ? 'active' : '';
echo html::a(inlink($method, $params), $value, '', "class='$active'");
}
?>
</div>