* Code for task#77794. Batch edit productplan.

This commit is contained in:
xieqiyu
2022-11-30 09:45:37 +08:00
parent 5095e566d8
commit 2a92cee55e
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -24,13 +24,13 @@ function changeDate(planID)
* Get conflict stories.
*
* @param int $planID
* @param int $branch
* @access public
* @return void
*/
function getConflictStories(planID, branch)
function getConflictStories(planID)
{
$.get(createLink('productplan', 'ajaxGetConflictStory', 'planID=' + planID + '&newBranch=' + branch), function(conflictStories)
var newBranch = $('#branch' + planID).val() ? $('#branch' + planID).val().toString() : '';
$.get(createLink('productplan', 'ajaxGetConflictStory', 'planID=' + planID + '&newBranch=' + newBranch), function(conflictStories)
{
if(conflictStories != '' && !confirm(conflictStories))
{
+2 -2
View File
@@ -755,7 +755,7 @@ class productplanModel extends model
if(isset($data->status[$planID]) and $data->status[$planID] != 'wait') $isFuture = false;
$plan = new stdclass();
$plan->branch = isset($data->branch[$planID]) ? $data->branch[$planID] : $oldPlans[$planID]->branch;
$plan->branch = isset($data->branch[$planID]) ? join(',', $data->branch[$planID]) : $oldPlans[$planID]->branch;
$plan->title = $data->title[$planID];
$plan->begin = isset($data->begin[$planID]) ? $data->begin[$planID] : '';
$plan->end = isset($data->end[$planID]) ? $data->end[$planID] : '';
@@ -788,7 +788,7 @@ class productplanModel extends model
/* Determine whether the begin and end dates of the parent plan and the child plan are correct. */
if($parentID > 0)
{
$parent = isset($plans[$parentID]) ? $plans[$parentID] : $this->getByID($parentID);
$parent = isset($plans[$parentID]) ? $plans[$parentID] : $this->getByID($parentID);
if($parent->begin != $this->config->productplan->future and $plan->begin != $this->config->productplan->future and $plan->begin < $parent->begin)
{
return print(js::alert(sprintf($this->lang->productplan->beginLetterParentTip, $planID, $plan->begin, $parent->begin)));
+1 -1
View File
@@ -44,7 +44,7 @@
<?php if($product->type != 'normal'):?>
<td class='text-left'>
<?php $disabled = $plan->parent == -1 ? "disabled='disabled'" : '';?>
<?php echo html::select("branch[$plan->id]", $plan->parent == '-1' ? '' : $branchTagOption, $plan->branch, "onchange='getConflictStories($plan->id, this.value); 'class='form-control chosen' $disabled");?>
<?php echo html::select("branch[$plan->id][]", $plan->parent == '-1' ? '' : $branchTagOption, $plan->branch, "onchange='getConflictStories($plan->id); 'class='form-control chosen' multiple $disabled");?>
</td>
<?php endif;?>
<td title='<?php echo $plan->title?>'><?php echo html::input("title[$plan->id]", $plan->title, "class='form-control'")?></td>