Merge branch 'sprint/168' into 'sprint/168_liyuchun_43982'
# Conflicts: # module/kanban/lang/en.php # module/kanban/lang/zh-cn.php
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
.addbtn {padding-top: 22px; height: 63px; border: 1px dashed #ddd; width: 60px;}
|
||||
.addbtn .icon-plus {font-size: 18px; display: block; opacity: 0.5; transition: opacity .2s; text-shadow: 1px 1px 3px rgba(0,0,0,.2);}
|
||||
.addbtn:hover .icon-plus {opacity: .9; animation: flash-icon 1s linear alternate infinite;}
|
||||
#subHeader #dropMenu {min-width: 250px; box-sizing: inhert; max-height: inherit;}
|
||||
#subHeader #dropMenu {min-width: 250px; box-sizing: inherit; max-height: inherit;}
|
||||
#subHeader #dropMenu .table-col .list-group {padding-top: 10px;}
|
||||
.main-col .block-files .panel-heading {padding-right: 20px;}
|
||||
.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;}
|
||||
@@ -42,5 +42,14 @@
|
||||
.title {font-size: 20px !important;}
|
||||
.article-content.comment {width: 100% !important;}
|
||||
|
||||
.tree-group .tree-actions{display: none}
|
||||
.tree-group:hover .tree-actions{display: inline}
|
||||
#custom, .tree {overflow: visible}
|
||||
.tree li>.list-toggle {left: -4px; top: 0;}
|
||||
.tree-group {position: relative;}
|
||||
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
|
||||
.tree-group .treeActions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;}
|
||||
.tree-group:hover > .module-name {width: calc(100% - 84px);}
|
||||
.tree-group:hover .treeActions {display: block}
|
||||
.tree-group .treeActions > .dropdown {display: inline-block;}
|
||||
.tree-group .dropdown-menu {position: absolute; right: 0; left: auto; margin-top: -2px;}
|
||||
.tree-group .dropdown-menu > li > a {max-width: 100%; color: #3c4353!important; font-weight: normal!important;}
|
||||
.tree-group .dropdown-menu > li > a:hover {color: #fff !important;}
|
||||
|
||||
+6
-12
@@ -2373,8 +2373,9 @@ EOT;
|
||||
if($currentMethod == 'objectlibs')
|
||||
{
|
||||
$treeMenu[$module->id] .= "<div class='tree-group'><span class='module-name'>" . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> " . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'") . '</span>';
|
||||
$treeMenu[$module->id] .= "<div class='tree-actions pull-right'>";
|
||||
$treeMenu[$module->id] .= "<div class='treeActions'>";
|
||||
$treeMenu[$module->id] .= html::a(helper::createLink('doc', 'edit', "docID=$docID&comment=false&objectType=$type&objectID=$objectID&libID=$libID"), "<i class='icon icon-edit'></i>", '', "title={$this->lang->doc->edit}");
|
||||
$treeMenu[$module->id] .= '<div class="dropdown dropdown-hover">';
|
||||
$treeMenu[$module->id] .= "<a class='tree-action' href='javascript:;' data-toggle='dropdown'><i class='icon icon-plus'></i></a>";
|
||||
$treeMenu[$module->id] .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->typeList as $typeKey => $typeName)
|
||||
@@ -2387,12 +2388,8 @@ EOT;
|
||||
if($typeKey == 'url') $treeMenu[$module->id] .= '<li class="divider"></li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
$treeMenu[$module->id] .= '<li class="divider"></li>';
|
||||
$treeMenu[$module->id] .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
|
||||
}
|
||||
$treeMenu[$module->id] .= "</ul>";
|
||||
$treeMenu[$module->id] .= "</div>";
|
||||
$treeMenu[$module->id] .= "<a class='sort-handler tree-action' href='javascript:;' data-type='sort' title={$this->lang->tree->dragAndSort}><i class='icon icon-move'></i></a>";
|
||||
$treeMenu[$module->id] .= '</div></div>';
|
||||
}
|
||||
@@ -2419,9 +2416,10 @@ EOT;
|
||||
else
|
||||
{
|
||||
$li = "<div class='tree-group'><span class='module-name'><a title='{$module->name}'>" . $module->name . '</a></span>';
|
||||
$li .= "<div class='tree-actions pull-right'>";
|
||||
$li .= "<div class='treeActions'>";
|
||||
$li .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "<i class='icon icon-edit'></i>", '', "data-toggle='modal' title={$this->lang->doc->editType}");
|
||||
$li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "<i class='icon icon-split'></i>", '', "class='iframe' title={$this->lang->doc->editType}");
|
||||
$li .='<div class="dropdown dropdown-hover">';
|
||||
$li .= "<a class='tree-action' href='javascript:;' data-toggle='dropdown'><i class='icon icon-plus'></i></a>";
|
||||
$li .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->typeList as $typeKey => $typeName)
|
||||
@@ -2434,12 +2432,8 @@ EOT;
|
||||
if($typeKey == 'url') $li .= '<li class="divider"></li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
$li .= '<li class="divider"></li>';
|
||||
$li .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
|
||||
}
|
||||
$li .= "</ul>";
|
||||
$li .= '</div>';
|
||||
$li .= "<a class='sort-handler tree-action' href='javascript:;' data-type='sort' title={$this->lang->tree->dragAndSort}><i class='icon icon-move'></i></a>";
|
||||
$li .= '</div></div>';
|
||||
}
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
#kanbans .kanban-lane {min-height: 150px;}
|
||||
#kanbans .kanban-affixed > .kanban-header {top: 100px;}
|
||||
|
||||
#type_chosen .icon-kanban {padding-right: 10px; font-size: 15px;}
|
||||
|
||||
.dropdown-menu a {text-align: left;}
|
||||
.scrollbar-hover {max-height: 2000px; overflow: scroll !important;}
|
||||
.c-type, .c-group {width: 150px !important; overflow: unset;}
|
||||
.c-type {width: 150px !important; overflow: unset;}
|
||||
.c-group {width: 190px !important; overflow: unset;}
|
||||
.c-type {margin-left: 0px !important;}
|
||||
|
||||
@@ -11,25 +11,32 @@ function changeView(view)
|
||||
*/
|
||||
function renderUserAvatar(user, objectType, objectID)
|
||||
{
|
||||
var $noPrivAndNoAssigned = $('<div class="avatar has-text avatar-sm avatar-circle" title="' + noAssigned + '" style="background: #ccc"><i class="icon icon-account"></i></div>');
|
||||
if(objectType == 'task')
|
||||
{
|
||||
if(!priv.canAssignTask && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID, '', true);
|
||||
}
|
||||
if(objectType == 'story')
|
||||
{
|
||||
if(!priv.canAssignStory && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('story', 'assignto', 'id=' + objectID, '', true);
|
||||
}
|
||||
if(objectType == 'bug')
|
||||
{
|
||||
if(!priv.canAssignBug && !user) return $noPrivAndNoAssigned;
|
||||
var link = createLink('bug', 'assignto', 'id=' + objectID, '', true);
|
||||
}
|
||||
|
||||
if(!user) return $('<a class="avatar has-text avatar-sm avatar-circle iframe" title="' + noAssigned + '" style="background: #ccc" href="' + link + '"><i class="icon icon-account"></i></a>');
|
||||
|
||||
if(typeof user === 'string') user = {account: user};
|
||||
if(!user.avatar && window.userList && window.userList[user.account]) user = window.userList[user.account];
|
||||
|
||||
var $noPrivAvatar = $('<div class="avatar has-text avatar-sm avatar-circle" />').avatar({user: user});
|
||||
if(objectType == 'task')
|
||||
{
|
||||
if(!priv.canAssignTask) return $noPrivAvatar;
|
||||
var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID, '', true);
|
||||
}
|
||||
else if(objectType == 'story')
|
||||
{
|
||||
if(!priv.canAssignStory) return $noPrivAvatar;
|
||||
var link = createLink('story', 'assignto', 'id=' + objectID, '', true);
|
||||
}
|
||||
else if(objectType == 'bug')
|
||||
{
|
||||
if(!priv.canAssignBug) return $noPrivAvatar;
|
||||
var link = createLink('bug', 'assignto', 'id=' + objectID, '', true);
|
||||
}
|
||||
if(objectType == 'task' && !priv.canAssignTask) return $noPrivAvatar;
|
||||
if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar;
|
||||
if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar;
|
||||
|
||||
return $('<a class="avatar has-text avatar-sm avatar-circle iframe" href="' + link + '"/>').avatar({user: user});
|
||||
}
|
||||
@@ -84,7 +91,7 @@ function renderStoryItem(item, $item, col)
|
||||
'<span class="info info-pri label-pri label-pri-' + item.pri + '" title="' + item.pri + '">' + item.pri + '</span>',
|
||||
item.estimate ? '<span class="info info-estimate text-muted">' + item.estimate + 'h</span>' : '',
|
||||
].join(''));
|
||||
if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'story', item.id));
|
||||
$infos.append(renderUserAvatar(item.assignedTo, 'story', item.id));
|
||||
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus.length)
|
||||
@@ -133,7 +140,7 @@ function renderBugItem(item, $item, col)
|
||||
'<span class="info info-pri label-pri label-pri-' + item.pri + '" title="' + item.pri + '">' + item.pri + '</span>',
|
||||
].join(''));
|
||||
if(item.deadline) $infos.append(renderDeadline(item.deadline));
|
||||
if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'bug', item.id));
|
||||
$infos.append(renderUserAvatar(item.assignedTo, 'bug', item.id));
|
||||
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus.length)
|
||||
@@ -182,7 +189,7 @@ function renderTaskItem(item, $item, col)
|
||||
item.estimate ? '<span class="info info-estimate text-muted">' + item.estimate + 'h</span>' : '',
|
||||
].join(''));
|
||||
if(item.deadline) $infos.append(renderDeadline(item.deadline));
|
||||
if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'task', item.id));
|
||||
$infos.append(renderUserAvatar(item.assignedTo, 'task', item.id));
|
||||
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus.length)
|
||||
@@ -756,6 +763,9 @@ $(function()
|
||||
location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID + '&productID=0&fromMethod=kanban');
|
||||
}
|
||||
})
|
||||
|
||||
$('#type_chosen .chosen-single span').prepend('<i class="icon-kanban"></i>');
|
||||
$('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': ');
|
||||
});
|
||||
|
||||
$('#type').change(function()
|
||||
|
||||
@@ -150,5 +150,6 @@ js::set('priv',
|
||||
<?php js::set('sortColumn', $lang->execution->sortColumn);?>
|
||||
<?php js::set('kanbanLang', $lang->kanban);?>
|
||||
<?php js::set('deadlineLang', $lang->task->deadlineAB);?>
|
||||
<?php js::set('noAssigned', $lang->task->noAssigned);?>
|
||||
<?php js::set('userList', $userList);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1793,6 +1793,7 @@ class story extends control
|
||||
}
|
||||
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
if(empty($stories)) $stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, 0, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
|
||||
|
||||
$storyID = isset($stories[$storyID]) ? $storyID : 0;
|
||||
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");
|
||||
|
||||
Reference in New Issue
Block a user