Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -7,7 +7,7 @@ $(function()
|
||||
$("a[data-toggle='showModuleModal']").click(function(){$('#showModuleModal').modal('show')});
|
||||
<?php endif;?>
|
||||
|
||||
var $btnToolbar = $('#main #mainContent form.main-table .table-header .btn-toolbar:first');
|
||||
var $btnToolbar = $('#main .table-header .btn-toolbar:first');
|
||||
if($btnToolbar.length > 0)
|
||||
{
|
||||
<?php $mode = isset($this->config->datatable->$datatableId->mode) ? $this->config->datatable->$datatableId->mode : 'table';?>
|
||||
|
||||
@@ -4,40 +4,7 @@ $(function()
|
||||
$('.popoverStage').mouseout(function(){$(this).popover('hide')});
|
||||
|
||||
if($('#storyList thead th.w-title').width() < 150) $('#storyList thead th.w-title').width(150);
|
||||
|
||||
$(document).on('click', "#storyList tbody tr, .table-footer .check-all, #storyList thead .check-all", function(){showCheckedSummary();});
|
||||
$(document).on('change', "#storyList :checkbox", function(){showCheckedSummary();});
|
||||
$(document).on('click', "#datatable-storyList table tr", function(){showCheckedSummary();});
|
||||
})
|
||||
|
||||
function showCheckedSummary()
|
||||
{
|
||||
var $summary = $('#main #mainContent form.main-table .table-header .table-statistic');
|
||||
|
||||
var checkedTotal = 0;
|
||||
var checkedEstimate = 0;
|
||||
var checkedCase = 0;
|
||||
$('[name^="storyIDList"]').each(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
checkedTotal += 1;
|
||||
var taskID = $(this).val();
|
||||
$tr = $("#storyList tbody tr[data-id='" + taskID + "']");
|
||||
checkedEstimate += Number($tr.data('estimate'));
|
||||
if(Number($tr.data('cases')) > 0) checkedCase += 1;
|
||||
}
|
||||
});
|
||||
|
||||
if(checkedTotal > 0)
|
||||
{
|
||||
rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%';
|
||||
summary = checkedSummary.replace('%total%', checkedTotal)
|
||||
.replace('%estimate%', checkedEstimate)
|
||||
.replace('%rate%', rate)
|
||||
$summary.html(summary);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function setQueryBar(queryID, title)
|
||||
{
|
||||
|
||||
@@ -99,9 +99,8 @@
|
||||
</div>
|
||||
<div class="main-col">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<form class="main-table table-story" data-ride="table" method="post" id='productStoryForm'>
|
||||
<div class="table-header">
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<form class="main-table table-story skip-iframe-modal" method="post" id='productStoryForm'>
|
||||
<div class="table-header fixed-right">
|
||||
<nav class="btn-toolbar pull-right"></nav>
|
||||
</div>
|
||||
<?php
|
||||
@@ -317,6 +316,7 @@
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php elseif(common::hasPriv('story', 'create')):?>
|
||||
@@ -327,7 +327,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('checkedSummary', $lang->product->checkedSummary);?>
|
||||
<script>
|
||||
var moduleID = <?php echo $moduleID?>;
|
||||
$('#module<?php echo $moduleID;?>').addClass('active');
|
||||
@@ -343,5 +342,34 @@ else
|
||||
ajaxGetSearchForm();
|
||||
}
|
||||
<?php endif;?>
|
||||
|
||||
$(function()
|
||||
{
|
||||
// Update table summary text
|
||||
var checkedSummary = '<?php echo $lang->product->checkedSummary?>';
|
||||
$('#productStoryForm').table(
|
||||
{
|
||||
statisticCreator: function(table)
|
||||
{
|
||||
var $checkedRows = table.$.find('tbody>tr.checked');
|
||||
var checkedTotal = $checkedRows.length;
|
||||
if(!checkedTotal) return;
|
||||
|
||||
var checkedEstimate = 0;
|
||||
var checkedCase = 0;
|
||||
$checkedRows.each(function()
|
||||
{
|
||||
var $row = $(this);
|
||||
var data = $row.data();
|
||||
checkedEstimate += data.estimate;
|
||||
checkedCase += data.cases;
|
||||
});
|
||||
var rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%';
|
||||
return checkedSummary.replace('%total%', checkedTotal)
|
||||
.replace('%estimate%', checkedEstimate)
|
||||
.replace('%rate%', rate);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
.table td.has-child > .task-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s;}
|
||||
.table td.has-child > .task-toggle > .icon:before {text-align: left;}
|
||||
.table td.has-child > .task-toggle.collapsed > .icon {transform: rotate(-90deg);}
|
||||
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
|
||||
|
||||
.chosen-container-single .chosen-single > span{max-width:200px;}
|
||||
|
||||
|
||||
@@ -31,3 +31,4 @@
|
||||
#kanban .table-grouped tbody > tr:hover {background: transparent;}
|
||||
#kanban .c-boards, #kanban td.c-side {border-bottom: 1px solid #eee;}
|
||||
#kanban .group-info > span + span {display: inline-block; margin-left: 8px;}
|
||||
#kanban th.c-board {color: #3c4353; font-weight: bold;}
|
||||
@@ -31,4 +31,5 @@
|
||||
#kanban .table-grouped tbody > tr:hover {background: transparent;}
|
||||
#kanban .c-boards, #kanban td.c-side {border-bottom: 1px solid #eee;}
|
||||
#kanban .group-info > span + span {display: inline-block; margin-left: 8px;}
|
||||
#kanban th.c-board {color: #3c4353; font-weight: bold;}
|
||||
.story-estimate{margin-right: 5px;}
|
||||
|
||||
@@ -4,10 +4,6 @@ $(function()
|
||||
if(browseType == 'bysearch') ajaxGetSearchForm();
|
||||
|
||||
if($('#taskList thead th.w-name').width() < 150) $('#taskList thead th.w-name').width(150);
|
||||
|
||||
$(document).on('click', "#taskList tbody tr, .table-footer .check-all, #taskList thead .check-all", function(){showCheckedSummary();});
|
||||
$(document).on('change', "#taskList :checkbox", function(){showCheckedSummary();});
|
||||
$(document).on('click', "#datatable-taskList table tr", function(){showCheckedSummary();});
|
||||
});
|
||||
|
||||
function setQueryBar(queryID, title)
|
||||
@@ -16,49 +12,5 @@ function setQueryBar(queryID, title)
|
||||
$tagTab.before("<li id='QUERY" + queryID + "Tab' class='active'><a href='" + createLink('project', 'task', "projectID=" + projectID + "&browseType=bysearch¶m=" + queryID) + "'>" + title + "</a></li>");
|
||||
}
|
||||
|
||||
function showCheckedSummary()
|
||||
{
|
||||
var $summary = $('#main #mainContent form.main-table .table-header .table-statistic');
|
||||
|
||||
var checkedTotal = 0;
|
||||
var checkedWait = 0;
|
||||
var checkedDoing = 0;
|
||||
var checkedEstimate = 0;
|
||||
var checkedConsumed = 0;
|
||||
var checkedLeft = 0;
|
||||
$('[name^="taskIDList"]').each(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
var taskID = $(this).val();
|
||||
$tr = $("#taskList tbody tr[data-id='" + taskID + "']");
|
||||
|
||||
checkedTotal += 1;
|
||||
|
||||
var taskStatus = $tr.data('status');
|
||||
if(taskStatus == 'wait') checkedWait += 1;
|
||||
if(taskStatus == 'doing') checkedDoing += 1;
|
||||
if(!$tr.hasClass('table-children'))
|
||||
{
|
||||
if(taskStatus != 'cancel')
|
||||
{
|
||||
checkedEstimate += Number($tr.data('estimate'));
|
||||
checkedConsumed += Number($tr.data('consumed'));
|
||||
}
|
||||
if(taskStatus != 'cancel' && taskStatus != 'closed') checkedLeft += Number($tr.data('left'));
|
||||
}
|
||||
}
|
||||
});
|
||||
if(checkedTotal > 0)
|
||||
{
|
||||
summary = checkedSummary.replace('%total%', checkedTotal).replace('%wait%', checkedWait)
|
||||
.replace('%doing%', checkedDoing)
|
||||
.replace('%estimate%', checkedEstimate)
|
||||
.replace('%consumed%', checkedConsumed)
|
||||
.replace('%left%', checkedLeft);
|
||||
$summary.html(summary);
|
||||
}
|
||||
}
|
||||
|
||||
$('#module' + moduleID).addClass('active');
|
||||
$('#product' + productID).addClass('active');
|
||||
|
||||
@@ -139,9 +139,8 @@ js::set('browseType', $browseType);
|
||||
</div>
|
||||
<div class="main-col">
|
||||
<div class="cell" id="queryBox"></div>
|
||||
<form class="main-table table-task" data-ride="table" method="post" id='projectTaskForm'>
|
||||
<div class="table-header">
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<form class="main-table table-task skip-iframe-modal" method="post" id='projectTaskForm'>
|
||||
<div class="table-header fixed-right">
|
||||
<nav class="btn-toolbar pull-right"></nav>
|
||||
</div>
|
||||
<?php
|
||||
@@ -276,13 +275,13 @@ js::set('browseType', $browseType);
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('checkedSummary', $lang->project->checkedSummary);?>
|
||||
<?php js::set('replaceID', 'taskList')?>
|
||||
<script>
|
||||
<?php if($browseType == 'bysearch'):?>
|
||||
@@ -295,6 +294,49 @@ if($shortcut.size() > 0)
|
||||
}
|
||||
<?php endif;?>
|
||||
statusActive = '<?php echo isset($lang->project->statusSelects[$this->session->taskBrowseType]);?>';
|
||||
if(statusActive) $('#statusTab').addClass('active')
|
||||
if(statusActive) $('#statusTab').addClass('active');
|
||||
|
||||
$(function()
|
||||
{
|
||||
// Update table summary text
|
||||
var checkedSummary = '<?php echo $lang->project->checkedSummary?>';
|
||||
$('#projectTaskForm').table(
|
||||
{
|
||||
statisticCreator: function(table)
|
||||
{
|
||||
var $checkedRows = table.$.find('tbody>tr.checked');
|
||||
var checkedTotal = $checkedRows.length;
|
||||
if(!checkedTotal) return;
|
||||
|
||||
var checkedWait = 0;
|
||||
var checkedDoing = 0;
|
||||
var checkedEstimate = 0;
|
||||
var checkedConsumed = 0;
|
||||
var checkedLeft = 0;
|
||||
$checkedRows.each(function()
|
||||
{
|
||||
var $row = $(this);
|
||||
var data = $row.data();
|
||||
var status = data.status;
|
||||
if(status === 'wait') checkedWait++;
|
||||
if(status === 'doing') checkedDoing++;
|
||||
if(!$row.hasClass('table-children'))
|
||||
{
|
||||
if(status !== 'cancel')
|
||||
{
|
||||
checkedEstimate += Number(data.estimate);
|
||||
checkedConsumed += Number(data.consumed);
|
||||
}
|
||||
if(status != 'cancel' && status != 'closed') checkedLeft += Number(data.left);
|
||||
}
|
||||
});
|
||||
return checkedSummary.replace('%total%', checkedTotal).replace('%wait%', checkedWait)
|
||||
.replace('%doing%', checkedDoing)
|
||||
.replace('%estimate%', checkedEstimate)
|
||||
.replace('%consumed%', checkedConsumed)
|
||||
.replace('%left%', checkedLeft);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
function checkLeft()
|
||||
{
|
||||
value = $("#left").val();
|
||||
if(isNaN(parseInt(value)) || value == 0)
|
||||
if(isNaN(parseInt(value)) || value == 0)
|
||||
{
|
||||
if(confirm(confirmFinish))
|
||||
{
|
||||
@@ -58,3 +58,8 @@ $('#modalTeam .btn').click(function()
|
||||
$('#estimate').val(time);
|
||||
})
|
||||
});
|
||||
|
||||
$('a.btn-move-add').on('click', function () {
|
||||
var html = $("#modalTeam table.table tr").eq(-2).html();
|
||||
$("#modalTeam table.table tr:last").before('<tr>' + html + '</tr>');
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->task->typeList, $task->type, "class='form-control chosen' onchange='setOwners(this.value)' required");?></td><td></td><td></td>
|
||||
@@ -53,7 +53,7 @@
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
<?php if(empty($stories)):?>
|
||||
<span id='story'><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank'), html::a("javascript:loadStories($project->id)", $lang->refresh));?></span>
|
||||
<span id='story'><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($project->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
<?php else:?>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
@@ -104,9 +104,9 @@
|
||||
?>
|
||||
<td colspan='<?php echo $hasCustomPri ? 1 : 3 ?>'>
|
||||
<?php if($hasCustomPri):?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control chosen chosen-simple'");?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control chosen chosen-simple'");?>
|
||||
<?php else: ?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control' data-provide='labelSelector'");?>
|
||||
<?php echo html::select('pri', (array)$priList, $task->pri, "class='form-control' data-provide='labelSelector'");?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -190,7 +190,8 @@
|
||||
<span class='input-group-addon'><?php echo $lang->task->hour;?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='w-70px'>
|
||||
<td class='w-90px'>
|
||||
<a class='btn btn-move-add btn-icon btn-sm'><i class='icon-plus'></i></a>
|
||||
<a class='btn btn-move-up btn-sm btn-icon'><i class='icon-arrow-up'></i></a>
|
||||
<a class='btn btn-move-down btn-sm btn-icon'><i class='icon-arrow-down'></i></a>
|
||||
</td>
|
||||
|
||||
@@ -250,8 +250,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='w-90px'>
|
||||
<a href='javascript:;' class='btn btn-icon btn-move-up btn-sm'><i class='icon-arrow-up'></i></a>
|
||||
<a href='javascript:;' class='btn btn-icon btn-move-down btn-sm'><i class='icon-arrow-down'></i></a>
|
||||
<a class='btn btn-move-add btn-icon btn-sm'><i class='icon-plus'></i></a>
|
||||
<a class='btn btn-icon btn-move-up btn-sm'><i class='icon-arrow-up'></i></a>
|
||||
<a class='btn btn-icon btn-move-down btn-sm'><i class='icon-arrow-down'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 87 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user