* code for task #1971 #1961.

This commit is contained in:
wangyidong
2014-07-22 08:11:04 +00:00
parent a26d198e23
commit d81b64dafd
9 changed files with 41 additions and 31 deletions
+1 -1
View File
@@ -791,7 +791,7 @@ class story extends control
$moduleID = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProjectStoryPairs($projectID, $productID, $moduleID, $type);
die(html::select('story' . $number, $stories, $storyID, 'class=select-1 onchange=setStoryRelated(' . $number . ');'));
die(html::select('story' . $number, $stories, $storyID, 'class=form-control onchange=setStoryRelated(' . $number . ');'));
}
/**
+11
View File
@@ -0,0 +1,11 @@
$(document).on('click', '.chosen-with-drop', function()
{
var select = $(this).prev('select');
if($(select).val() == 'same')
{
var index = $(select).parent().index();
var value = $(select).parent().parent().prev('tr').find('td').eq(index).find('select').val();
$(select).val(value);
$(select).trigger("chosen:updated");
}
})
+1 -1
View File
@@ -22,7 +22,7 @@
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->story->assignedTo;?></th>
<td class='w-p45'><?php echo html::select('assignedTo', $users, $story->closedBy, 'class="form-control"');?></td><td></td>
<td class='w-p45'><?php echo html::select('assignedTo', $users, $story->closedBy, 'class="form-control chosen"');?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->story->comment;?></th>
+5 -5
View File
@@ -18,7 +18,7 @@
</div>
</div>
<form class='form-condensed' method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table table-fixed table-form'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th class='w-30px'><?php echo $lang->idAB;?></th>
@@ -26,8 +26,8 @@
<th class='w-p15'><?php echo $lang->story->plan;?></th>
<th><?php echo $lang->story->title;?> <span class='required'></span></th>
<th class='w-p20'><?php echo $lang->story->spec;?></th>
<th class='w-60px'><?php echo $lang->story->pri;?></th>
<th class='w-60px'><?php echo $lang->story->estimate;?></th>
<th class='w-70px'><?php echo $lang->story->pri;?></th>
<th class='w-80px'><?php echo $lang->story->estimate;?></th>
<th class='w-70px'><?php echo $lang->story->review;?></th>
</tr>
</thead>
@@ -36,8 +36,8 @@
<?php $planID = $i == 0 ? '' : 'same';?>
<tr class='text-center'>
<td><?php echo $i+1;?></td>
<td><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, 'class=form-control');?></td>
<td><?php echo html::select("plan[$i]", $plans, $planID, 'class=form-control');?></td>
<td class='text-left'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
<td class='text-left'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
<td><?php echo html::input("title[$i]", $storyTitle, "class='form-control'");?></td>
<td>
<?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control'");?>
+13 -14
View File
@@ -21,28 +21,27 @@
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "from=storyBatchEdit")?>">
<table class='table table-fixed table-form'>
<table class='table table-form'>
<thead>
<tr class='text-center'>
<th class='w-30px'> <?php echo $lang->idAB;?></th>
<th class='w-p15'><?php echo $lang->story->module;?></th>
<th class='w-p15'><?php echo $lang->story->planAB;?></th>
<th class='w-200px'><?php echo $lang->story->module;?></th>
<th class='w-200px'><?php echo $lang->story->planAB;?></th>
<th> <?php echo $lang->story->title;?> <span class='required'></span></th>
<th class='w-50px'> <?php echo $lang->story->estimateAB;?></th>
<th class='w-50px'> <?php echo $lang->priAB;?></th>
<th class='w-80px'> <?php echo $lang->story->source;?></th>
<th class='w-60px'> <?php echo $lang->story->status;?></th>
<th class='w-80px'> <?php echo $lang->story->stageAB;?></th>
<th class='w-100px'><?php echo $lang->story->closedBy;?></th>
<th class='w-160px'><?php echo $lang->story->closedReason;?></th>
<th class='w-70px'> <?php echo $lang->priAB;?></th>
<th class='w-100px'> <?php echo $lang->story->source;?></th>
<th class='w-80px'> <?php echo $lang->story->status;?></th>
<th class='w-100px'> <?php echo $lang->story->stageAB;?></th>
<th class='w-120px'><?php echo $lang->story->closedBy;?></th>
<th><?php echo $lang->story->closedReason;?></th>
</tr>
</thead>
<?php foreach($storyIDList as $storyID):?>
<tr class='text-center'>
<td><?php echo $storyID . html::hidden("storyIDList[$storyID]", $storyID);?></td>
<td><?php echo html::select("modules[$storyID]", $moduleOptionMenus[$stories[$storyID]->product], $stories[$storyID]->module, 'class=form-control');?></td>
<td><?php echo html::select("plans[$storyID]", $productPlans[$stories[$storyID]->product], $stories[$storyID]->plan, 'class=form-control');?></td>
<td class='text-left'><?php echo html::select("modules[$storyID]", $moduleOptionMenus[$stories[$storyID]->product], $stories[$storyID]->module, "class='form-control chosen'");?></td>
<td class='text-left'><?php echo html::select("plans[$storyID]", $productPlans[$stories[$storyID]->product], $stories[$storyID]->plan, "class='form-control chosen'");?></td>
<td><?php echo html::input("titles[$storyID]", $stories[$storyID]->title, 'class=form-control'); ?></td>
<td><?php echo html::input("estimates[$storyID]", $stories[$storyID]->estimate, 'class=form-control'); ?></td>
<td><?php echo html::select("pris[$storyID]", (array)$lang->story->priList, $stories[$storyID]->pri, 'class=form-control');?></td>
@@ -56,9 +55,9 @@
<?php endif;?>
<?php if($stories[$storyID]->status == 'closed'):?>
<td><?php echo html::select("closedBys[$storyID]", $users, $stories[$storyID]->closedBy, 'class="form-control"');?></td>
<td class='text-left'><?php echo html::select("closedBys[$storyID]", $users, $stories[$storyID]->closedBy, "class='form-control chosen'");?></td>
<?php else:?>
<td><?php echo html::select("closedBys[$storyID]", $users, $stories[$storyID]->closedBy, 'class="form-control" disabled="disabled"');?></td>
<td class='text-left'><?php echo html::select("closedBys[$storyID]", $users, $stories[$storyID]->closedBy, 'class="form-control" disabled="disabled"');?></td>
<?php endif;?>
<?php if($stories[$storyID]->status == 'closed'):?>
+3 -3
View File
@@ -25,12 +25,12 @@
<tr>
<th class='w-80px'><?php echo $lang->story->product;?></th>
<td class='w-p25-f'>
<?php echo html::select('product', $products, $productID, "onchange='loadProduct(this.value);' class='form-control'");?>
<?php echo html::select('product', $products, $productID, "onchange='loadProduct(this.value);' class='form-control chosen'");?>
</td>
<td class='w-p15-f'>
<div class='input-group' id='moduleIdBox'>
<?php
echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control'");
echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");
if(count($moduleOptionMenu) == 1)
{
echo "<span class='input-group-addon'>";
@@ -48,7 +48,7 @@
<td>
<div class='input-group' id='planIdBox'>
<?php
echo html::select('plan', $plans, $planID, "class='form-control'");
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
if(count($plans) == 1)
{
echo "<span class='input-group-addon'>";
+5 -5
View File
@@ -55,13 +55,13 @@
<table class='table table-form'>
<tr>
<th class='w-70px'><?php echo $lang->story->product;?></th>
<td><?php echo html::select('product', $products, $story->product, 'class="form-control" onchange="loadProduct(this.value)";');?></td>
<td><?php echo html::select('product', $products, $story->product, 'class="form-control chosen" onchange="loadProduct(this.value)";');?></td>
</tr>
<tr>
<th><?php echo $lang->story->module;?></th>
<td id='moduleIdBox'>
<?php
echo html::select('module', $moduleOptionMenu, $story->module, 'class="form-control"');
echo html::select('module', $moduleOptionMenu, $story->module, 'class="form-control chosen"');
if(count($moduleOptionMenu) == 1)
{
echo "<span class='help-block'>";
@@ -75,7 +75,7 @@
<tr>
<th><?php echo $lang->story->plan;?></th>
<td id='planIdBox'>
<?php echo html::select('plan', $plans, $story->plan, 'class=form-control');
<?php echo html::select('plan', $plans, $story->plan, "class='form-control chosen'");
if(count($plans) == 1)
{
echo "<span class='help-block'>";
@@ -132,13 +132,13 @@
<?php if($story->reviewedBy):?>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
<td><?php echo html::select('reviewedBy[]', $users, str_replace(' ', '', $story->reviewedBy), 'class="area-1" multiple');?></td>
<td><?php echo html::select('reviewedBy[]', $users, str_replace(' ', '', $story->reviewedBy), 'class="form-control chosen" multiple');?></td>
</tr>
<?php endif;?>
<?php if($story->status == 'closed'):?>
<tr>
<th><?php echo $lang->story->closedBy;?></th>
<td><?php echo html::select('closedBy', $users, $story->closedBy, 'class="form-control"');?></td>
<td><?php echo html::select('closedBy', $users, $story->closedBy, 'class="form-control chosen"');?></td>
</tr>
<tr>
<th><?php echo $lang->story->closedReason;?></th>
+1 -1
View File
@@ -53,7 +53,7 @@ var assignedTo = '<?php $story->lastEditedBy ? print($story->lastEditedBy) : pri
<?php endif;?>
<tr>
<th><?php echo $lang->story->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $story->lastEditedBy ? $story->lastEditedBy : $story->openedBy, 'class=form-control');?></td><td></td>
<td><?php echo html::select('assignedTo', $users, $story->lastEditedBy ? $story->lastEditedBy : $story->openedBy, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->story->reviewedBy;?></th>
+1 -1
View File
@@ -110,7 +110,7 @@ function setStories(moduleID, projectID)
$.get(link, function(stories)
{
var storyID = $('#story').val();
if(!stories) stories = '<select id="story" name="story" class="select-1"></select>';
if(!stories) stories = '<select id="story" name="story" class="form-control"></select>';
$('#story').replaceWith(stories);
$('#story').val(storyID);
setPreview();