Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -412,14 +412,15 @@ class doc extends control
|
||||
{
|
||||
$excludedModel = $this->config->vision == 'lite' ? '' : 'kanban';
|
||||
$objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', $excludedModel);
|
||||
$this->view->executions = array();
|
||||
if($lib->type == 'execution')
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getById($lib->execution);
|
||||
$objectID = $execution->project;
|
||||
$libs = $this->doc->getLibs('execution', $extra = "withObject,$unclosed", $libID, $lib->execution);
|
||||
$this->view->execution = $execution;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executions = array(0 => '') + $this->execution->getPairs($objectID, 'sprint,stage', 'multiple,leaf,noprefix');
|
||||
}
|
||||
$this->view->executions = array(0 => '') + $this->loadModel('execution')->getPairs($objectID, 'sprint,stage', 'multiple,leaf,noprefix');
|
||||
}
|
||||
elseif($linkType == 'execution')
|
||||
{
|
||||
|
||||
@@ -29,7 +29,12 @@ function loadObjectModules(objectType, objectID, docType)
|
||||
function loadExecutions(projectID)
|
||||
{
|
||||
var link = createLink('project', 'ajaxGetExecutions', "projectID=" + projectID + "&executionID=0&mode=multiple,leaf,noprefix&type=sprint,stage");
|
||||
$('#executionBox').load(link, function(){$('#executionBox').find('select').attr('data-placeholder', holders.execution).attr('onchange', "loadObjectModules('execution', this.value)").picker()});
|
||||
$('#executionBox').load(link, function()
|
||||
{
|
||||
var $extension = $('#executionBox').find('select');
|
||||
$extension.attr('data-placeholder', holders.execution).attr('onchange', "loadObjectModules('execution', this.value)").picker();
|
||||
if($extension.hasClass('disabled')) $('#executionBox').find('.picker').addClass('disabled');
|
||||
});
|
||||
loadObjectModules('project', projectID);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ $(function()
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100);
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
if(objectType == 'project') loadExecutions($('#project').val());
|
||||
setSavePath();
|
||||
|
||||
/* Change for show create error. */
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
</div>
|
||||
<?php js::set('textType', $config->doc->textTypes);?>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('objectType', $objectType);?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<?php js::set('requiredFields', ',' . $config->doc->create->requiredFields . ',');?>
|
||||
|
||||
@@ -2348,16 +2348,19 @@ class project extends control
|
||||
* @param int $projectID
|
||||
* @param int $executionID
|
||||
* @param string $mode
|
||||
* @param string $type
|
||||
* @param string $type all|sprint|stage|kanban
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetExecutions($projectID, $executionID = 0, $mode = '', $type = 'all')
|
||||
{
|
||||
$project = $this->project->getById($projectID);
|
||||
$executions = array('' => '') + $this->loadModel('execution')->getPairs($projectID, $type, $mode);
|
||||
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($executionList));
|
||||
return print(html::select('execution', $executions, $executionID, "class='form-control'"));
|
||||
|
||||
$disabled = $project->multiple ? '' : 'disabled';
|
||||
return print(html::select('execution', $executions, $executionID, "class='form-control $disabled' $disabled"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user