* Finish task #71876.
This commit is contained in:
@@ -6,7 +6,7 @@ $(function()
|
||||
var $toggle = $(this);
|
||||
var id = $(this).data('id');
|
||||
var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed');
|
||||
$toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed);
|
||||
$toggle.closest('#executionsForm').find('tr.parent-' + id).toggle(!isCollapsed);
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
@@ -94,10 +94,11 @@ $(function()
|
||||
var data = $row.data();
|
||||
executionIDList.push(data.id);
|
||||
|
||||
var status = data.status;
|
||||
if(status === 'wait') checkedWait++;
|
||||
if(status === 'doing') checkedDoing++;
|
||||
if(data.status === 'wait') checkedWait++;
|
||||
if(data.status === 'doing') checkedDoing++;
|
||||
});
|
||||
|
||||
if(status != 'all') return (checkedTotal ? checkedExecutions : executionSummary).replace('%s', $rows.length);
|
||||
return (checkedTotal ? checkedSummary : pageSummary).replace('%total%', $rows.length).replace('%wait%', checkedWait).replace('%doing%', checkedDoing);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -341,6 +341,7 @@ $lang->execution->stats = '<strong>%s</strong> Verfügbar, <stron
|
||||
$lang->execution->taskSummary = "Aufgaben auf dieser Seite: <strong>%s</strong> Total, <strong>%s</strong> Wartend, <strong>%s</strong> In Arbeit; Stunden : <strong>%s</strong> geplant., <strong>%s</strong> genutzt, <strong>%s</strong> Rest.";
|
||||
$lang->execution->pageSummary = "Aufgaben auf dieser Seite: <strong>%total%</strong>, <strong>%wait%</strong> Wartend, <strong>%doing%</strong> In Arbeit; Stunden: <strong>%estimate%</strong> geplant, <strong>%consumed%</strong> genutzt, <strong>%left%</strong> Rest.";
|
||||
$lang->execution->checkedSummary = " <strong>%total%</strong> Geprüft, <strong>%wait%</strong> Wartend, <strong>%doing%</strong> In Arbeit; Stunden: <strong>%estimate%</strong> geplant, <strong>%consumed%</strong> genutzt, <strong>%left%</strong> Rest.";
|
||||
$lang->execution->executionSummary = "Total executions: <strong>%s</strong>.";
|
||||
$lang->execution->pageExecSummary = "Total executions: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->checkedExecSummary = "Selected: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->memberHoursAB = "%s hat <strong>%s</strong> Stunden";
|
||||
@@ -417,7 +418,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
$lang->execution->checkedExecutions = 'Seleted %s executions';
|
||||
$lang->execution->checkedExecutions = 'Seleted %s executions.';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -341,6 +341,7 @@ $lang->execution->stats = 'Available: <strong>%s</strong>(h). Est
|
||||
$lang->execution->taskSummary = "Total tasks on this page:<strong>%s</strong>. Waiting: <strong>%s</strong>. Doing: <strong>%s</strong>. Estimates: <strong>%s</strong>(h). Cost: <strong>%s</strong>(h). Left: <strong>%s</strong>(h).";
|
||||
$lang->execution->pageSummary = "Total tasks: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>. Estimates: <strong>%estimate%</strong>(h). Cost: <strong>%consumed%</strong>(h). Left: <strong>%left%</strong>(h).";
|
||||
$lang->execution->checkedSummary = "Selected: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>. Estimates: <strong>%estimate%</strong>(h). Cost: <strong>%consumed%</strong>(h). Left: <strong>%left%</strong>(h).";
|
||||
$lang->execution->executionSummary = "Total executions: <strong>%s</strong>.";
|
||||
$lang->execution->pageExecSummary = "Total executions: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->checkedExecSummary = "Selected: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->memberHoursAB = "%s has <strong>%s</ strong> hours.";
|
||||
@@ -417,7 +418,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
$lang->execution->checkedExecutions = 'Seleted %s executions';
|
||||
$lang->execution->checkedExecutions = 'Seleted %s executions.';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -341,6 +341,7 @@ $lang->execution->stats = 'Disponible: <strong>%s</strong>(h). Es
|
||||
$lang->execution->taskSummary = "Total des tâches de cette page :<strong>%s</strong>. A Faire: <strong>%s</strong>. En cours: <strong>%s</strong>. Estimé: <strong>%s</strong>(h). Coût: <strong>%s</strong>(h). Reste: <strong>%s</strong>(h).";
|
||||
$lang->execution->pageSummary = "Total des tâches de cette page: <strong>%total%</strong>. A Faire: <strong>%wait%</strong>. En cours: <strong>%doing%</strong>. Estimé: <strong>%estimate%</strong>(h). Coût: <strong>%consumed%</strong>(h). Reste: <strong>%left%</strong>(h).";
|
||||
$lang->execution->checkedSummary = "Sélectionné: <strong>%total%</strong>. A Faire: <strong>%wait%</strong>. En cours: <strong>%doing%</strong>. Estimé: <strong>%estimate%</strong>(h). Coût: <strong>%consumed%</strong>(h). Reste: <strong>%left%</strong>(h).";
|
||||
$lang->execution->executionSummary = "Total executions: <strong>%s</strong>.";
|
||||
$lang->execution->pageExecSummary = "Total executions: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->checkedExecSummary = "Selected: <strong>%total%</strong>. Waiting: <strong>%wait%</strong>. Doing: <strong>%doing%</strong>.";
|
||||
$lang->execution->memberHoursAB = "%s a <strong>%s</ strong> heures.";
|
||||
@@ -417,7 +418,7 @@ $lang->execution->storyDragError = "The {$lang->SRCommon} is not ac
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
$lang->execution->checkedExecutions = "Pour s électionner l'élément%s";
|
||||
$lang->execution->checkedExecutions = "Pour s électionner l'élément%s.";
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -341,8 +341,9 @@ $lang->execution->stats = '可用工时 <strong>%s</strong> 工
|
||||
$lang->execution->taskSummary = "本页共 <strong>%s</strong> 个任务,未开始 <strong>%s</strong>,进行中 <strong>%s</strong>,总预计 <strong>%s</strong> 工时,已消耗 <strong>%s</strong> 工时,剩余 <strong>%s</strong> 工时。";
|
||||
$lang->execution->pageSummary = "本页共 <strong>%total%</strong> 个任务,未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>,总预计 <strong>%estimate%</strong> 工时,已消耗 <strong>%consumed%</strong> 工时,剩余 <strong>%left%</strong> 工时。";
|
||||
$lang->execution->checkedSummary = "选中 <strong>%total%</strong> 个任务,未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>,总预计 <strong>%estimate%</strong> 工时,已消耗 <strong>%consumed%</strong> 工时,剩余 <strong>%left%</strong> 工时。";
|
||||
$lang->execution->pageExecSummary = "本页共 <strong>%total%</strong> 个{$lang->execution->common},未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>。";
|
||||
$lang->execution->checkedExecSummary = "选中 <strong>%total%</strong> 个{$lang->execution->common},未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>。";
|
||||
$lang->execution->executionSummary = "本页共 <strong>%s</strong> 个{$lang->executionCommon}。";
|
||||
$lang->execution->pageExecSummary = "本页共 <strong>%total%</strong> 个{$lang->executionCommon},未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>。";
|
||||
$lang->execution->checkedExecSummary = "选中 <strong>%total%</strong> 个{$lang->executionCommon},未开始 <strong>%wait%</strong>,进行中 <strong>%doing%</strong>。";
|
||||
$lang->execution->memberHoursAB = "<div>%s有 <strong>%s</strong> 工时</div>";
|
||||
$lang->execution->memberHours = '<div class="table-col"><div class="clearfix segments"><div class="segment"><div class="segment-title">%s可用工时</div><div class="segment-value">%s</div></div></div></div>';
|
||||
$lang->execution->countSummary = '<div class="table-col"><div class="clearfix segments"><div class="segment"><div class="segment-title">总任务</div><div class="segment-value">%s</div></div><div class="segment"><div class="segment-title">进行中</div><div class="segment-value"><span class="label label-dot label-primary"></span> %s</div></div><div class="segment"><div class="segment-title">未开始</div><div class="segment-value"><span class="label label-dot label-primary muted"></span> %s</div></div></div></div>';
|
||||
@@ -417,7 +418,7 @@ $lang->execution->storyDragError = "该{$lang->SRCommon}不是激
|
||||
$lang->execution->countTip = '(%s人)';
|
||||
$lang->execution->pleaseInput = "请输入";
|
||||
$lang->execution->week = '周';
|
||||
$lang->execution->checkedExecutions = "共选中%s个{$lang->execution->common}";
|
||||
$lang->execution->checkedExecutions = "共选中%s个{$lang->execution->common}。";
|
||||
|
||||
/* 统计。*/
|
||||
$lang->execution->charts = new stdclass();
|
||||
|
||||
@@ -4582,12 +4582,12 @@ class executionModel extends model
|
||||
if(!$isChild)
|
||||
{
|
||||
$trClass = 'is-top-level table-nest-child-hide';
|
||||
$trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true'";
|
||||
$trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true' data-status={$execution->status}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$trClass = 'table-nest-hide';
|
||||
$trAttrs = "data-id={$execution->id} data-parent={$execution->parent}";
|
||||
$trAttrs = "data-id={$execution->id} data-parent={$execution->parent} data-status={$execution->status}";
|
||||
$trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path=',$execution->parent,$execution->id,'";
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ $useDatatable = (isset($config->datatable->$datatableId->mode) and $config->data
|
||||
<?php js::set('from', $from);?>
|
||||
<?php js::set('checkedSummary', $lang->execution->checkedExecSummary);?>
|
||||
<?php js::set('pageSummary', $lang->execution->pageExecSummary);?>
|
||||
<?php js::set('executionSummary', $lang->execution->executionSummary);?>
|
||||
<?php js::set('checkedExecutions', $lang->execution->checkedExecutions);?>
|
||||
<?php
|
||||
/* Set unfold parent executionID. */
|
||||
js::set('unfoldAll', $lang->execution->treeLevel['all']);
|
||||
@@ -135,7 +137,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
|
||||
<?php echo html::submitButton($lang->execution->batchEdit, '', 'btn');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<div class="table-statistic"></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -10,3 +10,5 @@ th.table-nest-title .check-all {position: absolute; left: 15px; top: 7px;}
|
||||
.c-date {text-align: center;}
|
||||
#executionTableList > tr:not(.has-nest-child) .table-nest-toggle {display: none;}
|
||||
#executionTableList > tr:not(.has-nest-child) .project-type-label {margin-left: 22px;}
|
||||
.table-statistic {padding-left: 10px;}
|
||||
#executionTableList .table-nest-icon {top: 6px;}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
$(function()
|
||||
{
|
||||
$("#" + status + "Tab").addClass('btn-active-text');
|
||||
|
||||
$('input[name^="showTask"]').click(function()
|
||||
{
|
||||
var show = $(this).is(':checked') ? 1 : 0;
|
||||
@@ -38,14 +40,10 @@ $(function()
|
||||
}
|
||||
if(notCheckedLength > 0) $('#executionForm .checkAll').prop('checked', false);
|
||||
|
||||
var summary = checkedExecutions.replace('%s', checkedLength);
|
||||
if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('items', 'item');
|
||||
var statistic = "<div id='executionsSummary' class='table-statistic'>" + summary + "</div>";
|
||||
if(checkedLength > 0)
|
||||
{
|
||||
$('#executionSummary').addClass('hidden');
|
||||
$('#executionsSummary').remove();
|
||||
$('.editCheckbox').after(statistic);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -63,12 +61,8 @@ $(function()
|
||||
$("#executionForm .checkAll").prop('checked', true);
|
||||
$('#executionForm').addClass('has-row-checked');
|
||||
var checkedLength = $(":checkbox[name^='executionIDList']:checked").length;
|
||||
var summary = checkedExecutions.replace('%s', checkedLength);
|
||||
if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('items', 'item');
|
||||
var statistic = "<div id='executionsSummary' class='table-statistic'>" + summary + "</div>";
|
||||
$('#executionSummary').addClass('hidden');
|
||||
$('#executionsSummary').remove();
|
||||
$('.editCheckbox').after(statistic);
|
||||
$(this).next('label').addClass('hover');
|
||||
}
|
||||
else
|
||||
@@ -91,6 +85,37 @@ $(function()
|
||||
});
|
||||
$('#executionsForm .checkAll').prop('checked', false);
|
||||
}, 10);
|
||||
|
||||
// Update table summary text
|
||||
$('#executionForm').table(
|
||||
{
|
||||
statisticCreator: function(table)
|
||||
{
|
||||
var $table = table.getTable();
|
||||
var $checkedRows = $table.find(table.isDataTable ? '.datatable-row-left.checked' : 'tbody>tr.checked');
|
||||
var $originTable = table.isDataTable ? table.$.find('.datatable-origin') : null;
|
||||
var checkedTotal = $checkedRows.length;
|
||||
var $rows = checkedTotal ? $checkedRows : $table.find(table.isDataTable ? '.datatable-rows .datatable-row-left' : 'tbody>tr');
|
||||
|
||||
var checkedWait = 0;
|
||||
var checkedDoing = 0;
|
||||
var executionIDList = [];
|
||||
$rows.each(function()
|
||||
{
|
||||
var $row = $(this);
|
||||
if ($originTable) $row = $originTable.find('tbody>tr[data-id="' + $row.data('id') + '"]');
|
||||
|
||||
var data = $row.data();
|
||||
executionIDList.push(data.id);
|
||||
|
||||
if(data.status === 'wait') checkedWait++;
|
||||
if(data.status === 'doing') checkedDoing++;
|
||||
});
|
||||
|
||||
if(status != 'all') return (checkedTotal ? checkedExecutions : executionSummary).replace('%s', $rows.length);
|
||||
return (checkedTotal ? checkedSummary : pageSummary).replace('%total%', $rows.length).replace('%wait%', checkedWait).replace('%doing%', checkedDoing);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
<?php js::set('disabledTaskTip', sprintf($lang->project->disabledInputTip, $lang->edit . $lang->executionCommon));?>
|
||||
<?php js::set('defaultExecutionTip', $lang->edit . $lang->executionCommon);?>
|
||||
<?php js::set('disabledExecutionTip', sprintf($lang->project->disabledInputTip, $lang->programplan->stageCustom->task));?>
|
||||
<?php js::set('checkedSummary', $lang->execution->checkedExecSummary);?>
|
||||
<?php js::set('pageSummary', $lang->execution->pageExecSummary);?>
|
||||
<?php js::set('executionSummary', $lang->execution->executionSummary);?>
|
||||
<?php js::set('checkedExecutions', $lang->execution->checkedExecutions);?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class='btn-group'>
|
||||
@@ -62,7 +66,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php $canBatchEdit = common::hasPriv('execution', 'batchEdit'); ?>
|
||||
<form class='main-table' id='executionForm' method='post' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='true'>
|
||||
<form class='main-table' id='executionForm' method='post' data-nested='true' data-expand-nest-child='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='true'>
|
||||
<table class="table table-from table-fixed table-nested" id="executionList">
|
||||
<?php $vars = "status=$status&orderBy=%s";?>
|
||||
<thead>
|
||||
@@ -92,14 +96,12 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
<div class="table-statistic"></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('status', $status)?>
|
||||
<?php js::set('orderBy', $orderBy)?>
|
||||
<script>
|
||||
$("#<?php echo $status;?>Tab").addClass('btn-active-text');
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user