Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2016-11-24 11:16:38 +08:00
7 changed files with 27 additions and 21 deletions
+1
View File
@@ -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';
+1
View File
@@ -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';
+1
View File
@@ -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 = '删除附件';
+2 -1
View File
@@ -34,7 +34,8 @@ function downloadFile(fileID)
{
if(common::hasPriv('file', 'download'))
{
$fileTitle = "<li class='list-group-item'><i class='icon-file-text text-muted icon'></i> &nbsp;" . $file->title .'.' . $file->extension;
$uploadDate = $lang->file->uploadDate . $file->addedDate;
$fileTitle = "<li title={$uploadDate} class='list-group-item'><i class='icon-file-text text-muted icon'></i> &nbsp;" . $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. */
+8 -8
View File
@@ -1,23 +1,23 @@
.no-padding {padding: 0!important;}
.no-padding {padding: 0!important;}
.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}
#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}
+13 -12
View File
@@ -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($('<span><i class="icon icon-cube text-muted"></i> ' + item.title + '</span>'));
$wrapper.addClass('tree-toggle').append($('<span><i class="icon icon-cube text-muted"></i> ' + item.title + '</span>'));
}
else if(item.type === 'story')
{
$li.append('<span class="text-muted"><?php echo $lang->story->common ?>#' + item.storyId + ' </span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
{
$wrapper.append('<span class="label label-story"><?php echo $lang->story->common ?> #' + item.storyId + '</span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
if(item.children && item.children.length)
{
if(item.tasksCount) $li.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
if(item.tasksCount) $wrapper.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
}
}
else if(item.type === 'task')
{
$li.append('<span class="text-muted">#' + item.id + ' </span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
if(item.assignedTo) $li.append($('<span class="task-assignto"/>').html(item.assignedTo ? ('<i class="icon icon-user text-muted"></i> ' + item.assignedTo) : ''));
$wrapper.append('<span class="tree-item-id">' + item.id + ' </span>').append($('<a>').attr({href: item.url}).text(item.title).css('color', item.color));
if(item.assignedTo) $wrapper.append($('<span class="task-assignto"/>').html(item.assignedTo ? ('<i class="icon icon-user text-muted"></i> ' + item.assignedTo) : ''));
var $info = $('<div class="task-info clearfix"/>');
$info.append($('<div/>').addClass('status-' + item.status).text(statusMap[item.status]));
$info.append($('<div/>').text(hoursFormat.replace('%s', item.estimate).replace('%s', item.consumed).replace('%s', item.left)));
$info.append($('<div class="buttons"/>').html(item.buttons));
$li.append($info);
$wrapper.append($info);
}
else if(item.type === 'tasks')
{
@@ -122,17 +123,17 @@ $(function()
$tr.append($('<td class="td-extra" width="150"/>').html(task.buttons));
$tbody.append($tr);
});
$li.append($table);
$wrapper.append($table);
}
}
else if(item.type === 'unlinkStory')
{
$li.append($('<span class="tree-item-title"><i class="icon icon-tasks text-muted"></i> ' + item.title + '</span>'));
if(item.tasksCount) $li.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
$wrapper.append($('<span class="tree-item-title"><i class="icon icon-tasks text-muted"></i> ' + item.title + '</span>'));
if(item.tasksCount) $wrapper.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
}
else
{
$li.append($('<span class="tree-toggle"><i class="icon icon-bookmark-empty text-muted"></i> ' + (item.title || item.name) + '</span>'));
$wrapper.addClass('tree-toggle').append($('<span><i class="icon icon-bookmark-empty text-muted"></i> ' + (item.title || item.name) + '</span>'));
}
}
});
@@ -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();
+1
View File
@@ -1714,6 +1714,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;