* Finish task #5085.

This commit is contained in:
chenfeiCF
2018-11-12 14:20:59 +08:00
parent 7f5616c709
commit 2b47dbed37
3 changed files with 18 additions and 3 deletions
+1
View File
@@ -28,6 +28,7 @@ $(function()
var lastIndex = parseInt($formTbody.find('tr:last > td:first').text());
var $newRow = $(rowTpl.replace(/%s/g, lastIndex + 1));
$newRow.find('.chosen').chosen();
$newRow.find('.iframe').modalTrigger({iframe:true});;
$newRow.find('[data-provide="colorpicker-later"]').colorPicker();
$newRow.datepickerAll();
$formTbody.append($newRow);
+13 -1
View File
@@ -74,7 +74,7 @@ function copyStoryTitle(num)
function setStoryRelated(num)
{
var storyID = $('#story' + num).val();
if(storyID)
if(storyID && storyID != 'ditto')
{
var link = createLink('story', 'ajaxGetInfo', 'storyID=' + storyID);
$.getJSON(link, function(storyInfo)
@@ -86,6 +86,18 @@ function setStoryRelated(num)
$('#storyPri' + num).val(storyInfo.pri);
$('#storyDesc' + num).val(storyInfo.spec);
});
storyLink = createLink('story', 'view', "storyID=" + storyID);
var concat = config.requestType != 'GET' ? '?' : '&';
storyLink = storyLink + concat + 'onlybody=yes';
$('#preview' + num).removeAttr('disabled');
$('#preview' + num).attr('href', storyLink);
}
else
{
storyLink = '#';
$('#preview' + num).attr('disabled', true);
$('#preview' + num).attr('href', storyLink);
}
}
+4 -2
View File
@@ -64,11 +64,11 @@
<?php endif;?>
<th class='c-name required has-btn'><?php echo $lang->task->name;?></span></th>
<th class='w-80px required'><?php echo $lang->typeAB;?></span></th>
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='w-130px<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->task->assignedTo;?></th>
<th class='w-60px<?php echo zget($visibleFields, 'estimate', ' hidden') . zget($requiredFields, 'estimate', '', ' required');?>'><?php echo $lang->task->estimateAB;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'estStarted', ' hidden') . zget($requiredFields, 'estStarted', '', ' required');?>'><?php echo $lang->task->estStarted;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->task->deadline;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'desc', ' hidden') . zget($requiredFields, 'desc', '', ' required');?>'><?php echo $lang->task->desc;?></th>
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->task->pri;?></th>
</tr>
</thead>
@@ -106,6 +106,7 @@
<div class='input-group'>
<?php echo html::select("story[$i]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated($i)'");?>
<span class='input-group-btn'>
<a id='preview<?php echo $i;?>' href='#' class='btn iframe btn-link btn-icon btn-copy' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-search'></i></a>
<a href='javascript:copyStoryTitle(<?php echo $i;?>)' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
<?php echo html::hidden("storyEstimate$i") . html::hidden("storyDesc$i") . html::hidden("storyPri$i");?>
</span>
@@ -158,6 +159,7 @@
<div class='input-group'>
<?php echo html::select("story[%s]", $stories, $currentStory, "class='form-control chosen' onchange='setStoryRelated(\"%s\")'");?>
<span class='input-group-btn'>
<a id="preview%s" href='#' class='btn iframe btn-link btn-icon btn-copy' disabled='disabled' title='<?php echo $lang->preview; ?>'><i class='icon-search'></i></a>
<a href='javascript:copyStoryTitle("%s")' class='btn btn-link btn-icon btn-copy' title='<?php echo $lang->task->copyStoryTitle; ?>'><i class='icon-arrow-right'></i></a>
</span>
</div>