Merge branch 'master' of http://github.com/easysoft/zentaopms
This commit is contained in:
@@ -81,6 +81,7 @@ rpm:
|
||||
en:
|
||||
unzip ZenTaoPMS.${VERSION}.zip
|
||||
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
|
||||
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
|
||||
zip -r -9 ZenTaoPMS.$(VERSION).int.zip zentaopms
|
||||
rm -fr zentaopms
|
||||
echo $(VERSION).int > VERSION
|
||||
|
||||
@@ -945,7 +945,13 @@ class baseFixer
|
||||
public function cleanINT($fieldName = '')
|
||||
{
|
||||
$fields = $this->processFields($fieldName);
|
||||
foreach($fields as $fieldName) $this->data->$fieldName = (int)filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_INT);
|
||||
foreach($fields as $fieldName)
|
||||
{
|
||||
$filterVar = filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_INT);
|
||||
if(empty($filterVar)) $filterVar = 0;
|
||||
|
||||
$this->data->$fieldName = $filterVar;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
+1137
-1101
File diff suppressed because it is too large
Load Diff
+11
-12
@@ -291,20 +291,19 @@ class block extends control
|
||||
*/
|
||||
public function welcome()
|
||||
{
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
$this->view->tutorialed = $this->loadModel('tutorial')->getTutorialed();
|
||||
$this->view->tasks = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$this->view->bugs = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$this->view->stories = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$this->view->projects = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)->where('id')->in(array_keys($projects))->andWhere("(status='wait' or status='doing')")->fetch('count');
|
||||
$this->view->products = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)->where('status')->ne('closed')->andWhere('id')->in(array_keys($products))->fetch('count');
|
||||
|
||||
$today = date('Y-m-d');
|
||||
$this->view->delay['task'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deadline')->ne('0000-00-00')->andWhere('deadline')->lt($today)->fetch('count');
|
||||
$this->view->delay['bug'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->where('assignedTo')->eq($this->app->user->account)->andWhere('deadline')->ne('0000-00-00')->andWhere('deadline')->lt($today)->fetch('count');
|
||||
$this->view->delay['project'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)->where('id')->in(array_keys($projects))->andWhere("(status='wait' or status='doing')")->andWhere('end')->lt($today)->fetch('count');
|
||||
$data = $this->block->getWelcomeBlockData();
|
||||
|
||||
$this->view->tasks = $data['tasks'];
|
||||
$this->view->bugs = $data['bugs'];
|
||||
$this->view->stories = $data['stories'];
|
||||
$this->view->projects = $data['projects'];
|
||||
$this->view->products = $data['products'];
|
||||
|
||||
$this->view->delay['task'] = $data['delayTask'];
|
||||
$this->view->delay['bug'] = $data['delayBug'];
|
||||
$this->view->delay['project'] = $data['delayProject'];
|
||||
|
||||
$time = date('H:i');
|
||||
$welcomeType = '19:00';
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
#dashboard .panel-actions.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;}
|
||||
#dashboard .panel-actions.nav .icon-more {font-size: 14px;}
|
||||
#dashboard .panel-body {max-height: 400px; overflow: auto;}
|
||||
#dashboard .panel-body.has-table {padding-top: 0;}
|
||||
#dashboard .panel-move-handler {position: absolute; top: 0; left: 0; right: 50px; height: 40px; z-index: 10; cursor: move;}
|
||||
#dashboard .panel-heading {cursor: move; padding-right: 75px;}
|
||||
#dashboard .panel.table-scrolled .table-header-fixed {border-bottom: 1px solid #ddd; box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 4px 0 rgba(0,0,0,0.025);}
|
||||
#dashboard .panel.table-scrolled .table-header-fixed {border-bottom: 1px solid #e5e5e5;}
|
||||
@media (min-width: 992px)
|
||||
{
|
||||
#dashboard > .row {display: table; width: 100%; margin: 0;}
|
||||
@@ -20,3 +21,5 @@
|
||||
#dashboard.sortable-sorting .panel.dragging {visibility: visible; background: transparent; background: rgba(0,0,0,.075); box-shadow: inset 0 2px 6px rgba(0,0,0,.075);}
|
||||
#dashboard.sortable-sorting .panel.dragging:before {color: #bbb;}
|
||||
#dashboard.sortable-sorting .panel.drag-shadow {box-shadow: 0 1px 3px rgba(0,0,0,.175), 0 3px 8px 0 rgba(0,0,0,.175)}
|
||||
|
||||
#dashboard .block-sm .hide-in-sm {display: none;}
|
||||
|
||||
@@ -49,8 +49,8 @@ function resizeBlock(blockID, width, callback)
|
||||
$.getJSON(createLink('block', 'resize', 'id=' + blockID + '&type=horizontal&data=' + width), function(data)
|
||||
{
|
||||
callback && callback();
|
||||
refreshBlock($('#block' + blockID));
|
||||
});
|
||||
refreshBlock($('#block' + blockID));
|
||||
}
|
||||
|
||||
function refreshBlock($panel, afterRefresh)
|
||||
@@ -64,9 +64,10 @@ function refreshBlock($panel, afterRefresh)
|
||||
else if($panel.find('#assigntomeBlock').length) $panel.find('#assigntomeBlock').empty().append($data.children());
|
||||
else
|
||||
{
|
||||
$panel.children('.panel-move-handler,style').remove();
|
||||
$panel.children('.panel-move-handler,style,script').remove();
|
||||
$panel.find('.panel-body,.empty-tip').replaceWith($data);
|
||||
}
|
||||
$panel.find('.progress-pie').progressPie();
|
||||
if($.isFunction(afterRefresh))
|
||||
{
|
||||
afterRefresh.call(this,
|
||||
@@ -135,7 +136,7 @@ function initTableHeader($wrapper)
|
||||
};
|
||||
if(!$header.length)
|
||||
{
|
||||
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0; padding: 10px 10px 0; background: #fff;"><table class="table table-fixed no-margin"></table></div>').css('right', $panel.width() - tableWidth - 20);
|
||||
$header = $('<div class="table-header-fixed" style="position: absolute; left: 10px; top: 0; right: 0; padding: 0 10px 0 0; background: #fff;"><table class="table table-fixed no-margin"></table></div>').css('right', $panel.width() - tableWidth - 20);
|
||||
$oldTableHead.find('th').each(function(idx)
|
||||
{
|
||||
$(this).attr('data-idx', idx);
|
||||
|
||||
@@ -147,6 +147,47 @@ class blockModel extends model
|
||||
->fetchAll('order');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data of welcome block.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getWelcomeBlockData()
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
$data['tasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->fetch('count');
|
||||
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)->where('id')->in(array_keys($projects))->andWhere("(status='wait' or status='doing')")->fetch('count');
|
||||
$data['products'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)->where('status')->ne('closed')->andWhere('id')->in(array_keys($products))->fetch('count');
|
||||
|
||||
$today = date('Y-m-d');
|
||||
$data['delayTask'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)
|
||||
->where('assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('status')->in('wait,doing')
|
||||
->andWhere('deadline')->ne('0000-00-00')
|
||||
->andWhere('deadline')->lt($today)
|
||||
->fetch('count');
|
||||
$data['delayBug'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)
|
||||
->where('assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('status')->eq('active')
|
||||
->andWhere('deadline')->ne('0000-00-00')
|
||||
->andWhere('deadline')->lt($today)
|
||||
->fetch('count');
|
||||
$data['delayProject'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
|
||||
->where('id')->in(array_keys($projects))
|
||||
->andWhere('status')->in('wait,doing')
|
||||
->andWhere('end')->lt($today)
|
||||
->fetch('count');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init block when account use first.
|
||||
*
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
.block-bugs .c-pri {width: 35px;text-align: center;}
|
||||
.block-bugs .c-deadline {width: 95px;}
|
||||
.block-bugs .c-status {width: 80px;}
|
||||
.block-bugs.block-sm .c-pri,
|
||||
.block-bugs.block-sm .c-status .label-dot {display: none;}
|
||||
.block-bugs.block-sm .c-status {text-align: center;}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
@@ -53,7 +51,7 @@
|
||||
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo $bug->title?></td>
|
||||
<td class='c-status' title='<?php echo zget($lang->bug->statusList, $bug->status)?>'>
|
||||
<span class="status-<?php echo $bug->status?>">
|
||||
<span class="label label-dot"></span>
|
||||
<span class="label label-dot hide-in-sm"></span>
|
||||
<span class='status-text'><?php echo zget($lang->bug->statusList, $bug->status);?></span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<style>
|
||||
.block-flowchart {}
|
||||
.block-flowchart .panel-body {padding-top: 0}
|
||||
.block-flowchart .table {margin-bottom: 0;}
|
||||
.block-flowchart .table > thead > tr > th,
|
||||
@@ -8,8 +7,8 @@
|
||||
.block-flowchart .table > thead > tr > th:first-child,
|
||||
.block-flowchart .table > tbody > tr > td:first-child,
|
||||
.block-flowchart .table > tbody > tr > th:first-child {text-align: left;}
|
||||
.block-flowchart .table > thead > tr > th {width: 18%;vertical-align: top;}
|
||||
.block-flowchart .table > thead > tr > th:first-child {width: auto;padding: 10px 10px 15px 10px;background: none;}
|
||||
.block-flowchart .table > thead > tr > th {width: 18%; padding-top: 0}
|
||||
.block-flowchart .table > thead > tr > th:first-child {width: auto; padding: 0 10px 0 10px;background: none;}
|
||||
.block-flowchart .table > thead > tr > th:first-child + th > div {background: none;}
|
||||
.block-flowchart .table > thead > tr > th,
|
||||
.block-flowchart .table > thead > tr > th > div {padding: 0;background: url('data:image/gif;base64,R0lGODlhLQAPAJEAAAAAAP///+7u7v///yH5BAEAAAMALAAAAAAtAA8AAAJEnH8imMvKopzKofrg3FRfb2Dc+FmNOYgkqZ4ZunZwm4KxHNH0nds1uuOFfDqf8NcDGoW7IuzYtAWZROmSF1U+oc+qsAAAOw==') no-repeat;background-position: right -22px top 15px;}
|
||||
@@ -19,11 +18,14 @@
|
||||
.block-flowchart .table > tbody > tr:nth-child(even) > td {background: #f7f8f9;}
|
||||
.block-flowchart .flowchart-title {font-size: 14px;font-weight: bold;color: #3c4353;}
|
||||
.block-flowchart .flowchart-step {display: inline-block;width: 24px;height: 24px;font-size: 14px;line-height: 24px;color: #fff; border-radius: 50%;}
|
||||
.block-flowchart.block-sm .table > tbody > tr > td,
|
||||
.block-flowchart.block-sm .table > tbody > tr > th {padding: 10px 4px; font-size: 12px;}
|
||||
.block-flowchart.block-sm .table > thead > tr > th:first-child {padding: 0 4px 0 4px; width: 65px}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class='text-middle'>
|
||||
<?php for($i = 0; $i < 6; $i++):?>
|
||||
<?php if($i == 0):?>
|
||||
<th style='width:110px;'><span class="flowchart-title"><?php echo $lang->block->role?></span></th>
|
||||
@@ -35,7 +37,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($lang->block->flowchart as $flowchart):?>
|
||||
<tr>
|
||||
<tr class='text-middle'>
|
||||
<?php for($i = 0; $i < 6; $i++):?>
|
||||
<?php if($i == 0):?>
|
||||
<th><?php echo $flowchart[$i];?></th>
|
||||
|
||||
@@ -42,7 +42,41 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
|
||||
.block-statistic .nav-secondary > li.active > a:focus,
|
||||
.block-statistic .nav-secondary > li > a:hover {box-shadow: none;}
|
||||
.block-statistic .nav-secondary > li.active > a:before {content: ' '; display: block; left: -1px; top: 10px; bottom: 10px; width: 4px; background: #006af1; position: absolute;}
|
||||
.block-statistic .nav-secondary > li.switch-icon {display: none;}
|
||||
.block-statistic.block-sm .panel-body {padding-bottom: 10px; position: relative; padding-top: 45px;}
|
||||
.block-statistic.block-sm .panel-body > .table-row,
|
||||
.block-statistic.block-sm .panel-body > .table-row > .col {display: block; width: auto;}
|
||||
.block-statistic.block-sm .panel-body > .table-row > .tab-content {padding: 0; margin: 0 -5px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 {width: 125px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 > .table-row {padding: 5px 0;}
|
||||
.block-statistic.block-sm .col-nav {border-left: none; position: absolute; top: 0; left: 15px; right: 15px; background: #f5f5f5; border-radius: 3px;}
|
||||
.block-statistic.block-sm .nav-secondary {display: table; width: 100%; padding: 0; table-layout: fixed;}
|
||||
.block-statistic.block-sm .nav-secondary > li {display: none}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon,
|
||||
.block-statistic.block-sm .nav-secondary > li.active {display: table-cell; width: 100%; text-align: center;}
|
||||
.block-statistic.block-sm .nav-secondary > li.active > a:hover {cursor: default; background: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon > a:hover {background: rgba(0,0,0,0.07);}
|
||||
.block-statistic.block-sm .nav-secondary > li > a {padding: 5px 10px; border-radius: 4px;}
|
||||
.block-statistic.block-sm .nav-secondary > li > a:before {display: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon {width: 40px;}
|
||||
.block-statistic.block-sm .types-line > li > div {padding: 18px 2px 5px;}
|
||||
</style>
|
||||
<script>
|
||||
<?php $blockNavId = 'nav-' . uniqid(); ?>
|
||||
$(function()
|
||||
{
|
||||
var $nav = $('#<?php echo $blockNavId;?>');
|
||||
$nav.on('click', '.switch-icon', function(e)
|
||||
{
|
||||
var isPrev = $(this).is('.prev');
|
||||
var $activeItem = $nav.children('.active');
|
||||
var $next = $activeItem[isPrev ? 'prev' : 'next']('li:not(.switch-icon)');
|
||||
if ($next.length) $next.find('a').trigger('click');
|
||||
else $nav.children('li:not(.switch-icon)')[isPrev ? 'last' : 'first']().find('a').trigger('click');
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="panel-body">
|
||||
<div class="table-row">
|
||||
<?php if(empty($products)):?>
|
||||
@@ -163,10 +197,12 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="col col-nav">
|
||||
<ul class="nav nav-stacked nav-secondary scrollbar-hover">
|
||||
<ul class="nav nav-stacked nav-secondary scrollbar-hover" id='<?php echo $blockNavId;?>'>
|
||||
<li class='switch-icon prev'><a><i class='icon icon-arrow-left'></i></a></li>
|
||||
<?php foreach($products as $product):?>
|
||||
<li <?php if($product == reset($products)) echo "class='active'";?>><a href="javascript:;" data-target="#tab<?php echo $product->code;?>" data-toggle="tab" title='<?php echo $product->name;?>'><?php echo $product->name;?></a></li>
|
||||
<?php endforeach;?>
|
||||
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -29,7 +29,40 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
|
||||
.block-statistic .nav-secondary > li.active > a:focus,
|
||||
.block-statistic .nav-secondary > li > a:hover {box-shadow: none;}
|
||||
.block-statistic .nav-secondary > li.active > a:before {content: ' '; display: block; left: -1px; top: 10px; bottom: 10px; width: 4px; background: #006af1; position: absolute;}
|
||||
.block-statistic .nav-secondary > li.switch-icon {display: none;}
|
||||
.block-statistic.block-sm .panel-body {padding-bottom: 10px; position: relative; padding-top: 45px; border-radius: 3px;}
|
||||
.block-statistic.block-sm .panel-body > .table-row,
|
||||
.block-statistic.block-sm .panel-body > .table-row > .col {display: block; width: auto;}
|
||||
.block-statistic.block-sm .panel-body > .table-row > .tab-content {padding: 0; margin: 0 -5px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 {width: 125px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 > .table-row {padding: 5px 0;}
|
||||
.block-statistic.block-sm .col-nav {border-left: none; position: absolute; top: 0; left: 15px; right: 15px; background: #f5f5f5;}
|
||||
.block-statistic.block-sm .nav-secondary {display: table; width: 100%; padding: 0; table-layout: fixed;}
|
||||
.block-statistic.block-sm .nav-secondary > li {display: none}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon,
|
||||
.block-statistic.block-sm .nav-secondary > li.active {display: table-cell; width: 100%; text-align: center;}
|
||||
.block-statistic.block-sm .nav-secondary > li.active > a:hover {cursor: default; background: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon > a:hover {background: rgba(0,0,0,0.07);}
|
||||
.block-statistic.block-sm .nav-secondary > li > a {padding: 5px 10px; border-radius: 4px;}
|
||||
.block-statistic.block-sm .nav-secondary > li > a:before {display: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon {width: 40px;}
|
||||
</style>
|
||||
<script>
|
||||
<?php $blockNavId = 'nav-' . uniqid(); ?>
|
||||
$(function()
|
||||
{
|
||||
var $nav = $('#<?php echo $blockNavId;?>');
|
||||
$nav.on('click', '.switch-icon', function(e)
|
||||
{
|
||||
var isPrev = $(this).is('.prev');
|
||||
var $activeItem = $nav.children('.active');
|
||||
var $next = $activeItem[isPrev ? 'prev' : 'next']('li:not(.switch-icon)');
|
||||
if ($next.length) $next.find('a').trigger('click');
|
||||
else $nav.children('li:not(.switch-icon)')[isPrev ? 'last' : 'first']().find('a').trigger('click');
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="panel-body">
|
||||
<div class="table-row">
|
||||
<?php if(empty($projects)):?>
|
||||
@@ -117,10 +150,12 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="col col-nav">
|
||||
<ul class="nav nav-stacked nav-secondary scrollbar-hover">
|
||||
<ul class="nav nav-stacked nav-secondary scrollbar-hover" id='<?php echo $blockNavId;?>'>
|
||||
<li class='switch-icon prev'><a><i class='icon icon-arrow-left'></i></a></li>
|
||||
<?php foreach($projects as $project):?>
|
||||
<li <?php if($project == reset($projects)) echo "class='active'";?>><a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a></li>
|
||||
<?php endforeach;?>
|
||||
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -32,7 +32,48 @@
|
||||
.block-statistic .progress-pie .progress-info > strong {font-size: 24px;}
|
||||
.block-statistic .chosen-single {font-size: 16px; font-weight: bold;}
|
||||
.block-statistic .chosen-container-single .chosen-single div b {top: -2px}
|
||||
.block-statistic .nav-secondary > li.switch-icon {display: none;}
|
||||
.block-statistic.block-sm .panel-body {padding-bottom: 10px; position: relative; padding-top: 45px;}
|
||||
.block-statistic.block-sm .panel-body > .table-row,
|
||||
.block-statistic.block-sm .panel-body > .table-row > .col {display: block; width: auto;}
|
||||
.block-statistic.block-sm .panel-body > .table-row > .tab-content {padding: 0; margin: 0 -5px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 {width: 125px;}
|
||||
.block-statistic.block-sm .tab-pane > .table-row > .col-5 > .table-row {padding: 5px 0;}
|
||||
.block-statistic.block-sm .col-nav {border-left: none; position: absolute; top: 0; left: 15px; right: 15px; background: #f5f5f5; border-radius: 3px;}
|
||||
.block-statistic.block-sm .nav-secondary {display: table; width: 100%; padding: 0; table-layout: fixed;}
|
||||
.block-statistic.block-sm .nav-secondary > li {display: none}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon,
|
||||
.block-statistic.block-sm .nav-secondary > li.active {display: table-cell; width: 100%; text-align: center;}
|
||||
.block-statistic.block-sm .nav-secondary > li.active > a:hover {cursor: default; background: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon > a:hover {background: rgba(0,0,0,0.07);}
|
||||
.block-statistic.block-sm .nav-secondary > li > a {padding: 5px 10px; border-radius: 4px;}
|
||||
.block-statistic.block-sm .nav-secondary > li > a:before {display: none;}
|
||||
.block-statistic.block-sm .nav-secondary > li.switch-icon {width: 40px;}
|
||||
</style>
|
||||
<script>
|
||||
<?php $blockNavId = 'nav-' . uniqid(); ?>
|
||||
$(function()
|
||||
{
|
||||
var $nav = $('#<?php echo $blockNavId;?>');
|
||||
$nav.on('click', '.switch-icon', function(e)
|
||||
{
|
||||
var isPrev = $(this).is('.prev');
|
||||
var $activeItem = $nav.children('.active');
|
||||
var $next = $activeItem[isPrev ? 'prev' : 'next']('li:not(.switch-icon)');
|
||||
if ($next.length) $next.find('a').trigger('click');
|
||||
else $nav.children('li:not(.switch-icon)')[isPrev ? 'last' : 'first']().find('a').trigger('click');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('[name^=build]').change(function()
|
||||
{
|
||||
var $tab = $('#bugBox' + $(this).val());
|
||||
$tab.removeClass('hidden');
|
||||
$tab.find('.progress-pie').progressPie();
|
||||
$(this).parents('.tab-pane').find('.table-row').not($tab).addClass('hidden');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="panel-body">
|
||||
<div class="table-row">
|
||||
<div class="col tab-content">
|
||||
@@ -124,25 +165,15 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="col col-nav">
|
||||
<ul class="nav nav-stacked nav-secondary">
|
||||
<ul class="nav nav-stacked nav-secondary" id='<?php echo $blockNavId;?>'>
|
||||
<li class='switch-icon prev'><a><i class='icon icon-arrow-left'></i></a></li>
|
||||
<?php $index = 1;?>
|
||||
<?php foreach($products as $product):?>
|
||||
<li class="<?php if($index == 1) echo 'active';?>"><a data-target="#tabContent<?php echo $product->id;?>" data-toggle="tab"><?php echo $product->name;?></a></li>
|
||||
<?php $index++;?>
|
||||
<?php endforeach;?>
|
||||
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('[name^=build]').change(function()
|
||||
{
|
||||
var $tab = $('#bugBox' + $(this).val());
|
||||
$tab.removeClass('hidden');
|
||||
$tab.find('.progress-pie').progressPie();
|
||||
$(this).parents('.tab-pane').find('.table-row').not($tab).addClass('hidden');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
.block-tasks .c-estimate {width: 60px;}
|
||||
.block-tasks .c-deadline {width: 95px;}
|
||||
.block-tasks .c-status {width: 80px;}
|
||||
.block-tasks.block-sm .estimate,
|
||||
.block-tasks.block-sm .c-deadline,
|
||||
.block-tasks.block-sm .c-status .label-dot {display: none;}
|
||||
.block-tasks.block-sm .c-status {text-align: center;}
|
||||
</style>
|
||||
<div class='panel-body has-table scrollbar-hover'>
|
||||
@@ -54,7 +51,7 @@
|
||||
<?php endif;?>
|
||||
<td class='c-status' title='<?php echo zget($lang->task->statusList, $task->status)?>'>
|
||||
<span class="status-<?php echo $task->status?>">
|
||||
<span class="label label-dot"></span>
|
||||
<span class="label label-dot hide-in-sm"></span>
|
||||
<span class='status-text'><?php echo zget($lang->task->statusList, $task->status);?></span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
.block-welcome .col-left {width: 25%;}
|
||||
.block-welcome .col-left > h4 {margin: 5px 0;line-height: 30px;}
|
||||
.block-welcome .col-left .timeline {margin: 10px 0 0;font-size: 12px;}
|
||||
.block-welcome .col-right {width: 75%;}
|
||||
.block-welcome .col-right > h4 {font-weight: normal;}
|
||||
.block-welcome .col-right > h4 small {display: inline-block;margin-right: 8px;font-size: 14px;}
|
||||
.block-welcome .col-right .tiles {padding: 10px 0 0 16px;border-left: 1px solid #e5e8ec;}
|
||||
@@ -22,11 +21,14 @@
|
||||
.block-welcome .panel-body {padding-top: 15px;}
|
||||
.block-welcome .user-notification-icon {position: relative;display: inline-block;margin-left: 5px;}
|
||||
.block-welcome .user-notification-icon .label-badge {position: absolute;top: 1px;right: -8px;min-width: 16px;padding: 2px;font-size: 12px;font-weight: normal;}
|
||||
.block-welcome.block-sm .col-right {padding: 0;}
|
||||
.block-welcome.block-sm .col-right .tiles {border-left: none; padding-left: 0}
|
||||
.block-welcome.block-sm .tile-title {font-size: 12px; margin: 0 -10px;}
|
||||
</style>
|
||||
<div class='panel-move-handler'></div>
|
||||
<div class="panel-body conatiner-fluid">
|
||||
<div class="row">
|
||||
<div class="col col-left">
|
||||
<div class="table-row">
|
||||
<div class="col col-left hide-in-sm">
|
||||
<h4><?php printf($lang->block->welcomeList[$welcomeType], $app->user->realname)?></h4>
|
||||
<ul class="timeline timeline-sm">
|
||||
<?php
|
||||
|
||||
@@ -1111,14 +1111,6 @@ class bug extends control
|
||||
*/
|
||||
public function linkBugs($bugID, $browseType = '', $param = 0)
|
||||
{
|
||||
/* Link bugs. */
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->bug->linkBugs($bugID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.loadLinkBugs('$bugID')}"));
|
||||
die(js::locate($this->createLink('bug', 'edit', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Get bug and queryID. */
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
|
||||
@@ -54,33 +54,3 @@ function loadModuleRelated()
|
||||
productID = $('#product').val();
|
||||
setStories(moduleID, productID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param int $bug2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function unlinkBug(bugID, bug2Unlink)
|
||||
{
|
||||
link = createLink('bug', 'unlinkBug', 'bugID=' + bugID + '&bug2Unlink=' + bug2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkBugBox').load(createLink('bug', 'ajaxGetLinkBugs', 'bugID=' + bugID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load linkBugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadLinkBugs(bugID)
|
||||
{
|
||||
bugLink = createLink('bug', 'ajaxGetLinkBugs', 'bugID=' + bugID);
|
||||
$('#linkBugBox').load(bugLink);
|
||||
}
|
||||
|
||||
+1
-57
@@ -618,6 +618,7 @@ class bugModel extends model
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
->join('mailto', ',')
|
||||
->join('linkBug', ',')
|
||||
->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now)
|
||||
->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now)
|
||||
@@ -1159,26 +1160,6 @@ class bugModel extends model
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Link related bugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkBugs($bugID)
|
||||
{
|
||||
if($this->post->bugs == false) return;
|
||||
|
||||
$bug = $this->getById($bugID);
|
||||
$bugs2Link = $this->post->bugs;
|
||||
|
||||
$bugs = implode(',', $bugs2Link) . ',' . trim($bug->linkBug, ',');
|
||||
$this->dao->update(TABLE_BUG)->set('linkBug')->eq(trim($bugs, ','))->where('id')->eq($bugID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('bug', $bugID, 'linkRelatedBug', '', implode(',', $bugs2Link));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs to link.
|
||||
*
|
||||
@@ -1207,43 +1188,6 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param int $bug2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkBug($bugID, $bug2Unlink = 0)
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
|
||||
$bugs = explode(',', trim($bug->linkBug, ','));
|
||||
foreach($bugs as $key => $bugId)
|
||||
{
|
||||
if($bugId == $bug2Unlink) unset($bugs[$key]);
|
||||
}
|
||||
$bugs = implode(',', $bugs);
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('linkBug')->eq($bugs)->where('id')->eq($bugID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('bug', $bugID, 'unlinkRelatedBug', '', $bug2Unlink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linkBugs.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkBugs($bugID)
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
return $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Build search form.
|
||||
*
|
||||
|
||||
@@ -272,19 +272,20 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='linkBugBox'>
|
||||
<?php
|
||||
if(isset($bug->linkBugTitles))
|
||||
{
|
||||
foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle)
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "bugID=$linkBugID"), "#$linkBugID " . $linkBugTitle, '_blank');
|
||||
echo html::a("javascript:unlinkBug($bug->id, $linkBugID)", '<i class="icon-remove"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if(isset($bug->linkBugTitles))
|
||||
{
|
||||
foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle)
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkBug[]' value=$linkBugID />";
|
||||
echo "<label>#{$linkBugID} {$linkBugTitle}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkBugsBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='space'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
@@ -19,11 +19,11 @@
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->bug->linkBugs;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<div id='queryBox' class='show'></div>
|
||||
<div id='queryBox' class='show divider'></div>
|
||||
<?php if($bugs2Link):?>
|
||||
<form class='main-table' method='post' data-ride='table' target='hiddenwin' id='linkBugsForm'>
|
||||
<table class='table' id='bugList'>
|
||||
<thead class='hl-gray'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id">
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
@@ -64,10 +64,33 @@
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton();?></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($bugCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('bug', $bug->id);?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if($bugs2Link):?>
|
||||
$('#linkBugsForm').table();
|
||||
setTimeout(function(){$('#linkBugsForm .table-footer').removeClass('fixed-footer');}, 100);
|
||||
<?php endif;?>
|
||||
|
||||
$('#submit').click(function(){
|
||||
var output = '';
|
||||
$('#linkBugsForm').find('tr.checked').each(function(){
|
||||
var bugID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var bugTitle = "#" + bugID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var checkbox = "<li><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkBug[]' " + "value=" + bugID + " /><label>" + bugTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#linkBugsBox').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -944,12 +944,13 @@ EOD;
|
||||
$magicQuote = get_magic_quotes_gpc();
|
||||
foreach($new as $key => $value)
|
||||
{
|
||||
if(strtolower($key) == 'lastediteddate') continue;
|
||||
if(strtolower($key) == 'lasteditedby') continue;
|
||||
if(strtolower($key) == 'assigneddate') continue;
|
||||
if(strtolower($key) == 'editedby') continue;
|
||||
if(strtolower($key) == 'editeddate') continue;
|
||||
if(strtolower($key) == 'uid') continue;
|
||||
if(is_object($value) or is_array($value)) continue;
|
||||
if(strtolower($key) == 'lastediteddate') continue;
|
||||
if(strtolower($key) == 'lasteditedby') continue;
|
||||
if(strtolower($key) == 'assigneddate') continue;
|
||||
if(strtolower($key) == 'editedby') continue;
|
||||
if(strtolower($key) == 'editeddate') continue;
|
||||
if(strtolower($key) == 'uid') continue;
|
||||
if(strtolower($key) == 'finisheddate' && $value == '') continue;
|
||||
if(strtolower($key) == 'canceleddate' && $value == '') continue;
|
||||
if(strtolower($key) == 'closeddate' && $value == '') continue;
|
||||
@@ -1589,6 +1590,7 @@ EOD;
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
curl_setopt($curl, CURLOPT_ENCODING, "");
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
curl_setopt($curl, CURLOPT_HEADER, FALSE);
|
||||
|
||||
$headers[] = "API-RemoteIP: " . $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
$(function()
|
||||
{
|
||||
<?php if(!empty($setShowModule)):?>
|
||||
$('#sidebar .cell .text-center:last').append("<a href='javascript:;' data-toggle='showModuleModal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
|
||||
$('#sidebar .cell .text-center:last').append("<a href='#showModuleModal' data-toggle='modal' class='text-secondary small'><?php echo $lang->datatable->showModule?></a><hr class='space-sm' />");
|
||||
<?php endif;?>
|
||||
|
||||
var $btnToolbar = $('#main .table-header .btn-toolbar:first');
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->group->confirmDelete);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
@@ -24,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-table'>
|
||||
<table class='table' id='groupList'>
|
||||
<table class='table tablesorter' id='groupList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<main id="main">
|
||||
<div class="container">
|
||||
<div class="container" id='<?php echo $version;?>'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block mw-800px'>
|
||||
<div class='main-header clearfix'>
|
||||
<h2 class='pull-left'><?php echo $lang->changeLog ?></h2>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class='dropdown' id='versionMenu'>
|
||||
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $version) ?> <span class='caret'></span></button>
|
||||
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$version] . ' ' . $version) ?> <span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php foreach(array_keys($lang->misc->feature->all) as $versionName):?>
|
||||
<li<?php echo $versionName === $version ? " class='active'" : '' ?>>
|
||||
|
||||
@@ -116,8 +116,8 @@ $lang->product->aclList['open'] = "默认设置(有{$lang->productCommon}视
|
||||
$lang->product->aclList['private'] = "私有{$lang->productCommon}(只有{$lang->productCommon}相关负责人和{$lang->projectCommon}团队成员才能访问)";
|
||||
$lang->product->aclList['custom'] = '自定义白名单(团队成员和白名单的成员可以访问)';
|
||||
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率<strong>%s</strong>。";
|
||||
$lang->product->checkedSummary = "选中 <strong>%total%</strong> 个需求,预计 <strong>%estimate%</strong> 个工时,用例覆盖率<strong>%rate%</strong>。";
|
||||
$lang->product->storySummary = "本页共 <strong>%s</strong> 个需求,预计 <strong>%s</strong> 个工时,用例覆盖率 <strong>%s</strong>。";
|
||||
$lang->product->checkedSummary = "选中 <strong>%total%</strong> 个需求,预计 <strong>%estimate%</strong> 个工时,用例覆盖率 <strong>%rate%</strong>。";
|
||||
$lang->product->noModule = '<div>您现在还没有模块信息</div><div>请维护产品模块</div>';
|
||||
$lang->product->noProduct = '暂时没有产品。';
|
||||
$lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $plan->id;?></span>
|
||||
<span title='<?php echo $plan->name;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<span title='<?php echo $plan->title;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branches[$branch] . '</span>';?>
|
||||
<span class='label label-info label-badge'>
|
||||
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
|
||||
@@ -67,8 +67,8 @@
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<?php $canOrder = common::hasPriv('project', 'storySort');?>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<div class='actions'>
|
||||
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
|
||||
@@ -1139,14 +1139,6 @@ class story extends control
|
||||
$products = $this->product->getPairs();
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
|
||||
/* Link stories. */
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->story->linkStories($storyID, $type);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.loadLinkedStories('$storyID', '$type')}"));
|
||||
die(js::locate($this->createLink('story', 'edit', "storyID=$storyID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
$actionURL = $this->createLink('story', 'linkStory', "storyID=$storyID&type=$type&browseType=bySearch&queryID=myQueryID", '', true);
|
||||
$this->loadModel('product')->buildSearchForm($story->product, $products, $queryID, $actionURL);
|
||||
@@ -1164,49 +1156,6 @@ class story extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: if type is linkStories, get related stories else get child stories.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetLinkedStories($storyID, $type = '')
|
||||
{
|
||||
/* Get linked stories. */
|
||||
$stories = $this->story->getLinkedStories($storyID, $type);
|
||||
|
||||
/* Build linked stories list. */
|
||||
$output = '';
|
||||
foreach($stories as $storyId => $storyTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "storyID=$storyId"), "#$storyId " . $storyTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkStory($storyID, \"$type\", $storyId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
* @param int $story2Unlink
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function unlinkStory($storyID, $type = '', $story2Unlink = 0)
|
||||
{
|
||||
/* Unlink related story if type is linkStories else unlink child story. */
|
||||
$this->story->unlinkStory($storyID, $type, $story2Unlink);
|
||||
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get stories of a project in html select.
|
||||
*
|
||||
|
||||
@@ -1,41 +1,3 @@
|
||||
/**
|
||||
* Unlink story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $linkType
|
||||
* @param int story2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function unlinkStory(storyID, linkType, story2Unlink)
|
||||
{
|
||||
link = createLink('story', 'unlinkStory', 'storyID=' + storyID + '&type=' + linkType + '&story2Unlink=' + story2Unlink);
|
||||
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success')
|
||||
{
|
||||
if(linkType == 'linkStories') $('#linkStoriesBox').load(createLink('story', 'ajaxGetLinkedStories', 'storyID=' + storyID + '&type=' + linkType));
|
||||
if(linkType == 'childStories') $('#childStoriesBox').load(createLink('story', 'ajaxGetLinkedStories', 'storyID=' + storyID + '&type=' + linkType));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load linked stories.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $linkType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadLinkedStories(storyID, linkType)
|
||||
{
|
||||
storyLink = createLink('story', 'ajaxGetLinkedStories', 'storyID=' + storyID + '&type=' + linkType);
|
||||
if(linkType == 'linkStories') $('#linkStoriesBox').load(storyLink);
|
||||
if(linkType == 'childStories') $('#childStoriesBox').load(storyLink);
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('.main-side #branch').closest('td').find('#product_chosen .chosen-single').css('width', '153px');
|
||||
|
||||
+3
-63
@@ -493,7 +493,9 @@ class storyModel extends model
|
||||
->setIF($this->post->closedReason != false and $this->post->closedBy == false, 'closedBy', $this->app->user->account)
|
||||
->join('reviewedBy', ',')
|
||||
->join('mailto', ',')
|
||||
->remove('linkStories,childStories,files,labels,comment,contactListMenu')
|
||||
->join('linkStories', ',')
|
||||
->join('childStories', ',')
|
||||
->remove('files,labels,comment,contactListMenu')
|
||||
->get();
|
||||
if(isset($story->plan) and is_array($story->plan)) $story->plan = trim(join(',', $story->plan), ',');
|
||||
if(empty($_POST['product'])) $story->branch = $oldStory->branch;
|
||||
@@ -1239,28 +1241,6 @@ class storyModel extends model
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Link stories.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkStories($storyID, $type = 'linkStories')
|
||||
{
|
||||
if($this->post->stories == false) return;
|
||||
|
||||
$story = $this->getById($storyID);
|
||||
$stories2Link = $this->post->stories;
|
||||
|
||||
$stories = implode(',', $stories2Link) . ',' . trim($story->$type, ',');
|
||||
$this->dao->update(TABLE_STORY)->set($type)->eq(trim($stories, ','))->where('id')->eq($storyID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$action = ($type == 'linkStories') ? 'linkRelatedStory' : 'subdivideStory';
|
||||
$this->loadModel('action')->create('story', $storyID, $action, '', implode(',', $stories2Link));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stories to link.
|
||||
*
|
||||
@@ -1290,46 +1270,6 @@ class storyModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
* @param int $story2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkStory($storyID, $type = 'linkStories', $story2Unlink = 0)
|
||||
{
|
||||
$story = $this->getById($storyID);
|
||||
|
||||
$oldLinkedStories = explode(',', trim($story->$type, ','));
|
||||
foreach($oldLinkedStories as $key => $storyId)
|
||||
{
|
||||
if($storyId == $story2Unlink) unset($oldLinkedStories[$key]);
|
||||
}
|
||||
$stories = implode(',', $oldLinkedStories);
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set($type)->eq($stories)->where('id')->eq($storyID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$action = ($type == 'linkStories') ? 'unlinkRelatedStory' : 'unlinkChildStory';
|
||||
$this->loadModel('action')->create('story', $storyID, $action, '', $story2Unlink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linked stories.
|
||||
*
|
||||
* @param string $storyID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkedStories($storyID, $type = 'linkStories')
|
||||
{
|
||||
$story = $this->getById($storyID);
|
||||
return $this->dao->select('id, title')->from(TABLE_STORY)->where('id')->in($story->$type)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stories list of a product.
|
||||
*
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
<?php echo html::textarea('comment', '', "rows='5' class='form-control'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='linkStoriesBOX'><?php echo html::hidden('linkStories', $story->linkStories);?></div>
|
||||
<div id='childStoriesBOX'><?php echo html::hidden('childStories', $story->childStories);?></div>
|
||||
<div class='actions form-actions text-center'>
|
||||
<?php
|
||||
echo html::hidden('lastEditedDate', $story->lastEditedDate);
|
||||
@@ -200,23 +198,25 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<?php if($story->linkStories):?>
|
||||
<ul class='list-unstyled' id='linkStoriesBox'>
|
||||
<?php
|
||||
$linkStories = explode(',', $story->linkStories);
|
||||
foreach($linkStories as $linkStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$linkStoryID]))
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "storyID=$linkStoryID"), "#$linkStoryID " . $story->extraStories[$linkStoryID], '_blank');
|
||||
echo html::a("javascript:unlinkStory($story->id, \"linkStories\", $linkStoryID)", '<i class="icon-remove"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if($story->linkStories)
|
||||
{
|
||||
$linkStories = explode(',', $story->linkStories);
|
||||
foreach($linkStories as $linkStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$linkStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkStories[]' value=$linkStoryID />";
|
||||
echo "<label>#{$linkStoryID} {$story->extraStories[$linkStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkStoriesBox'></span>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($story->status == 'closed'):?>
|
||||
@@ -224,20 +224,29 @@
|
||||
<th><?php echo $lang->story->childStories;?></th>
|
||||
<td>
|
||||
<?php echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=childStories", '', true), $lang->story->linkStory, '', "data-toggle='modal' data-type='iframe' data-width='95%'");?>
|
||||
<ul class='list-unstyled' id='childStoriesBox'>
|
||||
<?php
|
||||
$childStories = explode(',', $story->childStories);
|
||||
foreach($childStories as $childStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$childStoryID]))
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "storyID=$childStoryID"), "#$childStoryID" . $story->extraStories[$childStoryID], '_blank');
|
||||
echo html::a("javascript:unlinkStory($story->id, \"childStories\", $childStoryID)", '<i class="icon-remove"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if($story->childStories)
|
||||
{
|
||||
$childStories = explode(',', $story->childStories);
|
||||
foreach($childStories as $childStoryID)
|
||||
{
|
||||
if(isset($story->extraStories[$childStoryID]))
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='childStories[]' value=$childStoryID />";
|
||||
echo "<label>#{$childStoryID} {$story->extraStories[$childStoryID]}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='childStoriesBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include './header.html.php';?>
|
||||
<?php js::set('linkType', $type);?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
@@ -33,7 +34,7 @@
|
||||
</div>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->story->product;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
@@ -53,7 +54,7 @@
|
||||
</div>
|
||||
<?php echo html::a($storyLink, sprintf('%03d', $story2Link->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story2Link->pri, $story2Link->pri)?>'><?php echo zget($lang->story->priList, $story2Link->pri, $story2Link->pri);?></span></td>
|
||||
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story2Link->pri?>' title='<?php echo zget($lang->story->priList, $story2Link->pri, $story2Link->pri);?>'><?php echo zget($lang->story->priList, $story2Link->pri, $story2Link->pri);?></span></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story2Link->product&branch=$story2Link->branch"), $products[$story2Link->product], '_blank');?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story2Link->title?>"><?php echo html::a($storyLink, $story2Link->title, '_blank');?></td>
|
||||
<td><?php echo $story2Link->planTitle;?></td>
|
||||
@@ -81,6 +82,20 @@ $(function()
|
||||
$('#linkStoryForm').table();
|
||||
setTimeout(function(){$('#linkStoryForm .table-footer').removeClass('fixed-footer');}, 100);
|
||||
<?php endif;?>
|
||||
|
||||
$('#submit').click(function(){
|
||||
var output = '';
|
||||
$('#linkStoryForm').find('tr.checked').each(function(){
|
||||
var storyID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var storyName = "#" + storyID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var checkbox = "<li><div class='checkbox-primary'><input type='checkbox' checked='checked' name='" + linkType + "[]' " + "value=" + storyID + " /><label>" + storyName + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#' + linkType + 'Box').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -209,9 +209,6 @@ $(document).ready(function()
|
||||
|
||||
var adjustButtons = function()
|
||||
{
|
||||
$taskTeamEditor.find('.btn-move-up.disabled,.btn-move-down.disabled,.btn-delete.disabled').removeClass('disabled').attr('disabled', null);
|
||||
$taskTeamEditor.find('.btn-move-up:first').addClass('disabled').attr('disabled', 'disabled');
|
||||
$taskTeamEditor.find('.btn-move-down:last').addClass('disabled').attr('disabled', 'disabled');
|
||||
var $deleteBtn = $taskTeamEditor.find('.btn-delete');
|
||||
if ($deleteBtn.length == 1) $deleteBtn.addClass('disabled').attr('disabled', 'disabled');
|
||||
};
|
||||
@@ -233,19 +230,7 @@ $(document).ready(function()
|
||||
$row.remove();
|
||||
adjustButtons();
|
||||
});
|
||||
}).on('click', '.btn-move-up, .btn-move-down', function()
|
||||
{
|
||||
var $this = $(this);
|
||||
if($this.hasClass('btn-move-up'))
|
||||
{
|
||||
$(this).parents('tr').prev().before($(this).parents('tr'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this.parents('tr').next().after($(this).parents('tr'));
|
||||
}
|
||||
adjustButtons();
|
||||
});;
|
||||
});
|
||||
|
||||
adjustButtons();
|
||||
});
|
||||
|
||||
+2
-17
@@ -93,7 +93,7 @@ $(document).ready(function()
|
||||
var $taskTeamEditor = $('#taskTeamEditor').batchActionForm(
|
||||
{
|
||||
idStart: 0,
|
||||
idEnd: 5,
|
||||
idEnd: newRowCount - 1,
|
||||
chosen: true,
|
||||
datetimepicker: false,
|
||||
colorPicker: false,
|
||||
@@ -102,9 +102,6 @@ $(document).ready(function()
|
||||
|
||||
var adjustButtons = function()
|
||||
{
|
||||
$taskTeamEditor.find('.btn-move-up.disabled,.btn-move-down.disabled,.btn-delete.disabled').removeClass('disabled').attr('disabled', null);
|
||||
$taskTeamEditor.find('.btn-move-up:first').addClass('disabled').attr('disabled', 'disabled');
|
||||
$taskTeamEditor.find('.btn-move-down:last').addClass('disabled').attr('disabled', 'disabled');
|
||||
var $deleteBtn = $taskTeamEditor.find('.btn-delete');
|
||||
if ($deleteBtn.length == 1) $deleteBtn.addClass('disabled').attr('disabled', 'disabled');
|
||||
};
|
||||
@@ -126,19 +123,7 @@ $(document).ready(function()
|
||||
$row.remove();
|
||||
adjustButtons();
|
||||
});
|
||||
}).on('click', '.btn-move-up, .btn-move-down', function()
|
||||
{
|
||||
var $this = $(this);
|
||||
if($this.hasClass('btn-move-up'))
|
||||
{
|
||||
$(this).parents('tr').prev().before($(this).parents('tr'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this.parents('tr').next().after($(this).parents('tr'));
|
||||
}
|
||||
adjustButtons();
|
||||
});;
|
||||
});
|
||||
|
||||
adjustButtons();
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('toTaskList', $config->global->flow == 'onlyTask' || !empty($task->id));?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
@@ -181,7 +182,7 @@
|
||||
</div>
|
||||
<div class='modal-content with-padding'>
|
||||
<table class="table table-form" id='taskTeamEditor'>
|
||||
<tbody>
|
||||
<tbody class='sortable'>
|
||||
<tr class='template'>
|
||||
<td><?php echo html::select("team[]", $members, '', "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
@@ -190,11 +191,10 @@
|
||||
<span class='input-group-addon'><?php echo $lang->task->hour;?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='w-130px'>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-up'><i class='icon-arrow-up'></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-down'><i class='icon-arrow-down'></i></button>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
|
||||
<td class='w-130px sort-handler'>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('oldStoryID', $task->story); ?>
|
||||
<?php js::set('oldAssignedTo', $task->assignedTo); ?>
|
||||
<?php js::set('oldProjectID', $task->project); ?>
|
||||
<?php js::set('confirmChangeProject', $lang->task->confirmChangeProject); ?>
|
||||
<?php js::set('changeProjectConfirmed', false); ?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('oldStoryID', $task->story);?>
|
||||
<?php js::set('oldAssignedTo', $task->assignedTo);?>
|
||||
<?php js::set('oldProjectID', $task->project);?>
|
||||
<?php js::set('confirmChangeProject', $lang->task->confirmChangeProject);?>
|
||||
<?php js::set('changeProjectConfirmed', false);?>
|
||||
<?php js::set('newRowCount', count($task->team) < 6 ? 6 - count($task->team) : 1);?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
|
||||
<div class='main-header'>
|
||||
@@ -219,7 +221,7 @@
|
||||
</div>
|
||||
<div class="modal-content with-padding" id='taskTeamEditor'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tbody class="sortable">
|
||||
<?php foreach($task->team as $member):?>
|
||||
<tr>
|
||||
<td class='w-250px'><?php echo html::select("team[]", $members, $member->account, "class='form-control chosen'")?></td>
|
||||
@@ -233,10 +235,10 @@
|
||||
<?php echo html::input("teamLeft[]", $member->left, "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='w-130px'>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-up'><i class='icon-arrow-up'></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-down'><i class='icon-arrow-down'></i></button>
|
||||
<td class='w-130px sort-handler'>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@@ -252,10 +254,9 @@
|
||||
<?php echo html::input("teamLeft[]", '', "class='form-control text-center' placeholder='{$lang->task->hour}'")?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='w-130px'>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-up'><i class='icon-arrow-up'></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move-down'><i class='icon-arrow-down'></i></button>
|
||||
<td class='w-130px sort-handler'>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
|
||||
<button type='button' class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
|
||||
<button type="button" class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -931,14 +931,6 @@ class testcase extends control
|
||||
*/
|
||||
public function linkCases($caseID, $browseType = '', $param = 0)
|
||||
{
|
||||
/* Link cases. */
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->testcase->linkCases($caseID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.loadLinkCases('$caseID')}"));
|
||||
die(js::locate($this->createLink('testcase', 'edit', "caseID=$caseID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Get case and queryID. */
|
||||
$case = $this->testcase->getById($caseID);
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
@@ -965,47 +957,6 @@ class testcase extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: get linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetLinkCases($caseID)
|
||||
{
|
||||
/* Get linkCases. */
|
||||
$cases = $this->testcase->getLinkCases($caseID);
|
||||
|
||||
/* Build linkCase list. */
|
||||
$output = '';
|
||||
foreach($cases as $caseId => $caseTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "caseID=$caseId"), "#$caseId " . $caseTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkCase($caseID, $caseId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function unlinkCase($caseID, $case2Unlink = 0)
|
||||
{
|
||||
/* Unlink related case. */
|
||||
$this->testcase->unlinkCase($caseID, $case2Unlink);
|
||||
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* Confirm testcase changed.
|
||||
*
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
.col-side .chosen-container {width: 218px!important}
|
||||
.table-form > tbody > tr > td .btn.addbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
.table-form > tbody > tr > td .btn.delbutton {display:block; margin:1px 0px; width:40px; padding:1px 6px;}
|
||||
#linkCaseBox li {margin-left:-56px}
|
||||
|
||||
@@ -20,37 +20,6 @@ $(document).ready(function()
|
||||
initSteps();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function unlinkCase(caseID, case2Unlink)
|
||||
{
|
||||
link = createLink('testcase', 'unlinkCase', 'caseID=' + caseID + '&case2Unlink=' + case2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkCaseBox').load(createLink('testcase', 'ajaxGetLinkCases', 'caseID=' + caseID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadLinkCases(caseID)
|
||||
{
|
||||
caseLink = createLink('testcase', 'ajaxGetLinkCases', 'caseID=' + caseID);
|
||||
$('#linkCaseBox').load(caseLink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load lib modules.
|
||||
*
|
||||
|
||||
@@ -651,6 +651,7 @@ class testcaseModel extends model
|
||||
->setIF($this->post->story != false and $this->post->story != $oldCase->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setDefault('story,branch', 0)
|
||||
->join('stage', ',')
|
||||
->join('linkCase', ',')
|
||||
->remove('comment,steps,expects,files,labels,stepType')
|
||||
->get();
|
||||
if(!$this->forceNotReview() and $stepChanged) $case->status = 'wait';
|
||||
@@ -749,26 +750,6 @@ class testcaseModel extends model
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Link related cases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCases($caseID)
|
||||
{
|
||||
if($this->post->cases == false) return;
|
||||
|
||||
$case = $this->getById($caseID);
|
||||
$cases2Link = $this->post->cases;
|
||||
|
||||
$cases = implode(',', $cases2Link) . ',' . trim($case->linkCase, ',');
|
||||
$this->dao->update(TABLE_CASE)->set('linkCase')->eq(trim($cases, ','))->where('id')->eq($caseID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('case', $caseID, 'linkRelatedCase', '', implode(',', $cases2Link));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cases to link.
|
||||
*
|
||||
@@ -797,43 +778,6 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkCase($caseID, $case2Unlink = 0)
|
||||
{
|
||||
$case = $this->getById($caseID);
|
||||
|
||||
$cases = explode(',', trim($case->linkCase, ','));
|
||||
foreach($cases as $key => $caseId)
|
||||
{
|
||||
if($caseId == $case2Unlink) unset($cases[$key]);
|
||||
}
|
||||
$cases = implode(',', $cases);
|
||||
|
||||
$this->dao->update(TABLE_CASE)->set('linkCase')->eq($cases)->where('id')->eq($caseID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$this->loadModel('action')->create('case', $caseID, 'unlinkRelatedCase', '', $case2Unlink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linkCases.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinkCases($caseID)
|
||||
{
|
||||
$case = $this->getById($caseID);
|
||||
return $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($case->linkCase)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch update testcases.
|
||||
*
|
||||
|
||||
@@ -225,19 +225,20 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<ul class='list-unstyled' id='linkCaseBox'>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo '<li>';
|
||||
echo html::a(inlink('view', "caseID=$linkCaseID"), "#$linkCaseID " . $linkCaseTitle, '_blank');
|
||||
echo html::a("javascript:unlinkCase($case->id, $linkCaseID)", '<i class="icon-trash"></i>', '', "title='{$lang->unlink}' style='float:right'");
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
if(isset($case->linkCaseTitles))
|
||||
{
|
||||
foreach($case->linkCaseTitles as $linkCaseID => $linkCaseTitle)
|
||||
{
|
||||
echo "<li><div class='checkbox-primary'>";
|
||||
echo "<input type='checkbox' checked='checked' name='linkCase[]' value=$linkCaseID />";
|
||||
echo "<label>#{$linkCaseID} {$linkCaseTitle}</label>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id='linkCaseBox'></span>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,16 +11,15 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $case->id;?></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank', "class='text' title='{$case->title}'");?> <span class='text-muted'><i class="icon-angle-right"></i> <span><?php echo $lang->testcase->linkCases;?></span></span>
|
||||
</div>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $case->id;?></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', "caseID={$case->id}"), $case->title, '_blank');?>
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->testcase->linkCases;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id='queryBox' class='cell show'></div>
|
||||
<div id='mainContent'>
|
||||
<div id='queryBox' class='show divider'></div>
|
||||
<?php if($cases2Link):?>
|
||||
<form class='main-table' method='post' target='hiddenwin' id='linkCasesForm' data-ride='table'>
|
||||
<table class='table' id='caseList'>
|
||||
@@ -33,6 +32,7 @@
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->product;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class='w-type'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
@@ -51,7 +51,8 @@
|
||||
<?php printf('%03d', $case2Link->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?>'><?php echo zget($lang->testcase->priList, $case2Link->pri, $case2Link->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID={$case2Link->product}&branch={$case2Link->branch}"), $products[$case2Link->product], '_blank');?></td>
|
||||
<td class='text-left' title='<?php echo $case2Link->title;?>'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case2Link->id"), $case2Link->title, '_blank');?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case2Link->type];?></td>
|
||||
<td><?php echo $users[$case2Link->openedBy];?></td>
|
||||
<td class='case-<?php echo $case2Link->status?>'><?php echo $lang->testcase->statusList[$case2Link->status];?></td>
|
||||
@@ -62,10 +63,33 @@
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar show-always'><?php echo html::submitButton('', '', 'btn btn-secondary');?></div>
|
||||
<div class="table-actions btn-toolbar"><?php if($caseCount) echo html::submitButton('', '', 'btn btn-default');?></div>
|
||||
<?php echo html::hidden('case', $case->id);?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if($cases2Link):?>
|
||||
$('#linkCasesForm').table();
|
||||
setTimeout(function(){$('#linkCasesForm .table-footer').removeClass('fixed-footer');}, 100);
|
||||
<?php endif;?>
|
||||
|
||||
$('#submit').click(function(){
|
||||
var output = '';
|
||||
$('#linkCasesForm').find('tr.checked').each(function(){
|
||||
var caseID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var caseTitle = "#" + caseID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var checkbox = "<li><div class='checkbox-primary'><input type='checkbox' checked='checked' name='linkCase[]' " + "value=" + caseID + " /><label>" + caseTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
$.closeModal();
|
||||
parent.$('#linkCaseBox').html(output);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
#todoBatchAddForm .col-id {width: 50px; text-align: center; color: #838A9D}
|
||||
#todoBatchAddForm .col-type {width: 120px;}
|
||||
#todoBatchAddForm .col-pri {width: 90px;}
|
||||
#todoBatchAddForm .col-date {width: 230px;}
|
||||
html[lang="en"] #todoBatchAddForm .col-pri {width: 105px}
|
||||
#todoBatchAddForm .col-date {width: 180px;}
|
||||
#todoBatchAddForm .col-pending {width: 70px;}
|
||||
html[lang="en"] #todoBatchAddForm .col-pending {width: 90px;}
|
||||
#todoBatchAddForm .chosen-container-single .chosen-single {border-radius: 0;}
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;}
|
||||
#todoBatchAddForm .control-time-begin + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;}
|
||||
#todoBatchAddHeader [name="date"]:disabled {color: #ccc; text-decoration: line-through;}
|
||||
.main-header > .input-group {width: 240px;}
|
||||
.main-header > .input-group {width: 240px;}
|
||||
html[lang="en"] .main-header > .input-group {width: 250px;}
|
||||
|
||||
@@ -26,7 +26,7 @@ class todoModel extends model
|
||||
$todo = fixer::input('post')
|
||||
->add('account', $this->app->user->account)
|
||||
->setDefault('idvalue', 0)
|
||||
->cleanInt('date, pri, begin, end, private')
|
||||
->cleanInt('pri, begin, end, private')
|
||||
->setIF($this->post->type == 'bug' and $this->post->bug, 'idvalue', $this->post->bug)
|
||||
->setIF($this->post->type == 'task' and $this->post->task, 'idvalue', $this->post->task)
|
||||
->setIF($this->post->type == 'story' and $this->post->story, 'idvalue', $this->post->story)
|
||||
@@ -87,7 +87,7 @@ class todoModel extends model
|
||||
*/
|
||||
public function batchCreate()
|
||||
{
|
||||
$todos = fixer::input('post')->cleanInt('date')->get();
|
||||
$todos = fixer::input('post')->get();
|
||||
for($i = 0; $i < $this->config->todo->batchCreate; $i++)
|
||||
{
|
||||
if($todos->names[$i] != '' || isset($todos->bugs[$i + 1]) || isset($todos->tasks[$i + 1]))
|
||||
@@ -149,7 +149,7 @@ class todoModel extends model
|
||||
$oldTodo = $this->dao->findById((int)$todoID)->from(TABLE_TODO)->fetch();
|
||||
if(in_array($oldTodo->type, array('bug', 'task', 'story'))) $oldTodo->name = '';
|
||||
$todo = fixer::input('post')
|
||||
->cleanInt('date, pri, begin, end, private')
|
||||
->cleanInt('pri, begin, end, private')
|
||||
->add('account', $oldTodo->account)
|
||||
->setIF(in_array($oldTodo->type, array('bug', 'task', 'story')), 'name', '')
|
||||
->setIF($this->post->date == false, 'date', '2030-01-01')
|
||||
@@ -499,7 +499,7 @@ class todoModel extends model
|
||||
$newTodo->date = $newDate;
|
||||
$this->dao->insert(TABLE_TODO)->data($newTodo)->exec();
|
||||
$this->action->create('todo', $this->dao->lastInsertID(), 'opened', '', '', $newTodo->account);
|
||||
$lastCycleList[$todo->id] = $newTodo;
|
||||
$lastCycleList[$todoID] = $newTodo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
|
||||
<div id="mainContent" class="main-content">
|
||||
<div id="mainContent">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->todo->batchCreate . $lang->todo->common;?></h2>
|
||||
<div class="input-group pull-left" style='width:255px;'>
|
||||
@@ -40,54 +40,52 @@
|
||||
}
|
||||
$columns = count($visibleFields) + 2;
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='col-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='col-type<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->todo->type;?></th>
|
||||
<th class='col-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->todo->pri;?></th>
|
||||
<th class='col-name required'><?php echo $lang->todo->name;?></th>
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'desc', ' hidden');?>'><?php echo $lang->todo->desc;?></th>
|
||||
<th class='col-date<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-70px'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $pri = 3;?>
|
||||
<?php $time = $date != date('Y-m-d') ? key($times) : $time;?>
|
||||
<?php for($i = 0; $i < $config->todo->batchCreate; $i++):?>
|
||||
<tr class='text-left'>
|
||||
<td class='col-id'><?php echo $i+1;?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?> style='overflow:visible'><?php echo html::select("types[$i]", $lang->todo->typeList, '', "onchange='loadList(this.value, " . ($i + 1) . ")' class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?> style='overflow:visible'><?php echo html::select("pris[$i]", $lang->todo->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . ($i+1);?>' class='hidden'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
<div class='<?php echo "nameBox" . ($i+1);?>'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$i]", '', "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control chosen control-time-begin'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control chosen control-time-end'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" class='control-time-switch' onclick='switchDateList(<?php echo $i?>);' />
|
||||
<label for="switchDate<?php echo $i?>"> <?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td class='text-center form-actions' colspan='<?php echo isset($visibleFields['beginAndEnd']) ? $columns + 1 : $columns;?>'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::backButton('', '', 'btn btn-wide');?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='col-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='col-type<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->todo->type;?></th>
|
||||
<th class='col-pri<?php echo zget($visibleFields, 'pri', ' hidden')?>'><?php echo $lang->todo->pri;?></th>
|
||||
<th class='col-name required'><?php echo $lang->todo->name;?></th>
|
||||
<th class='col-desc<?php echo zget($visibleFields, 'desc', ' hidden');?>'><?php echo $lang->todo->desc;?></th>
|
||||
<th class='col-date<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='col-pending'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $pri = 3;?>
|
||||
<?php $time = $date != date('Y-m-d') ? key($times) : $time;?>
|
||||
<?php for($i = 0; $i < $config->todo->batchCreate; $i++):?>
|
||||
<tr class='text-left'>
|
||||
<td class='col-id'><?php echo $i+1;?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?> style='overflow:visible'><?php echo html::select("types[$i]", $lang->todo->typeList, '', "onchange='loadList(this.value, " . ($i + 1) . ")' class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?> style='overflow:visible'><?php echo html::select("pris[$i]", $lang->todo->priList, $pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . ($i+1);?>' class='hidden'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
<div class='<?php echo "nameBox" . ($i+1);?>'><?php echo html::input("names[$i]", '', 'class="text-left form-control" autocomplete="off"');?></div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$i]", '', "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("begins[$i]", $times, $time, "onchange=\"setBeginsAndEnds($i, 'begin');\" class='form-control chosen control-time-begin'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
<div class='w-p50 pull-left'>
|
||||
<?php echo html::select("ends[$i]", $times, '', "onchange=\"setBeginsAndEnds($i, 'end');\" class='form-control chosen control-time-end'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $i?>]" id="switchDate<?php echo $i?>" class='control-time-switch' onclick='switchDateList(<?php echo $i?>);' />
|
||||
<label for="switchDate<?php echo $i?>"> <?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td class='text-center form-actions' colspan='<?php echo isset($visibleFields['beginAndEnd']) ? $columns + 1 : $columns;?>'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::backButton('', '', 'btn btn-wide');?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="hidden">
|
||||
<input type="hidden" name="date" value="<?php echo $date;?>" />
|
||||
<input type="checkbox" name="switchDate" class="control-time-switch" />
|
||||
|
||||
@@ -31,79 +31,77 @@
|
||||
$columns = count($visibleFields) + 4;
|
||||
?>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->inlink('batchEdit', "from=todoBatchEdit");?>'>
|
||||
<div class="table-responsive">
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($editedTodos as $todo):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo $todo->id . html::hidden("todoIDList[$todo->id]", $todo->id);?></td>
|
||||
<td><?php echo html::input("dates[$todo->id]", $todo->date, "class='form-control form-date'");?></td>
|
||||
<td class='text-center'>
|
||||
<?php echo zget($lang->todo->typeList, $todo->type);?>
|
||||
<?php echo html::hidden("types[$todo->id]", $todo->type);?>
|
||||
</td>
|
||||
<td style='overflow:visible' <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><? echo html::input("names[$todo->id]", '', "class='text-left form-control hiddenwin' autocomplete='off'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
<?php
|
||||
if($todo->type == 'custom' or $todo->type == 'cycle')
|
||||
{
|
||||
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
|
||||
}
|
||||
elseif($todo->type == 'task')
|
||||
{
|
||||
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
elseif($todo->type == 'bug')
|
||||
{
|
||||
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$todo->id]", $todo->desc, "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
echo '<span class="input-group-addon fix-border fix-padding"></span>';
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
?>
|
||||
<span class="input-group-addon">
|
||||
<div class='checkbox-primary dateSwitcher'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $todo->id;?>]" id="switchDate<?php echo $todo->id;?>" data-key="<?php echo $todo->id;?>" onclick='switchDateList(<?php echo $todo->id?>);' <?php if($todo->begin == '2400') echo "checked='checked'";?>>
|
||||
<label for='switchDate'><?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?> style='overflow:visible'><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($editedTodos as $todo):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo $todo->id . html::hidden("todoIDList[$todo->id]", $todo->id);?></td>
|
||||
<td><?php echo html::input("dates[$todo->id]", $todo->date, "class='form-control form-date'");?></td>
|
||||
<td class='text-center'>
|
||||
<?php echo zget($lang->todo->typeList, $todo->type);?>
|
||||
<?php echo html::hidden("types[$todo->id]", $todo->type);?>
|
||||
</td>
|
||||
<td style='overflow:visible' <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><? echo html::input("names[$todo->id]", '', "class='text-left form-control hiddenwin' autocomplete='off'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
<?php
|
||||
if($todo->type == 'custom' or $todo->type == 'cycle')
|
||||
{
|
||||
echo html::input("names[$todo->id]", $todo->name, "class='form-control' autocomplete='off'"); ;
|
||||
}
|
||||
elseif($todo->type == 'task')
|
||||
{
|
||||
echo html::select("tasks[$todo->id]", $tasks, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
elseif($todo->type == 'bug')
|
||||
{
|
||||
echo html::select("bugs[$todo->id]", $bugs, $todo->idvalue, 'class="form-control chosen"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$todo->id]", $todo->desc, "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
echo '<span class="input-group-addon fix-border fix-padding"></span>';
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
?>
|
||||
<span class="input-group-addon">
|
||||
<div class='checkbox-primary dateSwitcher'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $todo->id;?>]" id="switchDate<?php echo $todo->id;?>" data-key="<?php echo $todo->id;?>" onclick='switchDateList(<?php echo $todo->id?>);' <?php if($todo->begin == '2400') echo "checked='checked'";?>>
|
||||
<label for='switchDate'><?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?> style='overflow:visible'><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -2247,7 +2247,13 @@ class upgradeModel extends model
|
||||
$this->dao->insert(TABLE_HISTORY)->set('`new`')->eq($action->actor)->set('`field`')->eq('closedBy')->set('`action`')->eq($action->id)->exec();
|
||||
$this->dao->insert(TABLE_HISTORY)->set('`new`')->eq($action->date)->set('`old`')->eq('0000-00-00 00:00:00')->set('`field`')->eq('closedDate')->set('`action`')->eq($action->id)->exec();
|
||||
$this->dao->update(TABLE_HISTORY)->set('`new`')->eq('closed')->where('`action`')->eq($action->id)->andWhere('field')->eq('status')->exec();
|
||||
$this->dao->update(TABLE_PROJECT)->set('`status`')->eq('closed')->set('`closedBy`')->eq($action->actor)->set('`closedDate`')->eq($action->date)->where('id')->eq($action->objectID)->exec();
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('`status`')->eq('closed')
|
||||
->set('`closedBy`')->eq($action->actor)
|
||||
->set('`closedDate`')->eq($action->date)
|
||||
->where('id')->eq($action->objectID)
|
||||
->andWhere('status')->eq('done')
|
||||
->exec();
|
||||
}
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
include '../../common/view/header.lite.html.php';
|
||||
if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
|
||||
?>
|
||||
<main id="main" class="fade">
|
||||
<main id="main" class="fade no-padding">
|
||||
<div class="container" id="login">
|
||||
<div id="loginPanel">
|
||||
<header>
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user