* Finish task #45826.

This commit is contained in:
liumengyi
2021-12-10 10:25:44 +08:00
parent 20783bb906
commit a9fc862059
3 changed files with 18 additions and 5 deletions
+2 -3
View File
@@ -218,12 +218,11 @@ class kanban extends control
$column = $this->kanban->getColumnById($columnID);
if(!$column) die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'kanban', "executionID=$executionID")));
$status = zget($this->config->kanban->{$column->laneType . 'ColumnStatusList'}, $column->type);
$title = isset($column->parentName) ? $column->parentName . '/' . $column->name : $column->name;
$this->view->title = $title . $this->lang->colon . $this->lang->kanban->setWIP . '(' . $this->lang->kanban->WIP . ')';
$this->view->column = $column;
$this->view->status = $status;
if($this->app->tab != 'kanban') $this->view->status = zget($this->config->kanban->{$column->laneType . 'ColumnStatusList'}, $column->type);
$this->display();
}
@@ -272,7 +271,7 @@ class kanban extends control
{
/* Check lane column name is unique. */
$exist = $this->kanban->getColumnByName($this->post->name, $column->lane);
if($exist and $exist->id != $columnID)
if($exist and $exist->id != $columnID and $this->app->tab != 'kanban')
{
return $this->sendError($this->lang->kanban->noColumnUniqueName);
}
+14
View File
@@ -26,3 +26,17 @@ function setWIPLimit()
$('#limit').val(count);
}
/**
* When Wipcount value change.
*
* @param int $value
* @access public
* @return void
*/
function wipValueChange(value)
{
if(value == '')
$('#submit').addClass('disabled');
else
$('#submit').removeClass('disabled');
}
+2 -2
View File
@@ -21,7 +21,7 @@
</div>
<form method='post' class="load-indicator main-form form-ajax" target='hiddenwin' onsubmit='return setWIPLimit();'>
<table align='center' class='table table-form'>
<?php if($column->parent != -1):?>
<?php if($column->parent != -1 and $this->app->tab != 'kanban'):?>
<tr>
<th><?php echo $lang->kanban->WIPStatus;?></th>
<td colspan='2'>
@@ -44,7 +44,7 @@
<td colspan='2'>
<div class="table-col">
<?php $attr = $column->limit == -1 ? 'disabled' : '';?>
<?php echo html::input('WIPCount', $column->limit != -1 ? $column->limit : '', "class='form-control' $attr");?>
<?php echo html::input('WIPCount', $column->limit != -1 ? $column->limit : '', "class='form-control' $attr onchange='wipValueChange(this.value)'");?>
</div>
<div class="table-col w-50px">
<?php echo html::hidden('limit', $column->limit, "class='form-control'");?>