Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -98,20 +98,20 @@ class helper extends baseHelper
|
||||
{
|
||||
if($feature == 'product' or $feature == 'scrum' or $feature == 'waterfall') return strpos(",$config->disabledFeatures,", ",{$feature},") === false;
|
||||
|
||||
$hasFeature = false;
|
||||
$isFeature = false;
|
||||
$hasFeature = false;
|
||||
$canConfigFeature = false;
|
||||
foreach($config->featureGroup as $group => $modules)
|
||||
{
|
||||
foreach($modules as $module)
|
||||
{
|
||||
if($feature == $group or $feature == $module)
|
||||
{
|
||||
$isFeature = true;
|
||||
$canConfigFeature = true;
|
||||
if(helper::hasFeature("{$group}_{$module}")) $hasFeature = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !$isFeature or ($hasFeature && strpos(",$config->disabledFeatures,", ",{$feature},") === false);
|
||||
return !$canConfigFeature or ($hasFeature && strpos(",$config->disabledFeatures,", ",{$feature},") === false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,6 @@ class build extends control
|
||||
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in(array_keys($stories))->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
|
||||
foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;
|
||||
|
||||
|
||||
/* Set menu. */
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
@@ -389,11 +388,10 @@ class build extends control
|
||||
* @param string|int $branch
|
||||
* @param int $index the index of batch create bug.
|
||||
* @param string $type get all builds or some builds belong to normal releases and executions are not done.
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $index = 0, $type = 'normal', $extra = '')
|
||||
public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $index = 0, $type = 'normal')
|
||||
{
|
||||
$isJsonView = $this->app->getViewType() == 'json';
|
||||
if($varName == 'openedBuild' )
|
||||
@@ -416,11 +414,6 @@ class build extends control
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
}
|
||||
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $type);
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
if(strpos($extra, 'multiple') !== false) $varName .= '[]';
|
||||
return print(html::select($varName, $builds, $build, "class='form-control chosen' $extra"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -433,10 +426,11 @@ class build extends control
|
||||
* @param int $index the index of batch create bug.
|
||||
* @param bool $needCreate if need to append the link of create build
|
||||
* @param string $type get all builds or some builds belong to normal releases and executions are not done.
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProjectBuilds($projectID, $productID, $varName, $build = '', $branch = 'all', $index = 0, $needCreate = false, $type = 'normal')
|
||||
public function ajaxGetProjectBuilds($projectID, $productID, $varName, $build = '', $branch = 'all', $index = 0, $needCreate = false, $type = 'normal', $extra = '')
|
||||
{
|
||||
$isJsonView = $this->app->getViewType() == 'json';
|
||||
if($varName == 'openedBuild')
|
||||
@@ -457,6 +451,12 @@ class build extends control
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
}
|
||||
|
||||
if(empty($projectID)) return $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $type, $projectID, 'project', $build);
|
||||
if(strpos($extra, 'multiple') !== false) $varName .= '[]';
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control chosen' $extra"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,7 @@ $().ready(function()
|
||||
{
|
||||
var productID = $('#product').val();
|
||||
var branch = $('#branch').val();
|
||||
$.get(createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=builds&build=&branch=' + branch + '&index=&type=noempty,notrunk,separate,noproject&extra=multiple'), function(data)
|
||||
$.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=' + branch + '&index=&needCreate=&type=noempty,notrunk,separate,noproject&extra=multiple'), function(data)
|
||||
{
|
||||
if(data) $('#buildBox').html(data);
|
||||
$('#builds').chosen();
|
||||
|
||||
@@ -11,7 +11,7 @@ $().ready(function()
|
||||
{
|
||||
var productID = $('#product').val();
|
||||
var branch = $('#branch').val();
|
||||
$.get(createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=builds&build=' + builds + '&branch=' + branch + '&index=&type=noempty,notrunk,separate,noproject&extra=multiple'), function(data)
|
||||
$.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=' + branch + '&index=&needCreate=&type=noempty,notrunk,separate,noproject&extra=multiple'), function(data)
|
||||
{
|
||||
if(data) $('#buildBox').html(data);
|
||||
$('#builds').chosen();
|
||||
@@ -22,8 +22,8 @@ $().ready(function()
|
||||
|
||||
function loadExecutions(oldExecutionID)
|
||||
{
|
||||
var productID = $('#product').val();
|
||||
var branchID = $('#branch').length > 0 ? $('#branch').val() : 0;
|
||||
var productID = $('#product').val();
|
||||
var branchID = $('#branch').length > 0 ? $('#branch').val() : 0;
|
||||
$('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&number=&executionID=' + oldExecutionID), function()
|
||||
{
|
||||
$('#executionsBox #execution').chosen().removeAttr('onchange');
|
||||
|
||||
@@ -328,6 +328,10 @@ tbody tr td:first-child input {display: none;}
|
||||
<td><?php echo $branchName;?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo $build->name;?></td>
|
||||
</tr>
|
||||
<?php if($build->execution):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->execution;?></th>
|
||||
@@ -345,10 +349,6 @@ tbody tr td:first-child input {display: none;}
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo $build->name;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->builder;?></th>
|
||||
<td><?php echo zget($users, $build->builder);?></td>
|
||||
|
||||
@@ -22,8 +22,8 @@ $config->custom->requiredModules[35] = 'execution';
|
||||
$config->custom->requiredModules[40] = 'task';
|
||||
$config->custom->requiredModules[45] = 'build';
|
||||
|
||||
$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'execution', 'vision');
|
||||
$config->custom->features = array('waterfall', 'productUR');
|
||||
$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'execution', 'vision');
|
||||
$config->custom->dataFeatures = array('waterfall', 'productUR');
|
||||
|
||||
$config->custom->requiredModules[50] = 'bug';
|
||||
$config->custom->requiredModules[55] = 'testcase';
|
||||
@@ -42,8 +42,8 @@ $config->custom->fieldList['project']['create'] = 'budget,PM,desc';
|
||||
$config->custom->fieldList['project']['edit'] = 'budget,PM,desc';
|
||||
$config->custom->fieldList['product']['create'] = 'PO,QD,RD,type,desc';
|
||||
$config->custom->fieldList['product']['edit'] = 'PO,QD,RD,type,desc,status';
|
||||
$config->custom->fieldList['story']['create'] = 'module,plan,source,pri,estimate,keywords';
|
||||
$config->custom->fieldList['story']['change'] = 'comment';
|
||||
$config->custom->fieldList['story']['create'] = 'module,plan,source,pri,estimate,keywords,spec';
|
||||
$config->custom->fieldList['story']['change'] = 'comment,spec';
|
||||
$config->custom->fieldList['story']['close'] = 'comment';
|
||||
$config->custom->fieldList['story']['review'] = 'reviewedDate,comment';
|
||||
$config->custom->fieldList['productplan'] = 'begin,end,desc';
|
||||
|
||||
@@ -645,7 +645,7 @@ class custom extends control
|
||||
}
|
||||
|
||||
$disabledFeatures = array('program', 'productLine', 'scrum' => array('scrumMeasrecord'));
|
||||
foreach($this->config->custom->features as $feature)
|
||||
foreach($this->config->custom->dataFeatures as $feature)
|
||||
{
|
||||
$function = 'has' . ucfirst($feature) . 'Data';
|
||||
if(!$this->custom->$function())
|
||||
|
||||
@@ -897,7 +897,7 @@ class customModel extends model
|
||||
$disabledFeatures = '';
|
||||
if($mode == 'light')
|
||||
{
|
||||
foreach($this->config->custom->features as $feature)
|
||||
foreach($this->config->custom->dataFeatures as $feature)
|
||||
{
|
||||
$function = 'has' . ucfirst($feature) . 'Data';
|
||||
if(!$this->$function()) $disabledFeatures .= "$feature,";
|
||||
|
||||
@@ -102,5 +102,5 @@ ol, ul {margin-bottom: 0}
|
||||
|
||||
.fullscreen-close {top: 8px !important;}
|
||||
|
||||
#subHeader .list-group>a.selected {color: #e9f2fb !important; background-color: #0c64eb !important;}
|
||||
#subHeader .list-group>a.selected {color: #e9f2fb !important;}
|
||||
#pageNav #dropMenu .table-col .list-group .icon-move {display:block; float: left; font-size: 12px; padding: 3px 4px 3px 1px;}
|
||||
|
||||
@@ -1272,15 +1272,16 @@ class execution extends control
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('execution', 'build', "executionID=$executionID&type=bysearch&queryID=myQueryID");
|
||||
|
||||
$this->loadModel('build');
|
||||
$product = $param ? $this->loadModel('product')->getById($param) : '';
|
||||
if($product and $product->type != 'normal')
|
||||
{
|
||||
$this->loadModel('build');
|
||||
$this->loadModel('branch');
|
||||
$branches = array(BRANCH_MAIN => $this->lang->branch->main) + $this->branch->getPairs($product->id, '', $executionID);
|
||||
$this->config->build->search['fields']['branch'] = sprintf($this->lang->build->branchName, $this->lang->product->branchName[$product->type]);
|
||||
$this->config->build->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => $branches);
|
||||
}
|
||||
if(!$execution->hasProduct) unset($this->config->build->search['fields']['product']);
|
||||
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'execution');
|
||||
|
||||
/* Get builds. */
|
||||
|
||||
@@ -1347,7 +1347,7 @@ function createTaskMenu(options)
|
||||
if(priv.canPauseTask && task.$col.type == 'developing') items.push({label: taskLang.pause, icon: 'pause', url: createLink('task', 'pause', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canActivateTask && (task.$col.type == 'developed' || task.$col.type == 'canceled' || task.$col.type == 'closed')) items.push({label: executionLang.activate, icon: 'magic', url: createLink('task', 'activate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask && !task.mode) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'executionID=' + executionID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'executionID=' + executionID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCancelTask && (task.$col.type == 'wait' || task.$col.type == 'developing' || task.$col.type == 'pause')) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canDeleteTask) items.push({label: taskLang.delete, icon: 'trash', onClick: function(){deleteCard('task', task.id, task.$lane.region)}});
|
||||
return items;
|
||||
|
||||
@@ -507,9 +507,9 @@ js::set('storyType', $storyType);
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php if(($product->type != 'normal' and $branchID != 'all') or $product->type == 'normal'):?>
|
||||
<?php if($productID and (($product->type != 'normal' and $branchID != 'all') or $product->type == 'normal')):?>
|
||||
<?php $isShowModuleBTN = ($isProjectStory and $browseType != 'bybranch') ? false : true;?>
|
||||
<?php if($canBatchChangeModule and $productID and $isShowModuleBTN):?>
|
||||
<?php if($canBatchChangeModule and $isShowModuleBTN):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($modules) > 8;?>
|
||||
@@ -537,7 +537,7 @@ js::set('storyType', $storyType);
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($canBatchChangePlan and $storyType == 'story'):?>
|
||||
<div class="btn-group dropup <?php echo $productID == 0 ? 'hidden' : '';?>">
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->planAB;?> <span class="caret"></span></button>
|
||||
<?php
|
||||
unset($plans['']);
|
||||
|
||||
@@ -208,7 +208,7 @@ $lang->project->changeProgram = '%s > 修改项目集';
|
||||
$lang->project->changeProgramTip = '修改项目集后,该项目关联产品的项目集也会被修改,请确认是否修改。';
|
||||
$lang->project->linkedProjectsTip = '关联的项目如下';
|
||||
$lang->project->multiLinkedProductsTip = '该项目关联的如下产品还关联了其他项目,请取消关联后再操作';
|
||||
$lang->project->noticeDivsion = '当前项目关联多个产品,可以点击确认开启按产品创建阶段的模式,点击取消则保持现状。';
|
||||
$lang->project->noticeDivsion = '当前项目关联多个产品,可以点击确认开启按产品创建阶段的模式,点击关闭则保持现状。';
|
||||
$lang->project->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此项目中";
|
||||
$lang->project->createExecution = "该项目下没有{$lang->executionCommon},请先创建{$lang->executionCommon}";
|
||||
$lang->project->unlinkExecutionMember = "该用户参与了%s%s%s个{$lang->execution->common},是否同时将其移除?(该用户所产生的数据不会受影响。)";
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if(!$project->division and count($linkedProducts) == 1):?>
|
||||
<?php js::set('noticeDivsion', $lang->project->noticeDivsion);?>
|
||||
<?php js::set('divisionList', $lang->project->divisionList);?>
|
||||
|
||||
@@ -521,6 +521,7 @@ class storyModel extends model
|
||||
$story->category = $stories->category[$i];
|
||||
$story->pri = $stories->pri[$i];
|
||||
$story->estimate = $stories->estimate[$i];
|
||||
$story->spec = $stories->spec[$i];
|
||||
$story->status = $saveDraft ? 'draft' : ((empty($stories->reviewer[$i]) and !$forceReview) ? 'active' : 'reviewing');
|
||||
$story->stage = ($this->app->tab == 'project' or $this->app->tab == 'execution') ? 'projected' : 'wait';
|
||||
$story->keywords = $stories->keywords[$i];
|
||||
@@ -558,7 +559,7 @@ class storyModel extends model
|
||||
$link2Plans = array();
|
||||
foreach($data as $i => $story)
|
||||
{
|
||||
$this->dao->insert(TABLE_STORY)->data($story)->autoCheck()->checkFlow()->exec();
|
||||
$this->dao->insert(TABLE_STORY)->data($story, 'spec')->autoCheck()->checkFlow()->exec();
|
||||
if(dao::isError())
|
||||
{
|
||||
echo js::error(dao::getError());
|
||||
|
||||
@@ -90,9 +90,9 @@ $(function()
|
||||
var output = '';
|
||||
$('#linkStoriesForm').find('tr.checked').each(function(){
|
||||
var storyID = $(this).find('td.c-id').find('div.checkbox-primary input').attr('value');
|
||||
var storyTitle = "#" + storyID + ' ' + $(this).find('td').eq(3).attr('title');
|
||||
var storyTitle = "#" + storyID + ' ' + $(this).find('td').eq(2).attr('title');
|
||||
var linkStoryField = storyType == 'story' ? 'linkStories' : 'linkRequirements';
|
||||
var checkbox = "<li><div class='checkbox-primary' title='" + $(this).find('td').eq(3).attr('title') + "'><input type='checkbox' checked='checked' name='" + linkStoryField + "[]' " + "value=" + storyID + " /><label class='linkStoryTitle'>" + storyTitle + "</label></div></li>";
|
||||
var checkbox = "<li><div class='checkbox-primary' title='" + $(this).find('td').eq(2).attr('title') + "'><input type='checkbox' checked='checked' name='" + linkStoryField + "[]' " + "value=" + storyID + " /><label class='linkStoryTitle'>" + storyTitle + "</label></div></li>";
|
||||
|
||||
output += checkbox;
|
||||
});
|
||||
|
||||
@@ -62,6 +62,7 @@ class task extends control
|
||||
|
||||
$task = new stdClass();
|
||||
$task->module = $moduleID;
|
||||
$task->mode = '';
|
||||
$task->assignedTo = '';
|
||||
$task->name = '';
|
||||
$task->story = $storyID;
|
||||
|
||||
+27
-17
@@ -27,6 +27,32 @@ $(function()
|
||||
loadStories(executionID);
|
||||
})
|
||||
|
||||
/**
|
||||
* Show team menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function showTeamMenu()
|
||||
{
|
||||
if($('[name^=multiple]').prop('checked'))
|
||||
{
|
||||
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
|
||||
$('#assignedTo').next('.picker').addClass('hidden');
|
||||
$('.team-group').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#estimate').attr('readonly', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#estimate').attr('readonly', false);
|
||||
}
|
||||
$('#dataPlanGroup').fixInputGroup();
|
||||
}
|
||||
/**
|
||||
* Load module, stories and members.
|
||||
*
|
||||
@@ -518,23 +544,7 @@ $(document).ready(function()
|
||||
/* Show team menu. */
|
||||
$('[name^=multiple]').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#assignedTo, #assignedTo_chosen').addClass('hidden');
|
||||
$('#assignedTo').next('.picker').addClass('hidden');
|
||||
$('.team-group').removeClass('hidden');
|
||||
$('.modeBox').removeClass('hidden');
|
||||
$('#estimate').attr('readonly', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#assignedTo, #assignedTo_chosen').removeClass('hidden');
|
||||
$('#assignedTo').next('.picker').removeClass('hidden');
|
||||
$('.team-group').addClass('hidden');
|
||||
$('.modeBox').addClass('hidden');
|
||||
$('#estimate').attr('readonly', false);
|
||||
}
|
||||
$('#dataPlanGroup').fixInputGroup();
|
||||
showTeamMenu();
|
||||
});
|
||||
|
||||
$('#showAllModule').change(function()
|
||||
|
||||
@@ -4132,7 +4132,7 @@ class taskModel extends model
|
||||
$menu .= "<div class='divider'></div>";
|
||||
|
||||
$menu .= $this->buildMenu('task', 'edit', $params, $task, 'view', '', '', 'showinonlybody');
|
||||
if(empty($task->team)) $menu .= $this->buildMenu('task', 'create', "projctID={$task->execution}&storyID=0&moduleID=0&taskID=$task->id", $task, 'view', 'copy');
|
||||
$menu .= $this->buildMenu('task', 'create', "projctID={$task->execution}&storyID=0&moduleID=0&taskID=$task->id", $task, 'view', 'copy');
|
||||
$menu .= $this->buildMenu('task', 'delete', "executionID=$task->execution&taskID=$task->id", $task, 'view', 'trash', 'hiddenwin', 'showinonlybody', true);
|
||||
if($task->parent > 0) $menu .= $this->buildMenu('task', 'view', "taskID=$task->parent", $task, 'view', 'chevron-double-up', '', '', '', '', $this->lang->task->parent);
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if(($execution->type != 'kanban' or $this->config->vision == 'lite') and $execution->multiple):?>
|
||||
<tr>
|
||||
<?php if($execution->type != 'kanban' or $this->config->vision == 'lite'):?>
|
||||
<tr class="<?php echo !$execution->multiple ? 'hidden' : '';?>">
|
||||
<th><?php echo $lang->task->execution;?></th>
|
||||
<td><?php echo html::select('execution', $executions, $execution->id, "class='form-control chosen' onchange='loadAll(this.value)' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
@@ -86,7 +86,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
||||
</tr>
|
||||
<tr class='hidden modeBox'>
|
||||
<th><?php echo $lang->task->mode;?></th>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select('mode', $lang->task->modeList, $task->mode, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php if($execution->type == 'kanban'):?>
|
||||
<tr>
|
||||
|
||||
@@ -48,6 +48,12 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<?php if($memberDisabled) echo html::hidden("team[]", $member->account);?>
|
||||
</td>
|
||||
<td class='hourBox'>
|
||||
<?php if($app->rawMethod == 'create'):?>
|
||||
<div class='input-group estimateBox'>
|
||||
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
|
||||
<span class='input-group-addon'><?php echo 'h';?></span>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='input-group'>
|
||||
<div class="input-control has-icon-right">
|
||||
<?php echo html::input("teamEstimate[]", (float)$member->estimate, "class='form-control text-center' placeholder='{$lang->task->estimate}'" . ($hourDisabled ? ' readonly' : ''))?>
|
||||
@@ -62,11 +68,12 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<label class="input-control-icon-right">h</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='w-100px sort-handler'>
|
||||
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-add"><i class="icon icon-plus"></i></button>
|
||||
<button type="button" <?php echo $memberDisabled ? 'disabled' : '';?> class="btn btn-link btn-sm btn-icon btn-delete"><i class="icon icon-trash"></i></button>
|
||||
<?php if(isset($task->mode) and $task->mode == 'linear'):?>
|
||||
<?php if(!empty($task->mode) and $task->mode == 'linear'):?>
|
||||
<button type="button" <?php echo $sortDisabled ? 'disabled' : '';?> class='btn btn-link btn-sm btn-icon btn-move'><i class='icon-move'></i></button>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
@@ -84,7 +91,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<?php echo html::hidden("teamSource[]", '');?>
|
||||
</td>
|
||||
<td class='hourBox'>
|
||||
<?php if(empty($task->team)):?>
|
||||
<?php if(empty($task->team) or $app->rawMethod == 'create'):?>
|
||||
<div class='input-group estimateBox'>
|
||||
<?php echo html::input("teamEstimate[]", '', "class='form-control text-center' placeholder='{$lang->task->estimateAB}'") ?>
|
||||
<span class='input-group-addon'><?php echo 'h';?></span>
|
||||
@@ -117,7 +124,7 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<?php $newRowCount = (!empty($task->team) and count($task->team) < 6) ? 6 - count($task->team) : 1;?>
|
||||
<?php if(isset($task->status) and $task->status != 'wait' and $task->status != 'doing') $newRowCount = 0;?>
|
||||
<?php js::set('newRowCount', $newRowCount);?>
|
||||
<?php if(isset($task->mode) and $task->mode == 'linear') js::set('sortSelector', 'tr.member-wait');?>
|
||||
<?php if(!empty($task->mode) and $task->mode == 'linear') js::set('sortSelector', 'tr.member-wait');?>
|
||||
<?php js::set('teamMemberError', $lang->task->error->teamMember);?>
|
||||
<?php if(isset($task->status)):?>
|
||||
<?php js::set('taskStatus', $task->status);?>
|
||||
@@ -133,10 +140,14 @@ if($task->mode == 'multi' and $app->rawMethod == 'activate') $hourDisabled = fal
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
<?php if(!empty($task->mode) and $app->rawMethod == 'create'):?>
|
||||
$('#multipleBox').attr('checked', 'checked');
|
||||
showTeamMenu();
|
||||
<?php endif;?>
|
||||
|
||||
$('tr.teamTemplate').closest('tbody.sortable').sortable('destroy');
|
||||
|
||||
<?php if(!isset($task->mode) or $task->mode != 'multi'):?>
|
||||
<?php if(empty($task->mode) or $task->mode != 'multi'):?>
|
||||
var canSort = false;
|
||||
var options = {
|
||||
trigger: '.icon-move',
|
||||
@@ -176,7 +187,7 @@ $(document).ready(function()
|
||||
|
||||
var disableMembers = function()
|
||||
{
|
||||
var mode = $('#mode').length > 0 ? $('#mode').val() : '<?php echo (isset($task->mode) ? $task->mode : '')?>';
|
||||
var mode = $('#mode').length > 0 ? $('#mode').val() : '<?php echo (!empty($task->mode) ? $task->mode : '')?>';
|
||||
if(mode == 'multi')
|
||||
{
|
||||
var members = [];
|
||||
|
||||
@@ -8,6 +8,8 @@ $.get(createLink('transfer', 'ajaxGetTbody','model=<?php echo $model;?>&lastID=0
|
||||
$('.form-date').datetimepicker({minView: 2, format: "yyyy-mm-dd"});
|
||||
$('.form-datetime').datetimepicker('update');
|
||||
$('#showData > tbody').removeClass('load-indicator loading');
|
||||
|
||||
if(typeof(getTbodyLoaded) == 'function') getTbodyLoaded();
|
||||
})
|
||||
|
||||
window.addEventListener('scroll', this.handleScroll);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user