*Finish task #66217,66218,66210 Fix bug 26687,26632,26622,26619.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#testStoryBox table tr td .chosen-container .chosen-single {border: 0px;}
|
||||
#testStoryBox table tr td .chosen-compact.chosen-container-single .chosen-single>.chosen-search {top: 0; right: 0; left: 0;}
|
||||
#testStoryBox table tr td input {border: 0px;}
|
||||
#testStoryBox table tr td .input-group .input-group-addon {border-left: 1px solid #dcdcdc; border-right: 1px solid #dcdcdc;}
|
||||
#testStoryBox table tr td .input-group .input-group-addon {border-left: 1px solid #dcdcdc; border-right: 1px solid #dcdcdc; width: 20px !important;}
|
||||
#testStoryBox table button.btn {border: 0px;}
|
||||
|
||||
.chosen-results > li.has-test,
|
||||
|
||||
@@ -364,8 +364,10 @@ function toggleSelectTestStory()
|
||||
}
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
function addItem(obj)
|
||||
{
|
||||
index ++;
|
||||
var $tr = $(obj).closest('tr');
|
||||
$tr.after($tr.clone());
|
||||
var $nextTr = $tr.next();
|
||||
@@ -377,11 +379,31 @@ function addItem(obj)
|
||||
$nextTr.find('#testAssignedTo').closest('td').find('.chosen-container').remove();
|
||||
$nextTr.find('#testAssignedTo').closest('td').find('select').chosen();
|
||||
$nextTr.find('.form-date').val('').datepicker();
|
||||
$nextTr.find('.startInput').attr('id', 'testEstStarted\[' + index + '\]');
|
||||
$nextTr.find('.deadlineInput').attr('id', 'testDeadline\[' + index + '\]');
|
||||
|
||||
if($nextTr.find('.deadlineBox').length == 0)
|
||||
$nextTr.find('.deadlineInput').after('<span class="input-group-addon deadlineBox"><input type="checkbox" name="deadlineDitto\[' +index + '\]" id="deadlineDitto\[' + index + '\]" checked/>同上</span>');
|
||||
if($nextTr.find('.estStartedBox').length == 0)
|
||||
$nextTr.find('.startInput').after('<span class="input-group-addon estStartedBox"><input type="checkbox" name="deadlineDitto\[' +index + '\]" id="deadlineDitto\[' + index + '\]" checked/>同上</span>');
|
||||
|
||||
if($nextTr.find('.deadlineBox').is(':hidden'))
|
||||
{
|
||||
$nextTr.find('.deadlineBox').show();
|
||||
$nextTr.find(".deadlineBox input[type='checkBox']").attr('checked', true);
|
||||
}
|
||||
if($nextTr.find('.estStartedBox').is(':hidden'))
|
||||
{
|
||||
$nextTr.find('.estStartedBox').show();
|
||||
$nextTr.find(".estStartedBox input[type='checkBox']").attr('checked', true);
|
||||
}
|
||||
}
|
||||
|
||||
function removeItem(obj)
|
||||
{
|
||||
if($(obj).closest('table').find('tbody tr').size() > 1) $(obj).closest('tr').remove();
|
||||
$('.resarch').find('tr:first').find('.estStartedBox').remove();
|
||||
$('.resarch').find('tr:first').find('.deadlineBox').remove();
|
||||
}
|
||||
|
||||
function markTestStory()
|
||||
@@ -629,3 +651,20 @@ $('#modalTeam .btn').click(function()
|
||||
$(window).unload(function(){
|
||||
if(blockID) window.parent.refreshBlock($('#block' + blockID));
|
||||
});
|
||||
|
||||
function hiddenDitto(obj)
|
||||
{
|
||||
var $this = $(obj);
|
||||
var date = $this.val();
|
||||
var $ditto = $this.closest('div').find("input[type='checkBox']");
|
||||
if(date == '')
|
||||
{
|
||||
$ditto.attr('checked', true);
|
||||
$ditto.closest('.input-group-addon').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$ditto.removeAttr('checked');
|
||||
$ditto.closest('.input-group-addon').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,13 +123,14 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
<tr class='text-center'>
|
||||
<th class='w-150px'><?php echo $lang->task->storyAB;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->pri;?></th>
|
||||
<th class='w-200px'><?php echo $lang->task->datePlan;?></th>
|
||||
<th class='w-100px'><?php echo $lang->task->estStarted;?></th>
|
||||
<th class='w-100px'><?php echo $lang->task->deadline;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-60px'><?php echo $lang->task->estimate;?></th>
|
||||
<th class='w-60px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="resarch">
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($testStories as $storyID => $storyTitle):?>
|
||||
<?php if($i > 0) $members['ditto'] = $lang->task->ditto;?>
|
||||
@@ -139,12 +140,14 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("testEstStarted[]", $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");
|
||||
echo html::input("testEstStarted[$i]", $task->estStarted, "class='startInput form-control form-date' data-inputID='$i' onchange='hiddenDitto(this)' placeholder='{$lang->task->estStarted}'");
|
||||
if($i != 0) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='estStartedDitto[$i]' id='estStartedDitto$i' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
</div>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("testDeadline[]", $task->deadline, "class='form-control form-date' placeholder='{$lang->task->deadline}'");
|
||||
echo html::input("testDeadline[$i]", $task->deadline, "class='deadlineInput form-control form-date' data-inputID='$i' onchange='hiddenDitto(this)' placeholder='{$lang->task->deadline}'");
|
||||
if($i != 0) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='deadlineDitto[$i]' id='deadlineDitto$i' " . ($i > 0 ? "checked" : '') . " /> {$lang->task->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user