From ff5c09c76f3aa095d680e3d502ef2a06248693e5 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Fri, 12 Mar 2021 08:21:40 +0800
Subject: [PATCH] * Adjust the code.
---
module/custom/js/common.js | 19 +++++++++++++++++++
module/custom/view/header.html.php | 4 +++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 module/custom/js/common.js
diff --git a/module/custom/js/common.js b/module/custom/js/common.js
new file mode 100644
index 0000000000..8ffc22d8bc
--- /dev/null
+++ b/module/custom/js/common.js
@@ -0,0 +1,19 @@
+$(function()
+{
+ $object = $('.btn-toolbar.pull-left');
+ while(true)
+ {
+ if($object.children(':first-child').hasClass('divider'))
+ {
+ $object.children(':first-child').remove();
+ continue;
+ }
+ if($object.children(':last-child').hasClass('divider'))
+ {
+ $object.children(':last-child').remove();
+ continue;
+ }
+
+ break;
+ }
+})
diff --git a/module/custom/view/header.html.php b/module/custom/view/header.html.php
index 096d1baaaa..3b19374421 100644
--- a/module/custom/view/header.html.php
+++ b/module/custom/view/header.html.php
@@ -4,13 +4,15 @@
custom->object as $object => $name)
{
- if(strpos('story|todo|block', $object) !== false and count($lang->custom->object) > 1) echo "";
+ if(strpos('story|todo|block', $object) !== false) echo "";
if(strpos('execution|product', $object) !== false) common::printLink('custom', $object, "", "{$lang->custom->$object}", '', "class='btn btn-link' id='{$object}Tab'");
if(strpos('execution|product', $object) === false) common::printLink('custom', 'set', "module=$object&field=" . key($lang->custom->{$object}->fields), "{$name}", '', "class='btn btn-link' id='{$object}Tab'");
+ if($object == 'user') common::printLink('custom', 'required', "", "{$lang->custom->required}", '', "class='btn btn-link' id='requiredTab'");
}
foreach($lang->custom->system as $sysObject)
{
+ if($sysObject == 'required') continue;
common::printLink('custom', $sysObject, "", "{$lang->custom->$sysObject}", '', "class='btn btn-link' id='{$sysObject}Tab'");
}
if((isset($config->systemMode) and $config->systemMode == 'classic') || (isset($config->global->upgradeStep) and $config->global->upgradeStep == 'mergeProgram'))