From 071f28d748eb4df62fd573ec28f3850ac1f8ab63 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 20 Nov 2019 16:17:41 +0800 Subject: [PATCH 01/10] * fix calculation error of plan end date. --- module/productplan/js/create.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/productplan/js/create.js b/module/productplan/js/create.js index 480f5822d2..802f61c961 100644 --- a/module/productplan/js/create.js +++ b/module/productplan/js/create.js @@ -22,21 +22,21 @@ function convertStringToDate(dateString) */ function computeEndDate(delta) { - beginDate = $('#begin').val(); + var beginDate = $('#begin').val(); if(!beginDate) return; - delta = parseInt(delta); + var delta = parseInt(delta); beginDate = convertStringToDate(beginDate); if((delta == 7 || delta == 14) && (beginDate.getDay() == 1)) { delta = (weekend == 2) ? (delta - 2) : (delta - 1); } - currentBeginDate = beginDate.toString('yyyy-MM-dd'); - endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); + var currentBeginDate = beginDate.toString('yyyy-MM-dd'); + var endDate = beginDate.addDays(delta - 1).toString('yyyy-MM-dd'); $('#begin').val(currentBeginDate); - $('#end').val(endDate); + $('#end').val(endDate).datetimepicker('update'); } $('#begin').on('change', function() From 2ded3de5f17cf9d77c5d80d562b7c54d1e0078c4 Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 20 Nov 2019 16:24:52 +0800 Subject: [PATCH 02/10] * Finish task #6562. --- module/upgrade/config.php | 25 ++++++++++++++++++++++ module/upgrade/model.php | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 535ca9a301..e4a3279710 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -23,5 +23,30 @@ $config->upgrade->bearychat['zh-tw'] = '倍洽'; $config->upgrade->bearychat['en'] = 'Bearychat'; $config->upgrade->bearychat['de'] = 'Bearychat'; +$config->upgrade->discardedBugTypes['de']['interface'] = 'UI Optimierung'; +$config->upgrade->discardedBugTypes['de']['newfeature'] = 'Neues Feature'; +$config->upgrade->discardedBugTypes['de']['designchange'] = 'Design Änderung'; +$config->upgrade->discardedBugTypes['de']['trackthings'] = 'Arbeit Verfolgen'; + +$config->upgrade->discardedBugTypes['en']['interface'] = 'Interface'; +$config->upgrade->discardedBugTypes['en']['designchange'] = 'DesignChange'; +$config->upgrade->discardedBugTypes['en']['newfeature'] = 'NewFeature'; +$config->upgrade->discardedBugTypes['en']['trackthings'] = 'Tracking'; + +$config->upgrade->discardedBugTypes['fr']['interface'] = 'Interface'; +$config->upgrade->discardedBugTypes['fr']['designchange'] = 'Design Change'; +$config->upgrade->discardedBugTypes['fr']['newfeature'] = 'Nouvelle fonctionnalité'; +$config->upgrade->discardedBugTypes['fr']['trackthings'] = 'Tracking'; + +$config->upgrade->discardedBugTypes['zh-cn']['interface'] = '界面优化'; +$config->upgrade->discardedBugTypes['zh-cn']['designchange'] = '设计变更'; +$config->upgrade->discardedBugTypes['zh-cn']['newfeature'] = "新增需求"; +$config->upgrade->discardedBugTypes['zh-cn']['trackthings'] = '事务跟踪'; + +$config->upgrade->discardedBugTypes['zh-tw']['interface'] = '界面優化'; +$config->upgrade->discardedBugTypes['zh-tw']['designchange'] = '設計變更'; +$config->upgrade->discardedBugTypes['zh-tw']['newfeature'] = "新增需求"; +$config->upgrade->discardedBugTypes['zh-tw']['trackthings'] = '事務跟蹤'; + $config->delete['10.6'][] = 'module/chat/ext/control/extensions.php'; $config->delete['10.6'][] = 'module/common/ext/model/xuanxuan.php'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index d8a845d234..4323f31353 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -3444,4 +3444,48 @@ class upgradeModel extends model public function appendExec($zentaoVersion) { } + + /** + * Fix bug typeList. + * + * @access public + * @return bool + */ + public function fixBugTypeList() + { + foreach($this->config->upgrade->discardedBugTypes as $langCode => $types) + { + $bugs = $this->dao->select('type')->from(TABLE_BUG)->where('type')->in(array_keys($types))->fetchAll('type'); + if(empty($bugs)) return true; + + $usedTypes = array_keys($bugs); + $customedTypeList = $this->dao->select('*')->from(TABLE_LANG) + ->where('lang')->in("$langCode,all") + ->andWhere('module')->eq('bug') + ->andWhere('section')->eq('typeList') + ->fetchPairs('`key`'); + + $typesToSave = array_diff($usedTypes, $customedTypeList); + + if(empty($typesToSave)) continue; + + $langs = array(); + foreach($typesToSave as $type) $langs[$type] = $types[$type]; + + if(empty($customedTypeList)) + { + $lang = new stdclass; + $lang->bug = new stdclass; + $lang->productCommon = ''; + $lang->projectCommon = ''; + $lang->more = ''; + $langFile = $this->app->getModuleRoot() . DS . 'bug' . DS . 'lang' . DS . $langCode . '.php'; + if(is_file($langFile)) include $langFile; + $langs = array_merge($lang->bug->typeList, $langs); + } + + foreach($langs as $type => $typeName) $this->loadModel('custom')->setItem("{$langCode}.bug.typeList.{$type}.1", $typeName); + } + return true; + } } From cfe53bf05dba39bc4c804e897548c77f4c7d9908 Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 20 Nov 2019 16:32:25 +0800 Subject: [PATCH 03/10] * Remove unused codes. --- module/bug/lang/de.php | 5 ----- module/bug/lang/en.php | 5 ----- module/bug/lang/fr.php | 5 ----- module/bug/lang/zh-cn.php | 5 ----- 4 files changed, 20 deletions(-) diff --git a/module/bug/lang/de.php b/module/bug/lang/de.php index 925182faff..9579ca4503 100644 --- a/module/bug/lang/de.php +++ b/module/bug/lang/de.php @@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'Script-Test'; $lang->bug->typeList['designdefect'] = 'Design Fehler'; $lang->bug->typeList['others'] = 'Andere'; -$lang->bug->discardedTypeList['interface'] = 'UI Optimierung'; -$lang->bug->discardedTypeList['newfeature'] = 'Neues Feature'; -$lang->bug->discardedTypeList['designchange'] = 'Design Änderung'; -$lang->bug->discardedTypeList['trackthings'] = 'Arbeit Verfolgen'; - $lang->bug->statusList[''] = ''; $lang->bug->statusList['active'] = 'Aktiv'; $lang->bug->statusList['resolved'] = 'Gelöst'; diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index c9ef66155f..a456adea72 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'TestScript'; $lang->bug->typeList['designdefect'] = 'DesignDefect'; $lang->bug->typeList['others'] = 'Others'; -$lang->bug->discardedTypeList['interface'] = 'Interface'; -$lang->bug->discardedTypeList['designchange'] = 'DesignChange'; -$lang->bug->discardedTypeList['newfeature'] = 'NewFeature'; -$lang->bug->discardedTypeList['trackthings'] = 'Tracking'; - $lang->bug->statusList[''] = ''; $lang->bug->statusList['active'] = 'Active'; $lang->bug->statusList['resolved'] = 'Resolved'; diff --git a/module/bug/lang/fr.php b/module/bug/lang/fr.php index c45fb871b2..697531b567 100644 --- a/module/bug/lang/fr.php +++ b/module/bug/lang/fr.php @@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = 'Script automatisation'; $lang->bug->typeList['designdefect'] = 'Erreur de Design'; $lang->bug->typeList['others'] = 'Autres'; -$lang->bug->discardedTypeList['interface'] = 'Interface'; -$lang->bug->discardedTypeList['designchange'] = 'Design Change'; -$lang->bug->discardedTypeList['newfeature'] = 'Nouvelle fonctionnalité'; -$lang->bug->discardedTypeList['trackthings'] = 'Tracking'; - $lang->bug->statusList[''] = ''; $lang->bug->statusList['active'] = 'Actif'; $lang->bug->statusList['resolved'] = 'Résolu'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 12d99ca3b1..23c5567546 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -252,11 +252,6 @@ $lang->bug->typeList['automation'] = '测试脚本'; $lang->bug->typeList['designdefect'] = '设计缺陷'; $lang->bug->typeList['others'] = '其他'; -$lang->bug->discardedTypeList['interface'] = '界面优化'; -$lang->bug->discardedTypeList['designchange'] = '设计变更'; -$lang->bug->discardedTypeList['newfeature'] = "新增{$lang->storyCommon}"; -$lang->bug->discardedTypeList['trackthings'] = '事务跟踪'; - $lang->bug->statusList[''] = ''; $lang->bug->statusList['active'] = '激活'; $lang->bug->statusList['resolved'] = '已解决'; From 31af2aaca0854ead4846621ba71d2c7acf646c56 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 20 Nov 2019 16:43:05 +0800 Subject: [PATCH 04/10] * fix bug #2804, finish task #6514, fix columns size of story kanban. --- module/project/js/storykanban.js | 42 ++++---------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/module/project/js/storykanban.js b/module/project/js/storykanban.js index d50761fca0..561b8a3be3 100644 --- a/module/project/js/storykanban.js +++ b/module/project/js/storykanban.js @@ -1,10 +1,8 @@ $(function() { - var boardID = ''; - var onlybody = config.requestType == 'GET' ? "&onlybody=yes" : "?onlybody=yes"; + var isFirefox = $.zui.browser.firefox; $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot}); var $kanban = $('#kanban'); - var kanbanModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width:800}); var stageMap = { @@ -18,34 +16,6 @@ $(function() } }; - // Get scrollbar width - var getScrollbarWidth = function () - { - var outer = document.createElement("div"); - outer.style.visibility = "hidden"; - outer.style.width = "100px"; - outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps - - document.body.appendChild(outer); - - var widthNoScroll = outer.offsetWidth; - // force scrollbars - outer.style.overflow = "scroll"; - - // add innerdiv - var inner = document.createElement("div"); - inner.style.width = "100%"; - outer.appendChild(inner); - - var widthWithScroll = inner.offsetWidth; - - // remove divs - outer.parentNode.removeChild(outer); - - return widthNoScroll - widthWithScroll; - }; - - var scrollbarWidth = getScrollbarWidth(); var fixBoardWidth = function() { var $table = $kanban.find('.table'); @@ -53,12 +23,12 @@ $(function() var $cBoards = $table.find('thead>tr>th.c-board:not(.c-side)'); var boardCount = $cBoards.length; var $cSide = $table.find('thead>tr>th.c-board.c-side'); - var totalWidth = kanbanWidth - scrollbarWidth; + var totalWidth = kanbanWidth; if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5); var cBoardWidth = Math.floor(totalWidth/boardCount) - 16; - $cBoards.not(':last').width(cBoardWidth); - $cBoards.first().width(cBoardWidth + 5); - $kanban.find('.boards > .board').width(cBoardWidth + 16 - 22); + + $cBoards.width(cBoardWidth); + $kanban.find('.boards > .board').width(cBoardWidth); }; fixBoardWidth(); $(window).on('resize', fixBoardWidth); @@ -70,12 +40,10 @@ $(function() if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth); }; - var lastOperation; var dropTo = function(id, from, to, type) { if(stageMap[type][from] && stageMap[type][from][to]) { - lastOperation = {id: id, from: from, to: to}; $.post(createLink(type, stageMap[type][from][to], 'stage=' + to), {'storyIDList[]':[id]}, function() { refresh(); From abc006a241d8c0dd4cd13ba74c756d2045d3f4b2 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 20 Nov 2019 16:44:19 +0800 Subject: [PATCH 05/10] * finish task #6564. --- tools/minifyfront.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/minifyfront.php b/tools/minifyfront.php index b10b7b59fd..8b8cdce4e1 100755 --- a/tools/minifyfront.php +++ b/tools/minifyfront.php @@ -21,7 +21,7 @@ $jsFiles[] = $jsRoot . 'my.full.js'; /* Combine these js files. */ $allJSFile = $jsRoot . 'all.js'; $jsCode = ''; -foreach($jsFiles as $jsFile) $jsCode .= "\n". file_get_contents($jsFile); +foreach($jsFiles as $jsFile) $jsCode .= "\n". str_replace('/*!', '/*', file_get_contents($jsFile)); file_put_contents($allJSFile, $jsCode); /* Compress it. */ @@ -33,16 +33,19 @@ file_put_contents($allJSFile, $jsCode); $themeRoot = $baseDir . '/www/theme/'; /* Iinclude config and lang file to get langs and themes. */ +$config = new stdclass(); include $baseDir . '/config/config.php'; + $lang = new stdclass(); $lang->productCommon = ''; $lang->projectCommon = ''; +$lang->storyCommon = ''; include $baseDir . '/module/common/lang/zh-cn.php'; $langs = array_keys($config->langs); $themes = array_keys($lang->themes); /* Create css files for every them and every lang. */ -$zuiCode = str_replace('../fonts', '../zui/fonts', file_get_contents($themeRoot . 'zui/css/min.css')); +$zuiCode = str_replace(array('/*!', '../fonts'), array('/*', '../zui/fonts'), file_get_contents($themeRoot . 'zui/css/min.css')); foreach($langs as $lang) { foreach($themes as $theme) From c43dfdad099c99a5540f0b4d4dcb1336bc8c5797 Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 20 Nov 2019 16:57:54 +0800 Subject: [PATCH 06/10] * Add concept menu. --- module/custom/lang/zh-cn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 34623f1b36..b5f554ddbc 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -79,7 +79,7 @@ $lang->custom->user->fields['statusList'] = '状态'; $lang->custom->user->fields['contactField'] = '可用联系方式'; $lang->custom->user->fields['deleted'] = '列出已删除用户'; -$lang->custom->system = array('flow', 'working', 'required', 'score'); +$lang->custom->system = array('concept', 'flow', 'working', 'required', 'score'); $lang->custom->block->fields['closed'] = '关闭的区块'; From 4c9b1d2d4daf1d0b349628568bffa06826cdb72b Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 20 Nov 2019 16:59:23 +0800 Subject: [PATCH 07/10] * Fix style of concept page. --- module/custom/view/concept.html.php | 53 +++++++++++++++-------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/module/custom/view/concept.html.php b/module/custom/view/concept.html.php index 20c2533d16..371fb4be94 100644 --- a/module/custom/view/concept.html.php +++ b/module/custom/view/concept.html.php @@ -8,46 +8,49 @@ * @package ZenTaoPMS * @version $Id: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $ */ -include '../../common/view/header.lite.html.php'; ?> config->conceptSetted):?> - + +config->conceptSetted):?> +
+
+
+ custom->concept?> +
+
+
- - +
-