* Refactor tips for after create execution.
This commit is contained in:
@@ -1660,13 +1660,8 @@ class execution extends control
|
||||
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.
|
||||
|
||||
$this->view->title = $this->lang->execution->tips;
|
||||
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
@@ -3663,7 +3658,7 @@ class execution extends control
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->display('execution', 'tips');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
$(function()
|
||||
{
|
||||
if(executionID)
|
||||
{
|
||||
triggerTips();
|
||||
return false;
|
||||
}
|
||||
|
||||
loadProjectExecutions(copyProjectID);
|
||||
|
||||
if($('#methodHover').length) new zui.Tooltip('#methodHover', {title: methodTip, trigger: 'hover', placement: 'right', type: 'white', 'className': 'text-gray border border-light methodTip'});
|
||||
@@ -132,3 +138,11 @@ function setCopyExecution()
|
||||
loadPage($.createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0©ExecutionID=' + executionID));
|
||||
zui.Modal.hide();
|
||||
}
|
||||
|
||||
window.triggerTips = function()
|
||||
{
|
||||
const modal = zui.Modal.open({
|
||||
url: $.createLink('execution', 'tips', 'executionID=' + executionID),
|
||||
id: 'tipsModal',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
$(document).off('click', '.tipBtn').on('click', '.tipBtn', function()
|
||||
{
|
||||
loadPage($(this).data('url'));
|
||||
})
|
||||
@@ -19,6 +19,7 @@ jsVar('errorSameBranches', $lang->execution->errorSameBranches);
|
||||
jsVar('isStage', $isStage);
|
||||
jsVar('copyExecutionID', $copyExecutionID);
|
||||
jsVar('multiBranchProducts', $multiBranchProducts);
|
||||
jsVar('executionID', $executionID);
|
||||
|
||||
$methodBox = null;
|
||||
if(!empty($project->model) && $project->model == 'agileplus')
|
||||
@@ -567,5 +568,10 @@ modalTrigger
|
||||
)
|
||||
);
|
||||
|
||||
modalTrigger
|
||||
(
|
||||
modal (set::id('tipsModal'))
|
||||
);
|
||||
|
||||
/* ====== Render page ====== */
|
||||
render();
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The yyy view file of xxx module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Shujie Tian<tianshujie@easycorp.ltd>
|
||||
* @package xxx
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
set::closeBtn(array('url' => createLink('execution', 'all'), 'class' => 'ghost'));
|
||||
to::header(div(
|
||||
set::class('modal-title'),
|
||||
$lang->execution->tips
|
||||
));
|
||||
|
||||
h::hr(set::class('mb-4'));
|
||||
|
||||
span
|
||||
(
|
||||
set::class('article-h2 tip-title'),
|
||||
$lang->execution->afterInfo
|
||||
);
|
||||
|
||||
div
|
||||
(
|
||||
set::class('mt-4'),
|
||||
btn
|
||||
(
|
||||
set::class('mr-4 tipBtn'),
|
||||
$lang->execution->setTeam,
|
||||
set('data-url', createLink('execution', 'team', "executionID={$executionID}")),
|
||||
),
|
||||
$execution->lifetime != 'ops' ? btn
|
||||
(
|
||||
set::class('mr-4 tipBtn'),
|
||||
$lang->execution->linkStory,
|
||||
set('data-url', createLink('execution', 'linkstory', "executionID=$executionID")),
|
||||
) : null,
|
||||
btn
|
||||
(
|
||||
set::class('mr-4 tipBtn'),
|
||||
$lang->execution->createTask,
|
||||
set('data-url', createLink('task', 'create', "execution=$executionID")),
|
||||
),
|
||||
btn
|
||||
(
|
||||
set::class('mr-4 tipBtn'),
|
||||
$lang->execution->goback,
|
||||
set('data-url', createLink('execution', 'task', "executionID={$executionID}")),
|
||||
),
|
||||
btn
|
||||
(
|
||||
set::class('tipBtn'),
|
||||
$lang->execution->gobackExecution,
|
||||
set('data-url', createLink('execution', 'all')),
|
||||
),
|
||||
);
|
||||
|
||||
/* ====== Render page ====== */
|
||||
render();
|
||||
Reference in New Issue
Block a user