* Refactor link product of the create execution.
This commit is contained in:
@@ -1651,12 +1651,14 @@ class execution extends control
|
||||
|
||||
$importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory;
|
||||
|
||||
return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
$confirmURL = inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes");
|
||||
$cancelURL = inlink('create', "projectID=$projectID&executionID=$executionID");
|
||||
return $this->send(array('result' => 'success', 'load' => array('confirm' => $importPlanStoryTips, 'confirmed' => $confirmURL, 'canceled' => $cancelURL)));
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($projectID) and $execution->type == 'kanban' and $this->app->tab == 'project') return $this->send(array('result' => 'success', 'locate' => $this->createLink('project', 'index', "projectID=$projectID")));
|
||||
if(!empty($projectID) and $execution->type == 'kanban') return $this->send(array('result' => 'success', 'locate' => inlink('kanban', "executionID=$executionID")));
|
||||
if(!empty($projectID) and $execution->type == 'kanban' and $this->app->tab == 'project') return $this->send(array('result' => 'success', 'load' => $this->createLink('project', 'index', "projectID=$projectID")));
|
||||
if(!empty($projectID) and $execution->type == 'kanban') return $this->send(array('result' => 'success', 'load' => inlink('kanban', "executionID=$executionID")));
|
||||
|
||||
$this->execution->setMenu($executionID); // Fix bug #22897.
|
||||
|
||||
@@ -1742,7 +1744,7 @@ class execution extends control
|
||||
|
||||
if($this->app->tab == 'doc')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'projectSpace', "objectID=$executionID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $this->createLink('doc', 'projectSpace', "objectID=$executionID")));
|
||||
}
|
||||
|
||||
if(!empty($projectID) and strpos(',kanban,agileplus,waterfallplus,', ",$project->model,") !== false)
|
||||
@@ -1753,7 +1755,7 @@ class execution extends control
|
||||
|
||||
if(!empty($_POST['plans']))
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=1&confirm=no")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=1&confirm=no")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1762,11 +1764,11 @@ class execution extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$link = $this->config->vision != 'lite' ? $this->createLink('project', 'index', "projectID=$projectID") : $this->createLink('project', 'execution', "status=all&projectID=$projectID");
|
||||
if($this->app->tab == 'project') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
if($this->app->tab == 'project') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => $link));
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('kanban', "executionID=$executionID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => inlink('kanban', "executionID=$executionID")));
|
||||
}
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.methodTip {width: 200px !important;}
|
||||
#lifeTimeTips {padding-left: 1rem; align-items: center;}
|
||||
.team-hr {margin-top: 0 !important;}
|
||||
#productsBox .line-btn {width: 48px; margin-right: 32px;}
|
||||
.productsBox .line-btn {width: 48px; margin-right: 32px;}
|
||||
|
||||
#copyExecutionModal .modal-dialog {max-height: unset;}
|
||||
#copyExecutionModal .copy-title {min-width: 130px;}
|
||||
|
||||
@@ -258,16 +258,16 @@ function hidePlanBox(attribute)
|
||||
{
|
||||
if(attribute == 'request' || attribute == 'review')
|
||||
{
|
||||
$('#productsBox .planBox').addClass('hidden');
|
||||
$('#productsBox .planBox select').attr('disabled', 'disabled');
|
||||
$('.productsBox .planBox').addClass('hidden');
|
||||
$('.productsBox .planBox select').attr('disabled', 'disabled');
|
||||
|
||||
$('#plansBox').closest('.form-row').addClass('hidden');
|
||||
$('#plansBox').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productsBox .planBox').removeClass('hidden');
|
||||
$('#productsBox .planBox select').removeAttr('disabled');
|
||||
$('.productsBox .planBox').removeClass('hidden');
|
||||
$('.productsBox .planBox select').removeAttr('disabled');
|
||||
|
||||
$('#plansBox').closest('.form-row').removeClass('hidden');
|
||||
$('#plansBox').removeAttr('disabled');
|
||||
|
||||
@@ -23,7 +23,7 @@ $(function()
|
||||
let existedBranch = false;
|
||||
|
||||
/* Determine whether the products of the same branch are linked. */
|
||||
$("#productsBox select[name^='products']").each(function()
|
||||
$(".productsBox select[name^='products']").each(function()
|
||||
{
|
||||
let productID = $(this).val();
|
||||
if(typeof(products[productID]) == 'undefined') products[productID] = new Array();
|
||||
|
||||
@@ -102,7 +102,7 @@ if(isset($project->hasProduct) and !empty($project->hasProduct) and $products)
|
||||
|
||||
$productsBox[] = formRow
|
||||
(
|
||||
set::id('productsBox'),
|
||||
set::class('productsBox'),
|
||||
formGroup
|
||||
(
|
||||
set::width($hasBranch ? '1/4' : '1/2'),
|
||||
@@ -159,7 +159,8 @@ if(isset($project->hasProduct) and !empty($project->hasProduct) and $products)
|
||||
(
|
||||
set::name("plans[$product->id][]"),
|
||||
set::items($plans),
|
||||
set::value($planID)
|
||||
set::value($planID),
|
||||
set::multiple(true)
|
||||
)
|
||||
),
|
||||
$isStage && $project->stageBy == 'project' ? null : div
|
||||
@@ -209,7 +210,7 @@ else
|
||||
{
|
||||
$productsBox [] = formRow
|
||||
(
|
||||
set::id('productsBox'),
|
||||
set::class('productsBox'),
|
||||
formGroup
|
||||
(
|
||||
set::width('1/2'),
|
||||
|
||||
Reference in New Issue
Block a user