Merge branch 'devops24_zenggang' into 'master'
Finish task#51115,51116,51120,51121,51133 See merge request easycorp/zentaopms!2445
This commit is contained in:
@@ -692,6 +692,12 @@ class baseValidater
|
||||
$methodName = $app->getMethodName();
|
||||
$params = $app->getParams();
|
||||
|
||||
if($moduleName == 'tutorial' and $methodName == 'wizard' and isset($params['module']) and isset($params['method']))
|
||||
{
|
||||
$moduleName = $params['module'];
|
||||
$methodName = $params['method'];
|
||||
}
|
||||
|
||||
if($type == 'cookie')
|
||||
{
|
||||
$pagerCookie = 'pager' . ucfirst($moduleName) . ucfirst($methodName);
|
||||
|
||||
@@ -627,7 +627,7 @@ class bug extends control
|
||||
$this->view->productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProject() : $projects;
|
||||
$this->view->projects = defined('TUTORIAL') ? $this->loadModel('tutorial')->getProjectPairs() : $projects;
|
||||
$this->view->project = $project;
|
||||
$this->view->executions = defined('TUTORIAL') ? $this->loadModel('tutorial')->getExecutionPairs() : $executions;
|
||||
$this->view->builds = $builds;
|
||||
|
||||
+11
-1
@@ -957,7 +957,17 @@ class commonModel extends model
|
||||
$item->moduleName = $currentModule;
|
||||
$item->methodName = $currentMethod;
|
||||
$item->vars = $vars;
|
||||
$item->url = helper::createLink($currentModule, $currentMethod, $vars, '', 0, 0, 1);
|
||||
|
||||
$isTutorialMode = commonModel::isTutorialMode();
|
||||
if($isTutorialMode && $currentModule == 'project')
|
||||
{
|
||||
if(!empty($vars)) $vars = helper::safe64Encode($vars);
|
||||
$item->url = helper::createLink('tutorial', 'wizard', "module={$currentModule}&method={$currentMethod}¶ms=$vars", '', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$item->url = helper::createLink($currentModule, $currentMethod, $vars, '', 0, 0, 1);
|
||||
}
|
||||
|
||||
$items[] = $item;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<?php if(common::hasPriv('programplan', 'create') and $isStage):?>
|
||||
<?php echo html::a($this->createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "<i class='icon icon-plus'></i> " . $lang->programplan->create, '', "class='btn btn-primary'");?>
|
||||
<?php else: ?>
|
||||
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution'");?>
|
||||
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,7 +149,15 @@ body {margin-bottom: 25px;}
|
||||
<?php if($canBeChanged and (common::hasPriv('task', 'batchCreate', $checkObject) or common::hasPriv('task', 'create', $checkObject))):?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('task', 'create', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
|
||||
$actionLink = $this->createLink('tutorial', 'wizard', "module=task&method=create¶ms=$wizardParams");
|
||||
}
|
||||
else
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'create', "executionID=$executionID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
|
||||
}
|
||||
echo html::a($actionLink, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
|
||||
<?php echo html::select('story', array($task->story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<?php echo html::select('story', array($task->story => (empty($stories) or !isset($stories[$task->story])) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -198,7 +198,7 @@ $(function()
|
||||
if($e.css('display') !== 'none')
|
||||
{
|
||||
if(!$e.data('zui.tooltip')) $e.addClass('tooltip-tutorial').attr('data-toggle', 'tooltip').tooltip(options);
|
||||
$e.tooltip('show');
|
||||
$e.tooltip('show', text);
|
||||
if($e[0].getBoundingClientRect().top > $(window).height() || $e[0].getBoundingClientRect().top < 0) $e[0].scrollIntoView();
|
||||
}
|
||||
else if($e.parent().is('#menuMainNav'))
|
||||
@@ -303,6 +303,7 @@ $(function()
|
||||
{
|
||||
if(status.waitField)
|
||||
{
|
||||
if(status.waitField.hasClass("chosen-controled")) status.waitField = status.waitField.next();
|
||||
var fieldName = status.waitField.closest('td').prev('th').text();
|
||||
if(!fieldName) fieldName = status.waitField.closest('.input-group').find('.input-group-addon:first').text();
|
||||
if(fieldName) showToolTip(status.waitField, lang.requiredTip.replace('%s', fieldName));
|
||||
@@ -544,6 +545,10 @@ $(function()
|
||||
$(document).on('click', '.btn-task', function()
|
||||
{
|
||||
showTask($(this).data('name'));
|
||||
|
||||
/* Code for task #51133. */
|
||||
var status = checkTask();
|
||||
if(status.submitOK) window.location.reload();
|
||||
}).on('click', '.btn-open-target-page', function()
|
||||
{
|
||||
appsWindow.$.apps.open(tasks[current].url);
|
||||
|
||||
Reference in New Issue
Block a user