From 0da4982f3da4cc98dc743857572aa069dea3013a Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 23 Nov 2016 16:47:47 +0800 Subject: [PATCH 1/5] * finish task #2755. --- www/js/my.full.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/js/my.full.js b/www/js/my.full.js index 03abe37299..a722c44534 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -1710,6 +1710,7 @@ function initHotKey() function initHelpLink() { var zentaoUrl = 'http://www.zentao.net/book/zentaopmshelp.html?fullScreen=zentao'; + if(config.clientLang == 'en') zentaoUrl = 'http://www.zentao.pm/book/zentaomanual/8.html?fullScreen=zentao'; var $mainNav = $('#mainmenu > .nav').first(); var showLoadingError; var timeout = 10000; From a30a1b7b3559ec8a92f31093adc029c5d8df3762 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 23 Nov 2016 16:49:43 +0800 Subject: [PATCH 2/5] * code for task #2751. --- module/project/css/tree.css | 16 ++++++++-------- module/project/view/tree.html.php | 25 +++++++++++++------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/module/project/css/tree.css b/module/project/css/tree.css index 9f51ba4fa7..e6e474c16f 100644 --- a/module/project/css/tree.css +++ b/module/project/css/tree.css @@ -1,23 +1,23 @@ -.no-padding {padding: 0!important;} + .no-padding {padding: 0!important;} +.label-story {font-size: 12px; background-color: #F5EEFF; border: 1px solid #F5EEFF; color: #8666B8; display: inline-block; padding: 0 2px; line-height: 16px; margin-right: 5px; position: relative; top: -1px} +.tree-item-id {font-size: 12px; display: inline-block; line-height: 16px; border: 1px solid #aaa; color: #808080; margin-right: 5px; border-radius: 1px; padding: 0 3px; min-width: 20px; text-align: center;} #projectTree {margin-bottom: 0} #projectTree > .tree-action-item {display: none!important} #projectTree li > .tree-item-wrapper > .tree-toggle {display: block} #projectTree li > .tree-item-wrapper:hover {background-color: #edf3fe; cursor: pointer; margin-left: -20px; padding-left: 20px;} -#projectTree li {line-height: 30px; padding-top: 0; padding-bottom: 0} +#projectTree li {line-height: 24px; padding-top: 0; padding-bottom: 0} #projectTree > li.open > .tree-item-wrapper {border-bottom: none} #projectTree.tree li.has-list.open > ul:after {top: -10px; bottom: 17px; display: none} -#projectTree.tree ul > li.has-list:after {top: 14px} -#projectTree.tree ul > li:after {top: 13px} +#projectTree.tree ul > li:after {top: 11px} #projectTree.tree ul > li:before {display: block; content: ' '; border: none; border-left: 1px dotted #999; top: -11px; bottom: 12px; left: -11px; position: absolute; width: auto; height: auto} -#projectTree.tree ul > li:last-child:before {bottom: auto; height: 25px} -#projectTree.tree ul > li > .tree-item-wrapper:before {display: block; content: ' '; position: absolute; width: 7px; height: 7px; top: 10px; left: 8px; background-color: #ddd} +#projectTree.tree ul > li:last-child:before {bottom: auto; height: 23px} +#projectTree.tree ul > li > .tree-item-wrapper:before {display: none} #projectTree.tree ul > li.has-list > .tree-item-wrapper:before {display: none;} #projectTree.tree ul > li.item-type-task > .tree-item-wrapper {padding-left: 15px; margin-left: -15px;} #projectTree.tree ul > li.item-type-task > .tree-item-wrapper:hover {background-color: #edf3fe} -#projectTree.tree ul > li.item-type-task > .tree-item-wrapper:before {left: 0; z-index: 2} -#projectTree.tree li>.list-toggle {top: 2px} +#projectTree.tree li>.list-toggle {top: -1px} #projectTree.tree li:before {display: none} #projectTree .item-type-story > ul > li {padding-left: 10px;} #projectTree .item-type-tasks > .tree-item-wrapper:hover {background-color: #f5f5f5} diff --git a/module/project/view/tree.html.php b/module/project/view/tree.html.php index b37a1e65e8..6e8b138c74 100644 --- a/module/project/view/tree.html.php +++ b/module/project/view/tree.html.php @@ -83,27 +83,28 @@ $(function() itemCreator: function($li, item) { $li.toggleClass('tree-toggle', item.type !== 'task' && item.type !== 'story').closest('li').addClass('item-type-' + item.type); + var $wrapper = $li.children('.tree-item-wrapper'); if(item.type === 'product') { - $li.append($(' ' + item.title + '')); + $wrapper.addClass('tree-toggle').append($(' ' + item.title + '')); } else if(item.type === 'story') - { - $li.append('story->common ?>#' + item.storyId + ' ').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); + { + $wrapper.append('' + item.storyId + ' story->common ?>').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); if(item.children && item.children.length) { - if(item.tasksCount) $li.append(' ' + item.tasksCount + ''); + if(item.tasksCount) $wrapper.append(' ' + item.tasksCount + ''); } } else if(item.type === 'task') { - $li.append('#' + item.id + ' ').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); - if(item.assignedTo) $li.append($('').html(item.assignedTo ? (' ' + item.assignedTo) : '')); + $wrapper.append('' + item.id + ' ').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); + if(item.assignedTo) $wrapper.append($('').html(item.assignedTo ? (' ' + item.assignedTo) : '')); var $info = $('
'); $info.append($('
').addClass('status-' + item.status).text(statusMap[item.status])); $info.append($('
').text(hoursFormat.replace('%s', item.estimate).replace('%s', item.consumed).replace('%s', item.left))); $info.append($('
').html(item.buttons)); - $li.append($info); + $wrapper.append($info); } else if(item.type === 'tasks') { @@ -122,17 +123,17 @@ $(function() $tr.append($('').html(task.buttons)); $tbody.append($tr); }); - $li.append($table); + $wrapper.append($table); } } else if(item.type === 'unlinkStory') { - $li.append($(' ' + item.title + '')); - if(item.tasksCount) $li.append(' ' + item.tasksCount + ''); + $wrapper.append($(' ' + item.title + '')); + if(item.tasksCount) $wrapper.append(' ' + item.tasksCount + ''); } else { - $li.append($(' ' + (item.title || item.name) + '')); + $wrapper.addClass('tree-toggle').append($(' ' + (item.title || item.name) + '')); } } }); @@ -158,7 +159,7 @@ $(function() tree.collapse(); tree.show($('.item-type-tasks, .item-type-task').parent().parent()); } - if(level === 'product') tree.collapse(); + if(level === 'product' || level === 'root') tree.collapse(); else if(level === 'module') { tree.collapse(); From c2a4699d5cc06c2a607ea7bec60ba615d16dab69 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 23 Nov 2016 17:03:28 +0800 Subject: [PATCH 3/5] * improve project task tree UI. --- module/project/css/tree.css | 4 ++-- module/project/view/tree.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/project/css/tree.css b/module/project/css/tree.css index e6e474c16f..080e1dd2c8 100644 --- a/module/project/css/tree.css +++ b/module/project/css/tree.css @@ -1,7 +1,7 @@ .no-padding {padding: 0!important;} -.label-story {font-size: 12px; background-color: #F5EEFF; border: 1px solid #F5EEFF; color: #8666B8; display: inline-block; padding: 0 2px; line-height: 16px; margin-right: 5px; position: relative; top: -1px} -.tree-item-id {font-size: 12px; display: inline-block; line-height: 16px; border: 1px solid #aaa; color: #808080; margin-right: 5px; border-radius: 1px; padding: 0 3px; min-width: 20px; text-align: center;} +.label-story {font-size: 12px; background-color: #8666B8; border: 1px solid #8666B8; color: #fff; display: inline-block; padding: 0 2px; line-height: 14px; position: relative; top: -1px; margin-right: 5px; opacity: .8} +.tree-item-id {font-size: 12px; display: inline-block; line-height: 14px; border: 1px solid #bbb; color: #808080; margin-right: 5px; border-radius: 1px; padding: 0 3px; min-width: 16px; text-align: center; background-color: #fff;} #projectTree {margin-bottom: 0} #projectTree > .tree-action-item {display: none!important} diff --git a/module/project/view/tree.html.php b/module/project/view/tree.html.php index 6e8b138c74..97ce0619cf 100644 --- a/module/project/view/tree.html.php +++ b/module/project/view/tree.html.php @@ -90,7 +90,7 @@ $(function() } else if(item.type === 'story') { - $wrapper.append('' + item.storyId + ' story->common ?>').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); + $wrapper.append('story->common ?> #' + item.storyId + '').append($('').attr({href: item.url}).text(item.title).css('color', item.color)); if(item.children && item.children.length) { if(item.tasksCount) $wrapper.append(' ' + item.tasksCount + ''); From 842f2c8c200ffee494ab02d7f4672b04a367af0f Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Wed, 23 Nov 2016 17:06:28 +0800 Subject: [PATCH 4/5] * finish task #2724. --- module/file/lang/en.php | 1 + module/file/lang/zh-cn.php | 1 + module/file/view/printfiles.html.php | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/file/lang/en.php b/module/file/lang/en.php index db8639f128..6fa9f56c47 100644 --- a/module/file/lang/en.php +++ b/module/file/lang/en.php @@ -13,6 +13,7 @@ $lang->file = new stdclass(); $lang->file->common = 'Attachment'; $lang->file->uploadImages = 'Batch Upload Images'; $lang->file->download = 'Download Files'; +$lang->file->uploadDate = 'UploadDate:'; $lang->file->edit = 'Rename'; $lang->file->inputFileName = 'Enter a File Name'; $lang->file->delete = 'Delete File'; diff --git a/module/file/lang/zh-cn.php b/module/file/lang/zh-cn.php index 992b229e9d..15c7908b0f 100644 --- a/module/file/lang/zh-cn.php +++ b/module/file/lang/zh-cn.php @@ -13,6 +13,7 @@ $lang->file = new stdclass(); $lang->file->common = '附件'; $lang->file->uploadImages = '多图上传'; $lang->file->download = '下载附件'; +$lang->file->uploadDate = '上传时间:'; $lang->file->edit = '重命名'; $lang->file->inputFileName = '请输入附件名称'; $lang->file->delete = '删除附件'; diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index 128947b915..fbe5cc9ec5 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -34,7 +34,8 @@ function downloadFile(fileID) { if(common::hasPriv('file', 'download')) { - $fileTitle = "
  •  " . $file->title .'.' . $file->extension; + $uploadDate = $lang->file->uploadDate . $file->addedDate; + $fileTitle = "
  •  " . $file->title .'.' . $file->extension; echo html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle, '_blank', "onclick='return downloadFile($file->id)'"); /* Show size info. */ From 266727b2fb8004b8dba621c83d0f0e76b337fc17 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Thu, 24 Nov 2016 09:06:29 +0800 Subject: [PATCH 5/5] * add deleted field to zt_module table. --- db/update8.3.1.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/update8.3.1.sql b/db/update8.3.1.sql index 90e1a20756..6e6ec18aa4 100644 --- a/db/update8.3.1.sql +++ b/db/update8.3.1.sql @@ -1 +1,2 @@ ALTER TABLE `zt_branch` ADD `order` smallint unsigned NOT NULL AFTER `name`; +ALTER TABLE `zt_module` ADD `deleted` enum('0','1') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0';