Merge branch 'master' into zentaopms_239

This commit is contained in:
wangyidong
2022-10-27 11:39:47 +08:00
370 changed files with 9090 additions and 2016 deletions
+1 -2
View File
@@ -4,5 +4,4 @@
#budgetUnit:focus {border-left: 1px solid #0c64eb;}
#dateRange, .futureBox {vertical-align: top !important; padding-top: 13px !important;}
#endList {vertical-align: top; padding-top: 13px;}
[lang^=en] #endList {vertical-align: top; padding-top: 20px;}
#dataform th {vertical-align: top; padding-top: 13px;}
[lang^=en] #endList {padding-top: 20px;}
-1
View File
@@ -2,4 +2,3 @@
#budgetUnit {border-left: 0px;}
#dateRange, .futureBox {vertical-align: top !important; padding-top: 13px !important;}
#endList {vertical-align: top; padding-top: 13px;}
#dataform th {vertical-align: top; padding-top: 13px;}
+14 -4
View File
@@ -9,7 +9,7 @@ $(function()
$(":checkbox[name^='productIDList']").on('click', function()
{
updateStatistic()
updateStatistic();
});
$(".check-all").on('click', function()
@@ -22,7 +22,17 @@ $(function()
{
$(":checkbox[name^='productIDList']").prop('checked', true);
}
updateStatistic()
updateStatistic();
});
$('.main-table').on('click', 'tr', function(e)
{
if($.cookie('showProductBatchEdit') == 1) updateStatistic();
});
$('#productListForm .table').on('click', '.sortable tr', function(e)
{
if($.cookie('showProductBatchEdit') != 1) e.stopPropagation();
});
});
@@ -37,15 +47,15 @@ function setCheckbox()
{
$('#productListForm .checkbox-primary, #productListForm .check-all').hide();
$('#productListForm .product-id').addClass('hidden');
$(":checkbox[name^='productIDList']").prop('checked', false);
$('.check-all, .sortable tr').removeClass('checked');
if($.cookie('showProductBatchEdit') == 1)
{
$('#productListForm .checkbox-primary, #productListForm .check-all').show();
}
else
{
$(":checkbox[name^='productIDList']").prop('checked', false);
$('.table-actions').hide();
$('.check-all').removeClass('checked');
$('#productListForm .product-id').removeClass('hidden');
}
}
+37 -2
View File
@@ -1,5 +1,35 @@
$(function()
{
$('#projectsForm').table(
{
replaceId: 'projectIdList',
statisticCreator: function(table)
{
var $table = table.getTable();
var $checkedRows = $table.find('tbody>tr.checked');
var checkedTotal = $checkedRows.length;
var statistics = summary;
var checkedStatistics = checkedSummary.replace('%total%', checkedTotal);
if(browseType == 'all')
{
var checkedWait = $checkedRows.filter("[data-status=wait]").length;
var checkedDoing = $checkedRows.filter("[data-status=doing]").length;
var checkedSuspended = $checkedRows.filter("[data-status=suspended]").length;
var checkedClosed = $checkedRows.filter("[data-status=closed]").length;
statistics = allSummary;
checkedStatistics = checkedAllSummary.replace('%total%', checkedTotal)
.replace('%wait%', checkedWait)
.replace('%doing%', checkedDoing)
.replace('%suspended%', checkedSuspended)
.replace('%closed%', checkedClosed);
}
return checkedTotal ? checkedStatistics : statistics;
}
});
$('input[name^="showEdit"]').click(function()
{
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
@@ -24,6 +54,11 @@ $(function()
}
updateStatistic()
});
$('.main-table').on('click', 'tr', function(e)
{
if($.cookie('showProjectBatchEdit') == 1) updateStatistic();
})
});
/**
@@ -35,15 +70,15 @@ $(function()
function setCheckbox()
{
$('#projectsForm .checkbox-primary').hide();
$(":checkbox[name^='projectIdList']").prop('checked', false);
$('.check-all, .sortable tr').removeClass('checked');
if($.cookie('showProjectBatchEdit') == 1)
{
$('#projectsForm .checkbox-primary').show();
}
else
{
$(":checkbox[name^='projectIdList']").prop('checked', false);
$('.table-actions').hide();
$('.check-all').removeClass('checked');
}
}
+14 -14
View File
@@ -1586,11 +1586,11 @@ class programModel extends model
if(common::hasPriv('program', 'suspend') || (common::hasPriv('program', 'close') && $program->status != 'doing') || (common::hasPriv('program', 'activate') && $program->status != 'closed'))
{
$menu .= "<div class='btn-group'>";
$menu .= "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px;'></button>";
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu' style='min-width:auto; padding: 5px 10px;'>";
$menu .= $this->buildMenu('program', 'suspend', $params, $program, $type, 'pause', '', 'iframe', true, '', $this->lang->program->suspend);
if($program->status != 'doing') $menu .= $this->buildMenu('program', 'close', $params, $program, $type, 'off', '', 'iframe', true);
if($program->status != 'closed') $menu .= $this->buildMenu('program', 'activate', $params, $program, $type, 'magic', '', 'iframe', true);
$menu .= "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px;'></button>";
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu'>";
$menu .= $this->buildMenu('program', 'suspend', $params, $program, $type, 'pause', '', 'iframe btn-action btn', true, '', $this->lang->program->suspend);
if($program->status != 'doing') $menu .= $this->buildMenu('program', 'close', $params, $program, $type, 'off', '', 'iframe btn-action btn', true);
if($program->status != 'closed') $menu .= $this->buildMenu('program', 'activate', $params, $program, $type, 'magic', '', 'iframe btn-action btn', true);
$menu .= "</ul>";
$menu .= "</div>";
}
@@ -1614,11 +1614,11 @@ class programModel extends model
if(common::hasPriv('project', 'suspend') || (common::hasPriv('project', 'close') && $program->status != 'doing') || (common::hasPriv('project', 'activate') && $program->status != 'closed'))
{
$menu .= "<div class='btn-group'>";
$menu .= "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px;'></button>";
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu' style='min-width:auto; padding: 5px 10px;'>";
$menu .= $this->buildMenu('project', 'suspend', $params, $program, $type, 'pause', '', 'iframe', true);
if($program->status != 'doing') $menu .= $this->buildMenu('project', 'close', $params, $program, $type, 'off', '', 'iframe', true);
if($program->status != 'closed') $menu .= $this->buildMenu('project', 'activate', $params, $program, $type, 'magic', '', 'iframe', true);
$menu .= "<button type='button' class='btn icon-caret-down dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}' style='width: 16px; padding-left: 0px;'></button>";
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu'>";
$menu .= $this->buildMenu('project', 'suspend', $params, $program, $type, 'pause', '', 'iframe btn-action btn', true);
if($program->status != 'doing') $menu .= $this->buildMenu('project', 'close', $params, $program, $type, 'off', '', 'iframe btn-action btn', true);
if($program->status != 'closed') $menu .= $this->buildMenu('project', 'activate', $params, $program, $type, 'magic', '', 'iframe btn-action btn', true);
$menu .= "</ul>";
$menu .= "</div>";
}
@@ -1631,15 +1631,15 @@ class programModel extends model
if(common::hasPriv('project', 'manageProducts') || common::hasPriv('project', 'whitelist') || common::hasPriv('project', 'delete'))
{
$menu .= "<div class='btn-group'>";
$menu .= "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
$menu .= "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-ellipsis-v'></i></button>";
$menu .= "<ul class='dropdown-menu pull-right text-center' role='menu'>";
$menu .= $this->buildMenu('project', 'manageProducts', "$params&from=program", $program, $type, 'link', '', '', '', "data-app='project'");
$menu .= $this->buildMenu('project', 'manageProducts', "$params&from=program", $program, $type, 'link', '', 'btn-action', '', "data-app='project'");
$disabledWhitelist = $program->acl == 'open' ? " disabled='disabled' style='pointer-events: none;'" : '';
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=browse", $program, $type, 'shield-check', '', '', '', "data-app='project'" . $disabledWhitelist);
$menu .= $this->buildMenu('project', 'whitelist', "$params&module=project&from=browse", $program, $type, 'shield-check', '', 'btn-action', '', "data-app='project'" . $disabledWhitelist);
if(common::hasPriv('project','delete'))
{
$menu .= $this->buildMenu("project", "delete", $params, $program, $type, 'trash', 'hiddenwin', '', '', "data-group='program'", $this->lang->delete);
$menu .= $this->buildMenu("project", "delete", $params, $program, $type, 'trash', 'hiddenwin', 'btn-action', '', "data-group='program'", $this->lang->delete);
}
$menu .= "</ul>";
$menu .= "</div>";
+7 -2
View File
@@ -5,8 +5,8 @@
<thead>
<tr>
<th class='table-nest-title'>
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse;?>'></a>
<?php echo $lang->nameAB;?>
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse;?>'></a>
</th>
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->program->status);?></th>
<th class='c-user'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PM);?></th>
@@ -48,7 +48,7 @@
$originOrders[] = $program->order;
?>
<tr <?php echo $trAttrs;?> data-type="<?php echo $program->type;?>">
<tr <?php echo $trAttrs;?> data-type="<?php echo $program->type;?>" data-status="<?php echo $program->status?>">
<td class='c-name text-left <?php if($canOrder) echo 'sort-handler';?> has-prefix has-suffix' title='<?php echo $program->name?>'>
<?php
$icon = '';
@@ -106,6 +106,10 @@
</div>
</form>
<style>
th.table-nest-title {padding-left: 12px !important;}
th.table-nest-title > .table-nest-toggle-global {left: auto; right: 6px; font-size: 12px; color: #888fa1;}
th.table-nest-title > .table-nest-toggle-global:before {width: 100%; left: 0 !important;}
#programTableList td.c-name span.icon.table-nest-toggle {cursor: pointer;}
#programTableList.sortable-sorting > tr {opacity: 0.7}
#programTableList.sortable-sorting > tr.drag-row {opacity: 1;}
#programTableList > tr.drop-not-allowed {opacity: 0.1!important}
@@ -121,6 +125,7 @@
#programTableList .icon-kanban:before {content: '\e983';}
#programTableList > tr[data-type="program"] > .c-name > a {color: #0b0f18 !important;}
#programTableList > tr[data-type="program"] > .c-name:hover > a {color: #313c52 !important;}
#programTableList > tr[data-nest-parent] {background: #f8f8f8;}
</style>
<?php js::set('originOrders', $originOrders);?>
<script>
+4 -5
View File
@@ -52,7 +52,7 @@
</th>
<th rowspan="2"><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
<th class='c-PO' rowspan="2"><?php common::printOrderLink('PO', $orderBy, $vars, $lang->product->manager);?></th>
<th class='c-story' colspan="4"><?php echo $lang->story->story;?></th>
<th class='c-story' colspan="5"><?php echo $lang->story->story;?></th>
<th class='c-bug' colspan="2"><?php echo $lang->bug->common;?></th>
<th class='c-plan' rowspan="2"><?php echo $lang->product->plan;?></th>
<th class='c-release' rowspan="2"><?php echo $lang->product->release;?></th>
@@ -62,6 +62,7 @@
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
<th><?php echo $lang->story->activate;?></th>
<th><?php echo $lang->story->change;?></th>
<th><?php echo $lang->story->statusList['reviewing'];?></th>
<th><?php echo $lang->story->completeRate;?></th>
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
<th><?php echo $lang->bug->fixedRate;?></th>
@@ -69,10 +70,7 @@
</thead>
<tbody class="sortable" id="productTableList">
<?php foreach($products as $product):?>
<?php
$totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'];
$totalRequirements = $product->requirements['active'] + $product->requirements['closed'] + $product->requirements['draft'] + $product->requirements['changing'];
?>
<?php $totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];?>
<tr class="text-center" data-id='<?php echo $product->id ?>' data-order='<?php echo $product->code;?>'>
<td class='c-id text-left'>
<?php if($canBatchEdit):?>
@@ -96,6 +94,7 @@
<td><?php echo $product->stories['draft'];?></td>
<td><?php echo $product->stories['active'];?></td>
<td><?php echo $product->stories['changing'];?></td>
<td><?php echo $product->stories['reviewing'];?></td>
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
<td><?php echo $product->unResolved;?></td>
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
+18 -3
View File
@@ -14,7 +14,11 @@
<?php
js::set('programID', $programID);
js::set('browseType', $browseType);
$canBatchEdit = common::hasPriv('project', 'batchEdit');
$canBatchEdit = common::hasPriv('project', 'batchEdit');
$waitCount = 0;
$doingCount = 0;
$suspendedCount = 0;
$closedCount = 0;
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolBar pull-left">
@@ -42,7 +46,7 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit');
</p>
</div>
<?php else:?>
<form class='main-table' id='projectsForm' method='post' data-ride="table">
<form class='main-table' id='projectsForm' method='post'>
<?php
$vars = "programID=$programID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";
$setting = $this->datatable->getSetting('program');
@@ -62,8 +66,12 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit');
</thead>
<tbody class="sortable" id='projectTableList'>
<?php foreach($projectStats as $project):?>
<tr data-id="<?php echo $project->id;?>">
<tr data-id="<?php echo $project->id;?>" data-status="<?php echo $project->status;?>">
<?php $project->from = 'pgmproject';?>
<?php if($project->status == 'wait') $waitCount ++;?>
<?php if($project->status == 'doing') $doingCount ++;?>
<?php if($project->status == 'suspended') $suspendedCount ++;?>
<?php if($project->status == 'closed') $closedCount ++;?>
<?php foreach($setting as $value) $this->project->printCell($value, $project, $users, $programID);?>
</tr>
<?php endforeach;?>
@@ -83,12 +91,19 @@ $canBatchEdit = common::hasPriv('project', 'batchEdit');
}
?>
</div>
<div class="table-statistic"><?php echo $browseType == 'all' ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<?php endif;?>
</div>
</div>
<?php
js::set('summary', sprintf($lang->project->summary, count($projectStats)));
js::set('allSummary', sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount));
js::set('checkedSummary', $lang->project->checkedSummary);
js::set('checkedAllSummary', $lang->project->checkedAllSummary);
?>
<script>
$('input[name^="involved"]').click(function()
{