Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/244_wzm_70007
This commit is contained in:
@@ -575,7 +575,7 @@ class actionModel extends model
|
||||
if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff);
|
||||
}
|
||||
}
|
||||
elseif($actionName == 'linkstory' or $actionName == 'unlinkstory')
|
||||
elseif(strpos('linkstory,unlinkstory,createchildrenstory', $actionName) !== false)
|
||||
{
|
||||
$extra = '';
|
||||
foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id ") . ', ' : "#$id, ";
|
||||
|
||||
@@ -1324,9 +1324,9 @@ function createStoryMenu(options)
|
||||
var showAction = story.$col.type == 'backlog' || story.$col.type == 'ready' || story.$col.type == 'developing' || story.$col.type == 'developed' || story.$col.type == 'testing' || story.$col.type == 'tested' || story.$col.type == 'verified' || story.$col.type == 'released';
|
||||
|
||||
if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id + '&kanbanGroup=' + groupBy, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}});
|
||||
if(priv.canChangeStory && showAction) items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask && showAction) items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canBatchCreateTask && showAction) items.push({label: executionLang.batchWBS, icon: 'pluses', url: createLink('task', 'batchCreate', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canChangeStory && showAction && story.status == 'active') items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask && showAction && story.status == 'active') items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canBatchCreateTask && showAction && story.status == 'active') items.push({label: executionLang.batchWBS, icon: 'pluses', url: createLink('task', 'batchCreate', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canActivateStory && story.$col.type == 'closed') items.push({label: executionLang.activate, icon: 'magic', url: createLink('story', 'activate', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canUnlinkStory) items.push({label: executionLang.unlinkStory, icon: 'unlink', url: createLink('execution', 'unlinkStory', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'false'), attrs: {target: 'hiddenwin'}});
|
||||
if(priv.canDeleteStory) items.push({label: storyLang.delete, icon: 'trash', onClick: function(){deleteCard('story', story.id, story.$lane.region)}});
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->testcase->openedByAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
|
||||
<th class='c-date'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
|
||||
<th class='c-result'><?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-actions-6 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -75,10 +75,6 @@
|
||||
<td class='c-title text-left' title="<?php echo $case->title?>"><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-app='{$this->app->tab}'");?></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td><?php echo zget($lang->testcase->typeList, $case->type);?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo substr($case->lastRunDate, 5, 11);?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($case->needconfirm)
|
||||
@@ -95,6 +91,10 @@
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo substr($case->lastRunDate, 5, 11);?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$case->browseType = $type;
|
||||
|
||||
@@ -1446,7 +1446,6 @@ $(function()
|
||||
{
|
||||
initKanban($(this));
|
||||
});
|
||||
initRegionTabs();
|
||||
|
||||
if(navigator.userAgent.toLowerCase().indexOf("qqbrowser") > -1) $('.region .kanban-header-col > .actions').css('top', '30%');
|
||||
|
||||
@@ -1560,6 +1559,7 @@ $(function()
|
||||
|
||||
distance = 0;
|
||||
radiusWidth = 10;
|
||||
initRegionTabs();
|
||||
|
||||
$('.leftBtn').click(function()
|
||||
{
|
||||
|
||||
@@ -1366,12 +1366,12 @@ class kanbanModel extends model
|
||||
$cardData['openedDate'] = $object->openedDate;
|
||||
$cardData['closedDate'] = $object->closedDate;
|
||||
$cardData['lastEditedDate'] = $object->lastEditedDate;
|
||||
$cardData['status'] = $object->status;
|
||||
|
||||
if($cell->type == 'task')
|
||||
{
|
||||
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
|
||||
$cardData['name'] = $object->name;
|
||||
$cardData['status'] = $object->status;
|
||||
$cardData['left'] = $object->left;
|
||||
$cardData['estStarted'] = $object->estStarted;
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ EOF;
|
||||
{
|
||||
$this->loadModel('story');
|
||||
/* Save session. */
|
||||
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'my');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -394,7 +394,7 @@ EOF;
|
||||
{
|
||||
/* Save session. */
|
||||
$this->loadModel('story');
|
||||
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
if($this->app->viewType != 'json') $this->session->set('storyList', $this->app->getURI(true), 'my');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
|
||||
@@ -113,7 +113,9 @@
|
||||
{
|
||||
echo common::buildIconButton('story', 'review', "$vars&from=product&storyType=requirement", $story, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
echo common::buildIconButton('story', 'recall', "$vars&from=list&storyType=requirement", $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
echo common::buildIconButton('story', 'recall', "$vars&from=list&confirm=no&storyType=requirement", $story, 'list', 'undo', 'hiddenwin', '', '', '', $title);
|
||||
echo common::buildIconButton('story', 'edit', "$vars&from=default&storyType=requirement", $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$storyType = 'storyType=requirement';
|
||||
@@ -175,7 +177,8 @@
|
||||
common::printIcon('story', 'review', "$vars&from=product&storyType=story", $child, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
|
||||
common::printIcon('story', 'recall', "$vars&from=list&storyType=story", $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
$title = $child->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
common::printIcon('story', 'recall', "$vars&from=list&confirm=no&storyType=story", $child, 'list', 'undo', 'hiddenwin', '', '', '', $title);
|
||||
common::printIcon('story', 'edit', "$vars&from=default&storyType=story", $child, 'list');
|
||||
$storyType = 'storyType=story';
|
||||
$canChange = common::hasPriv('story', 'change', '', $storyType);
|
||||
|
||||
@@ -120,7 +120,8 @@
|
||||
echo common::buildIconButton('story', 'review', $vars, $story, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
|
||||
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
$title = $story->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $title);
|
||||
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$canSubmitReview = (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview'));
|
||||
@@ -181,7 +182,9 @@
|
||||
{
|
||||
common::printIcon('story', 'review', $vars, $child, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
common::printIcon('story', 'recall', $vars, $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
|
||||
$title = $child->status == 'changing' ? $this->lang->story->recallChange : $this->lang->story->recall;
|
||||
common::printIcon('story', 'recall', $vars, $child, 'list', 'undo', 'hiddenwin', '', '', '', $title);
|
||||
common::printIcon('story', 'edit', $vars, $child, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$canSubmitReview = (strpos('draft,changing', $child->status) !== false and common::hasPriv('story', 'submitReview'));
|
||||
|
||||
@@ -10,6 +10,8 @@ function setCheckbox()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
$('.c-name').css('border-left', 'none');
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
$('.check-all, .program-checkbox, .row-product').removeClass('checked');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').show();
|
||||
@@ -17,9 +19,7 @@ function setCheckbox()
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
$('.table-actions').hide();
|
||||
$('.check-all').removeClass('checked');
|
||||
$('#productsCount').show();
|
||||
}
|
||||
}
|
||||
@@ -160,8 +160,19 @@ $(function()
|
||||
}
|
||||
});
|
||||
|
||||
$('.main-table').on('click', 'tr', function(e)
|
||||
{
|
||||
if($.cookie('showProductBatchEdit') == 1) updateStatistic();
|
||||
});
|
||||
|
||||
$('#productTableList').on('click', 'tr', function(e)
|
||||
{
|
||||
if($.cookie('showProductBatchEdit') != 1) e.stopPropagation();
|
||||
});
|
||||
|
||||
$('#productTableList').on('click', '.row-program,.row-line', function(e)
|
||||
{
|
||||
if($.cookie('showProductBatchEdit') != 1) return;
|
||||
if($(e.target).closest('.table-nest-toggle,a').length) return;
|
||||
|
||||
var $row = $(this);
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<th class='c-status'><?php echo $lang->project->status;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-user text-left'><?php echo $lang->project->PM;?></th>
|
||||
<th class="c-budget text-center"><?php echo $lang->project->budget;?></th>
|
||||
<th class="c-budget text-right"><?php echo $lang->project->budget;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->end;?></th>
|
||||
<th class="c-number text-right"><?php echo $lang->project->estimate;?></th>
|
||||
@@ -93,8 +93,7 @@
|
||||
</td>
|
||||
<?php $projectBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$project->budget, 2);?>
|
||||
<?php $budgetTitle = $project->budget != 0 ? zget($this->lang->project->currencySymbol, $project->budgetUnit) . ' ' . $projectBudget : $this->lang->project->future;?>
|
||||
<?php $textStyle = $project->budget != 0 ? 'text-right' : 'text-center';?>
|
||||
<td title='<?php echo $budgetTitle;?>' class="text-ellipsis <?php echo $textStyle;?>"><?php echo $budgetTitle;?></td>
|
||||
<td title='<?php echo $budgetTitle;?>' class="text-ellipsis text-right"><?php echo $budgetTitle;?></td>
|
||||
<td class='padding-right text-left'><?php echo $project->begin;?></td>
|
||||
<td class='padding-right text-left'><?php echo $project->end;?></td>
|
||||
<td class="text-right" title="<?php echo $project->hours->totalEstimate . ' ' . $lang->execution->workHour;?>"><?php echo $project->hours->totalEstimate . $lang->execution->workHourUnit;?></td>
|
||||
|
||||
@@ -44,5 +44,5 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip
|
||||
.popover.right {left: 40px; top: -5px; white-space: nowrap;}
|
||||
.popover.right .popover-content {padding: 5px 20px 0px 0px;}
|
||||
.execution-tip {list-style: none;}
|
||||
|
||||
#taskPopover .arrow {margin-top: -55px;}
|
||||
.popover.right .arrow {margin-top: -30px;}
|
||||
.execution-tip li {overflow: hidden; text-overflow: unset; white-space: nowrap;}
|
||||
|
||||
@@ -31,3 +31,5 @@ ol, ul {padding-left: 20px;}
|
||||
#mainMenu .page-title {display: flex;}
|
||||
#mainMenu .btn-toolbar .page-title .label {top: 9px; margin-right: 10px; height: 16px;}
|
||||
#mainMenu .btn-toolbar .page-title .text {max-width: 434px; overflow: hidden; white-space:nowrap; margin-right: 6px;}
|
||||
#actionsBox a:last-of-type + .divider {display: none;}
|
||||
#actionsBox div.divider:first-child {display: none;}
|
||||
|
||||
@@ -100,7 +100,8 @@ $(function()
|
||||
{
|
||||
$.zui.ContextMenu.hide();
|
||||
});
|
||||
$('.project-popover').on('click', function(e)
|
||||
|
||||
$('.execution-popover').on('click', function(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
var showPopover = $(this).next().css('display') == 'block';
|
||||
@@ -108,7 +109,7 @@ $(function()
|
||||
if(!showPopover) $(this).next().show();
|
||||
});
|
||||
|
||||
$('.project-link').on('click', function()
|
||||
$('.execution-link').on('click', function()
|
||||
{
|
||||
$('.popover.right').hide();
|
||||
});
|
||||
|
||||
@@ -164,11 +164,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$executionHtml = '<div class="popover right" id="taskPopover">';
|
||||
$executionHtml = '<div class="popover right">';
|
||||
$executionHtml .= '<div class="arrow"></div>';
|
||||
$executionHtml .= '<div class="popover-content">';
|
||||
$executionHtml .= '<ul class="execution-tip">';
|
||||
foreach($plan->executions as $executionID => $execution) $executionHtml .= '<li>' . html::a(helper::createLink('execution', 'task', "executionID=$executionID"), $execution->name, '', "class='execution-link' title='{$execution->name}'") . '</li>';
|
||||
foreach($plan->projects as $executionID => $execution) $executionHtml .= '<li>' . html::a(helper::createLink('execution', 'task', "executionID=$executionID"), $execution->name, '', "class='execution-link' title='{$execution->name}'") . '</li>';
|
||||
$executionHtml .= '</ul>';
|
||||
$executionHtml .= '</div>';
|
||||
$executionHtml .= '</div>';
|
||||
|
||||
@@ -9,7 +9,7 @@ $(function()
|
||||
|
||||
$(":checkbox[name^='productIDList']").on('click', function()
|
||||
{
|
||||
updateStatistic()
|
||||
updateStatistic();
|
||||
});
|
||||
|
||||
$(".check-all").on('click', function()
|
||||
@@ -22,7 +22,17 @@ $(function()
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', true);
|
||||
}
|
||||
updateStatistic()
|
||||
updateStatistic();
|
||||
});
|
||||
|
||||
$('.main-table').on('click', 'tr', function(e)
|
||||
{
|
||||
if($.cookie('showProductBatchEdit') == 1) updateStatistic();
|
||||
});
|
||||
|
||||
$('#productListForm .table').on('click', '.sortable tr', function(e)
|
||||
{
|
||||
if($.cookie('showProductBatchEdit') != 1) e.stopPropagation();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -37,15 +47,15 @@ function setCheckbox()
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').hide();
|
||||
$('#productListForm .product-id').addClass('hidden');
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
$('.check-all, .sortable tr').removeClass('checked');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
$('.table-actions').hide();
|
||||
$('.check-all').removeClass('checked');
|
||||
$('#productListForm .product-id').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,11 @@ $(function()
|
||||
}
|
||||
updateStatistic()
|
||||
});
|
||||
|
||||
$('.main-table').on('click', 'tr', function(e)
|
||||
{
|
||||
if($.cookie('showProjectBatchEdit') == 1) updateStatistic();
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -35,15 +40,15 @@ $(function()
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectsForm .checkbox-primary').hide();
|
||||
$(":checkbox[name^='projectIdList']").prop('checked', false);
|
||||
$('.check-all, .sortable tr').removeClass('checked');
|
||||
if($.cookie('showProjectBatchEdit') == 1)
|
||||
{
|
||||
$('#projectsForm .checkbox-primary').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='projectIdList']").prop('checked', false);
|
||||
$('.table-actions').hide();
|
||||
$('.check-all').removeClass('checked');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1577,15 +1577,15 @@ class programModel extends model
|
||||
if(common::hasPriv('project', 'manageProducts') || common::hasPriv('project', 'whitelist') || common::hasPriv('project', 'delete'))
|
||||
{
|
||||
$menu .= "<div class='btn-group'>";
|
||||
$menu .= "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
|
||||
$menu .= "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
|
||||
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
$menu .= $this->buildMenu('project', 'manageProducts', "$params&from=program", $program, $type, 'link', '', '', '', "data-app='project'");
|
||||
$menu .= $this->buildMenu('project', 'manageProducts', "$params&from=program", $program, $type, 'link', '', 'btn-action', '', "data-app='project'");
|
||||
|
||||
$disabledWhitelist = $program->acl == 'open' ? " disabled='disabled' style='pointer-events: none;'" : '';
|
||||
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=browse", $program, $type, 'shield-check', '', '', '', "data-app='project'" . $disabledWhitelist);
|
||||
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=browse", $program, $type, 'shield-check', '', 'btn-action', '', "data-app='project'" . $disabledWhitelist);
|
||||
if(common::hasPriv('project','delete'))
|
||||
{
|
||||
$menu .= $this->buildMenu("project", "delete", $params, $program, $type, 'trash', 'hiddenwin', '', '', "data-group='program'", $this->lang->delete);
|
||||
$menu .= $this->buildMenu("project", "delete", $params, $program, $type, 'trash', 'hiddenwin', 'btn-action', '', "data-group='program'", $this->lang->delete);
|
||||
}
|
||||
$menu .= "</ul>";
|
||||
$menu .= "</div>";
|
||||
|
||||
@@ -25,7 +25,7 @@ $(function()
|
||||
|
||||
$(":checkbox[name^='projectIdList']").on('click', function()
|
||||
{
|
||||
updateStatistic()
|
||||
updateStatistic();
|
||||
});
|
||||
|
||||
$(".check-all").on('click', function()
|
||||
@@ -38,7 +38,17 @@ $(function()
|
||||
{
|
||||
$(":checkbox[name^='projectIdList']").prop('checked', true);
|
||||
}
|
||||
updateStatistic()
|
||||
updateStatistic();
|
||||
});
|
||||
|
||||
$('.main-table').on('click', 'tr', function(e)
|
||||
{
|
||||
if($.cookie('showProjectBatchEdit') == 1) updateStatistic();
|
||||
});
|
||||
|
||||
$('#tableCustomBtn').on('click', function()
|
||||
{
|
||||
$('.contextmenu-show').removeClass('contextmenu-show').find('.contextmenu-menu').removeClass('open');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,15 +61,15 @@ $(function()
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
$('.check-all, .sortable tr').removeClass('checked');
|
||||
$(":checkbox[name^='projectIdList']").prop('checked', false);
|
||||
if($.cookie('showProjectBatchEdit') == 1)
|
||||
{
|
||||
$('#projectForm .checkbox-primary').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='projectIdList']").prop('checked', false);
|
||||
$('.table-actions').hide();
|
||||
$('.check-all').removeClass('checked');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1069,7 +1069,7 @@ class searchModel extends model
|
||||
}
|
||||
elseif($objectType == 'todo')
|
||||
{
|
||||
$objectTodos = $this->dao->select('id')->from($table)->where('id')->in(array_keys($objectIdList))->andWhere("private")->eq(1)->fetchPairs('id', 'id');
|
||||
$objectTodos = $this->dao->select('id')->from($table)->where('id')->in(array_keys($objectIdList))->andWhere("private")->eq(1)->andWhere('account')->ne($this->app->user->account)->fetchPairs('id', 'id');
|
||||
foreach($objectTodos as $todoID)
|
||||
{
|
||||
if(isset($objectIdList[$todoID]))
|
||||
|
||||
@@ -386,6 +386,10 @@ class story extends control
|
||||
$reviewers = $product->reviewer;
|
||||
if(!$reviewers and $product->acl != 'open') $reviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', '');
|
||||
|
||||
/* Get the module's children id list. */
|
||||
$moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastStoryModule;
|
||||
$moduleIdList = $this->tree->getAllChildId($moduleID);
|
||||
|
||||
/* Set Custom. */
|
||||
foreach(explode(',', $this->config->story->list->customCreateFields) as $field) $customFields[$field] = $this->lang->story->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
@@ -398,7 +402,7 @@ class story extends control
|
||||
$this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('product', 'browse', "productID=$productID") : '';
|
||||
$this->view->products = $products;
|
||||
$this->view->users = $users;
|
||||
$this->view->moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastStoryModule;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch, 'skipParent|unexpired|noclosed'));
|
||||
$this->view->planID = $planID;
|
||||
@@ -420,7 +424,7 @@ class story extends control
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->URS = $storyType == 'story' ? $this->story->getRequirements($productID) : '';
|
||||
$this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement') : '';
|
||||
$this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : "";
|
||||
$this->view->type = $storyType;
|
||||
|
||||
@@ -2461,6 +2465,38 @@ class story extends control
|
||||
echo json_encode($storyInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get the user requirements of the product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $labelName
|
||||
* @param bool $isMultiple
|
||||
* @param int $defaultID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProductURS($productID, $labelName = '', $isMultiple = false, $defaultID = '')
|
||||
{
|
||||
$requirements = array('0' => '') + $this->story->getRequirements($productID);
|
||||
$labelName = $isMultiple ? $labelName . '[]' : $labelName;
|
||||
$misc = $isMultiple ? 'class="form-control" multiple' : 'class="form-control"';
|
||||
return print(html::select($labelName, $requirements, $defaultID, $misc));
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get the parent story.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $labelName
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetParentStory($productID, $labelName = '')
|
||||
{
|
||||
$stories = $this->story->getParentStoryPairs($productID);
|
||||
return print(html::select($labelName, $stories, 0, 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
* The report page.
|
||||
*
|
||||
@@ -2692,4 +2728,23 @@ class story extends control
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: Get user requirements.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branchID
|
||||
* @param int $moduleID
|
||||
* @param string $requirementList
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetURS($productID, $branchID = 0, $moduleID = 0, $requirementList = 0)
|
||||
{
|
||||
$moduleIdList = $this->loadModel('tree')->getAllChildId($moduleID);
|
||||
|
||||
$URS = $this->story->getProductStoryPairs($productID, $branchID, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement');
|
||||
|
||||
return print(html::select('URS[]', $URS, $requirementList, "class='form-control chosen' multiple"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,8 @@ $(function()
|
||||
saveCustomFields('createFields');
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('change', '#module', loadURS);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -78,6 +80,30 @@ function loadAssignedTo()
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load URS.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadURS()
|
||||
{
|
||||
var productID = $('#product').val();
|
||||
var branchID = $('#branch').val();
|
||||
var moduleID = $('#module').val();
|
||||
var requirementList = $('#URS').val();
|
||||
requirementList = requirementList ? requirementList.join(',') : '';
|
||||
|
||||
var link = createLink('story', 'ajaxGetURS', 'productID=' + productID + '&branchID=' + branchID + '&moduleID=' + moduleID + '&requirementList=' + requirementList);
|
||||
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#URS').replaceWith(data);
|
||||
$('#URS_chosen').remove();
|
||||
$('#URS').chosen();
|
||||
});
|
||||
}
|
||||
|
||||
function refreshPlan()
|
||||
{
|
||||
loadProductPlans($('#product').val(), $('#branch').val());
|
||||
|
||||
@@ -4804,7 +4804,7 @@ class storyModel extends model
|
||||
if(isset($branches[$story->branch]) and $showBranch and $this->config->vision == 'rnd') echo "<span class='label label-outline label-badge' title={$branches[$story->branch]}>{$branches[$story->branch]}</span> ";
|
||||
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
|
||||
if($story->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->story->children . '">' . $this->lang->story->childrenAB . '</span> ';
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-app='$tab'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "title='$story->title' style='color: $story->color' data-app='$tab'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
break;
|
||||
case 'plan':
|
||||
|
||||
@@ -36,6 +36,28 @@ function loadProduct(productID)
|
||||
oldProductID = $('#product').val();
|
||||
loadProductBranches(productID);
|
||||
loadProductReviewers(productID);
|
||||
loadURS();
|
||||
|
||||
if(typeof(storyType) == 'string' && storyType == 'story')
|
||||
{
|
||||
var requirementLink = createLink('story', 'ajaxGetProductURS', 'productID=' + productID + '&labelName=URS' + '&isMultiple=1');
|
||||
$.get(requirementLink, function(data)
|
||||
{
|
||||
$('#URS').replaceWith(data);
|
||||
$('#URS' + "_chosen").remove();
|
||||
$('#URS').next('.picker').remove();
|
||||
$('#URS').chosen();
|
||||
});
|
||||
|
||||
var storyLink = createLink('story', 'ajaxGetParentStory', 'productID=' + productID + '&labelName=parent');
|
||||
$.get(storyLink, function(data)
|
||||
{
|
||||
$('#parent').replaceWith(data);
|
||||
$('#parent' + "_chosen").remove();
|
||||
$('#parent').next('.picker').remove();
|
||||
$('#parent').chosen();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,6 +75,7 @@ function loadBranch()
|
||||
|
||||
loadProductModules(productID, branch);
|
||||
loadProductPlans(productID, branch);
|
||||
loadURS();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,6 +105,7 @@ function loadProductBranches(productID)
|
||||
|
||||
loadProductModules(productID, $('#branch').val());
|
||||
loadProductPlans(productID, $('#branch').val());
|
||||
loadURS();
|
||||
})
|
||||
}
|
||||
|
||||
@@ -112,6 +136,8 @@ function loadProductModules(productID, branch)
|
||||
if(typeof(storyModule) == 'string' && config.currentMethod != 'edit') $moduleIDBox.prepend("<span class='input-group-addon'>" + storyModule + "</span>");
|
||||
$moduleIDBox.fixInputGroup();
|
||||
});
|
||||
|
||||
loadURS();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1065,7 +1065,7 @@ class taskModel extends model
|
||||
}
|
||||
|
||||
/* If a multiple task is assigned to a team member who is not the task, assign to the team member instead. */
|
||||
if(!$this->post->assignedTo and !empty($_POST['team'])) $_POST['assignedTo'] = $this->getAssignedTo4Multi($_POST['team'], $oldTask);
|
||||
if(!$this->post->assignedTo and !empty($oldTask->team) and !empty($_POST['team'])) $_POST['assignedTo'] = $this->getAssignedTo4Multi($_POST['team'], $oldTask);
|
||||
|
||||
/* When the selected parent task is a common task and has consumption, select other parent tasks. */
|
||||
if($this->post->parent > 0)
|
||||
|
||||
@@ -181,16 +181,16 @@ $config->testcase->datatable->fieldList['lastRunner']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['lastRunner']['width'] = '70';
|
||||
$config->testcase->datatable->fieldList['lastRunner']['required'] = 'no';
|
||||
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['width'] = '70';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['required'] = 'no';
|
||||
|
||||
$config->testcase->datatable->fieldList['lastRunDate']['title'] = 'lastRunDate';
|
||||
$config->testcase->datatable->fieldList['lastRunDate']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['lastRunDate']['width'] = '90';
|
||||
$config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no';
|
||||
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['width'] = '70';
|
||||
$config->testcase->datatable->fieldList['lastRunResult']['required'] = 'no';
|
||||
|
||||
$config->testcase->datatable->fieldList['lastEditedBy']['title'] = 'lastEditedBy';
|
||||
$config->testcase->datatable->fieldList['lastEditedBy']['fixed'] = 'no';
|
||||
$config->testcase->datatable->fieldList['lastEditedBy']['width'] = '92';
|
||||
|
||||
@@ -61,7 +61,6 @@ class testcaseModel extends model
|
||||
->setIF($this->config->systemMode == 'new' and $this->app->tab == 'project', 'project', $this->session->project)
|
||||
->setIF($this->app->tab == 'execution', 'execution', $this->session->execution)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->stripTags($this->config->testcase->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
->cleanInt('story,product,branch,module')
|
||||
@@ -78,7 +77,6 @@ class testcaseModel extends model
|
||||
|
||||
/* Value of story may be showmore. */
|
||||
$case->story = (int)$case->story;
|
||||
$case = $this->loadModel('file')->processImgURL($case, $this->config->testcase->editor->create['id'], $this->post->uid);
|
||||
$this->dao->insert(TABLE_CASE)->data($case)->autoCheck()->batchCheck($this->config->testcase->create->requiredFields, 'notempty')->checkFlow()->exec();
|
||||
if(!$this->dao->isError())
|
||||
{
|
||||
@@ -626,7 +624,7 @@ class testcaseModel extends model
|
||||
*/
|
||||
public function getByAssignedTo($account, $orderBy = 'id_desc', $pager = null, $auto = 'no')
|
||||
{
|
||||
return $this->dao->select('t1.id as run, t1.task,t1.case,t1.version,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status,t2.id as id,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status,t3.name as taskName')->from(TABLE_TESTRUN)->alias('t1')
|
||||
return $this->dao->select('t1.id as run, t1.task,t1.case,t1.version,t1.assignedTo,t1.lastRunner,t1.lastRunDate,t1.lastRunResult,t1.status as lastRunStatus,t2.id as id,t2.project,t2.pri,t2.title,t2.type,t2.openedBy,t2.color,t2.product,t2.branch,t2.module,t2.status,t3.name as taskName')->from(TABLE_TESTRUN)->alias('t1')
|
||||
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')
|
||||
->leftJoin(TABLE_TESTTASK)->alias('t3')->on('t1.task = t3.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
?>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='c-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->testcase->type);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->testcase->openedByAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('lastRunner', $orderBy, $vars, $lang->testtask->lastRunAccount);?></th>
|
||||
<th class='c-date'> <?php common::printOrderLink('lastRunDate', $orderBy, $vars, $lang->testtask->lastRunTime);?></th>
|
||||
<th class='c-result'><?php common::printOrderLink('lastRunResult', $orderBy, $vars, $lang->testtask->lastRunResult);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -50,14 +50,14 @@
|
||||
<?php $caseID = $type == 'case2Him' ? $case->case : $case->id?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), sprintf('%03d', $caseID));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), $case->title);?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td class='<?php echo $case->status;?>'><?php echo $this->processStatus('testcase', $case);?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
<td><?php echo helper::isZeroDate($case->lastRunDate) ? '' : substr($case->lastRunDate, 5, 11);?></td>
|
||||
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
|
||||
<td class='<?php echo $case->status;?>'><?php echo $this->processStatus('testcase', $case);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
+7
-1
@@ -99,6 +99,12 @@
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
/* Hide context menu when window is scroll. */
|
||||
$(window).on('scroll', function()
|
||||
{
|
||||
$.zui.ContextMenu.hide();
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
/**
|
||||
@@ -1332,7 +1338,7 @@ function refreshBudgetUnit(data)
|
||||
|
||||
/**
|
||||
* Handle radio logic of Kanban column width setting.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user