@@ -2,26 +2,27 @@
|
||||
|
||||
|
||||
#projectTree {margin-bottom: 0}
|
||||
#projectTree .tree-item-id {display: inline-block; font-size: 12px; border: 1px solid #aaa; line-height: 14px; color: #666; padding: 0 2px; margin-right: 5px; min-width: 16px; text-align: center; border-radius: 1px;}
|
||||
#projectTree .label-story {line-height: 14px; padding: 0 2px; font-size: 12px; display: inline-flex; margin-right: 5px; position: relative; top: -1px; background: #8666b8; color: #fff; border: 1px solid #8666b8; border-radius: 1px;}
|
||||
#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: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.has-list:after {top: 10px}
|
||||
#projectTree.tree ul > li:after {top: 11px}
|
||||
#projectTree.tree ul > li:before {display: block; content: ' '; border: none; border-left: 1px dotted #999; top: -8px; bottom: 9px; left: -11px; position: absolute; width: auto; height: auto}
|
||||
#projectTree.tree ul > li:last-child:before {bottom: auto; height: 19px}
|
||||
#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: -2px}
|
||||
#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}
|
||||
#projectTree .task-pri {position: relative; top: -1px}
|
||||
#projectTree .task-assignto {display: inline-block; margin-left: 10px; color: #808080}
|
||||
#projectTree .task-info {display: none;}
|
||||
#projectTree .task-info > div {display: inline-block; margin: 0 5px;}
|
||||
|
||||
@@ -261,5 +261,6 @@ $lang->project->featureBar['task']['needconfirm'] = 'Story Changed';
|
||||
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
|
||||
|
||||
$lang->project->treeLevel = array();
|
||||
$lang->project->treeLevel['root'] = 'Root';
|
||||
$lang->project->treeLevel['story'] = 'Show Story';
|
||||
$lang->project->treeLevel['task'] = 'Show Task';
|
||||
|
||||
@@ -261,5 +261,6 @@ $lang->project->featureBar['task']['needconfirm'] = '需求变动';
|
||||
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
|
||||
|
||||
$lang->project->treeLevel = array();
|
||||
$lang->project->treeLevel['root'] = '全部折叠';
|
||||
$lang->project->treeLevel['story'] = '显示需求';
|
||||
$lang->project->treeLevel['task'] = '显示任务';
|
||||
|
||||
@@ -86,27 +86,28 @@ $(function()
|
||||
itemCreator: function($li, item)
|
||||
{
|
||||
$li.toggleClass('tree-toggle', item.type !== 'task' && item.type !== 'story').closest('li').addClass('item-type-' + item.type);
|
||||
var $liWrapper = $li.find('.tree-item-wrapper');
|
||||
if(item.type === 'product')
|
||||
{
|
||||
$li.append($('<span><i class="icon icon-cube text-muted"></i> ' + item.title + '</span>'));
|
||||
$liWrapper.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));
|
||||
$liWrapper.append('<span class="tree-item-id">' + item.storyId + ' </span><span class="label label-story"><?php echo $lang->story->common ?></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) $liWrapper.append(' <span class="label label-task-count label-badge">' + item.tasksCount + '</span>');
|
||||
}
|
||||
}
|
||||
else if(item.type === 'task')
|
||||
{
|
||||
$li.append('<span class="task-pri pri' + item.pri + '">' + (item.pri || '') + '</span> <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) : ''));
|
||||
$liWrapper.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) $liWrapper.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);
|
||||
$liWrapper.append($info);
|
||||
}
|
||||
else if(item.type === 'tasks')
|
||||
{
|
||||
@@ -125,7 +126,7 @@ $(function()
|
||||
$tr.append($('<td class="td-extra" width="150"/>').html(task.buttons));
|
||||
$tbody.append($tr);
|
||||
});
|
||||
$li.append($table);
|
||||
$liWrapper.append($table);
|
||||
}
|
||||
}
|
||||
else if(item.type === 'unlinkStory')
|
||||
@@ -135,8 +136,16 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$li.append($('<span class="tree-toggle"><i class="icon icon-bookmark-empty text-muted"></i> ' + (item.title || item.name) + '</span>'));
|
||||
if(item.type === 'module' && (!item.children || !item.children.length))
|
||||
{
|
||||
$li.remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
$li.append($('<span class="tree-toggle"><i class="icon icon-bookmark-empty text-muted"></i> ' + (item.title || item.name) + '</span>'));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -161,7 +170,7 @@ $(function()
|
||||
tree.collapse();
|
||||
tree.show($('.item-type-tasks, .item-type-task').parent().parent());
|
||||
}
|
||||
if(level === 'product') tree.collapse();
|
||||
if(level === 'root') tree.collapse();
|
||||
else if(level === 'module')
|
||||
{
|
||||
tree.collapse();
|
||||
|
||||
Reference in New Issue
Block a user