* Change the minimum range of kanban columns.
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ $config->CSPs[] = "form-action 'self';connect-src 'self'";
|
||||
|
||||
/* Config for kanban col setting */
|
||||
$config->colWidth = 264;
|
||||
$config->minColWidth = 180;
|
||||
$config->minColWidth = 200;
|
||||
$config->maxColWidth = 384;
|
||||
|
||||
/* 系统框架配置。Framework settings. */
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
update zt_kanban k
|
||||
set
|
||||
k.colWidth = if(k.colWidth < 200, 200, k.colWidth),
|
||||
k.minColWidth = if(k.minColWidth < 200, 200, k.minColWidth),
|
||||
k.maxColWidth = if(k.maxColWidth <= 200 and k.minColWidth <= 200, 201, k.maxColWidth)
|
||||
where k.colWidth < 200 or k.minColWidth < 200 or k.maxColWidth < 200;
|
||||
|
||||
update zt_project p
|
||||
set
|
||||
p.colWidth = if(p.colWidth < 200, 200, p.colWidth),
|
||||
p.minColWidth = if(p.minColWidth < 200, 200, p.minColWidth),
|
||||
p.maxColWidth = if(p.maxColWidth <= 200 and p.minColWidth <= 200, 201, p.maxColWidth)
|
||||
where p.colWidth < 200 or p.minColWidth < 200 or p.maxColWidth < 200;
|
||||
+2
-2
@@ -836,7 +836,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanban` (
|
||||
`showWIP` enum('0','1') NOT NULL DEFAULT '1',
|
||||
`fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`colWidth` smallint(4) NOT NULL DEFAULT '264',
|
||||
`minColWidth` smallint(4) NOT NULL DEFAULT '180',
|
||||
`minColWidth` smallint(4) NOT NULL DEFAULT '200',
|
||||
`maxColWidth` smallint(4) NOT NULL DEFAULT '384',
|
||||
`object` varchar(255) NOT NULL,
|
||||
`alignment` varchar(10) NOT NULL default 'center',
|
||||
@@ -1197,7 +1197,7 @@ CREATE TABLE IF NOT EXISTS `zt_project` (
|
||||
`displayCards` smallint(6) NOT NULL default '0',
|
||||
`fluidBoard` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`colWidth` smallint(4) NOT NULL DEFAULT '264',
|
||||
`minColWidth` smallint(4) NOT NULL DEFAULT '180',
|
||||
`minColWidth` smallint(4) NOT NULL DEFAULT '200',
|
||||
`maxColWidth` smallint(4) NOT NULL DEFAULT '384',
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
|
||||
@@ -6,3 +6,5 @@
|
||||
#mainContent .radio-inline+.radio-inline {margin-left: 0px; padding-top: 8px;}
|
||||
#mainContent label > .tip {color: #999;}
|
||||
#mainContent #cardBox th {vertical-align: middle;}
|
||||
#colWidth + .fixedTip, #maxColWidth + .autoTip {margin-left: 35px; color: #2667E3; padding-top: 1px;}
|
||||
[lang^=en] #colWidth + .fixedTip, [lang^=en] #maxColWidth + .autoTip, [lang^=de] #colWidth + .fixedTip, [lang^=de] #maxColWidth + .autoTip, [lang^=fr] #colWidth + .fixedTip, [lang^=fr] #maxColWidth + .autoTip {margin-left: 50px;}
|
||||
|
||||
@@ -1148,8 +1148,8 @@ class executionModel extends model
|
||||
$this->dao->update(TABLE_EXECUTION)->data($execution)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->kanban->edit->requiredFields, 'notempty')
|
||||
->checkIF(!$execution->fluidBoard, 'colWidth', 'gt', 0)
|
||||
->batchCheckIF($execution->fluidBoard, 'minColWidth,maxColWidth', 'gt', 0)
|
||||
->checkIF(!$execution->fluidBoard, 'colWidth', 'ge', 200)
|
||||
->batchCheckIF($execution->fluidBoard, 'minColWidth,maxColWidth', 'ge', 200)
|
||||
->checkIF($execution->minColWidth and $execution->maxColWidth and $execution->fluidBoard, 'maxColWidth', 'gt', $execution->minColWidth)
|
||||
->where('id')->eq((int)$executionID)
|
||||
->exec();
|
||||
|
||||
@@ -157,7 +157,7 @@ js::set('priv',
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$width = common::checkNotCN() ? '600px' : '520px';
|
||||
$width = common::checkNotCN() ? '850px' : '700px';
|
||||
echo html::a('javascript:toggleRDSearchBox()', "<i class='icon-search muted'></i> " . $lang->searchAB, '', "class='btn btn-link querybox-toggle'");
|
||||
echo html::a('javascript:fullScreen()', "<i class='icon-fullscreen muted'></i> " . $lang->kanban->fullScreen, '', "class='btn btn-link'");
|
||||
if(common::hasPriv('execution', 'setKanban')) echo html::a(helper::createLink('execution', 'setKanban', "executionID=$execution->id", '', true), '<i class="icon icon-cog-outline"></i> ' . $lang->settings, '', "class='iframe btn btn-link text-left' data-width='$width'");
|
||||
|
||||
@@ -26,12 +26,14 @@
|
||||
<div class="width-radio-row">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', !empty($execution->colWidth) ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
<div class='fixedTip'><?php echo $lang->kanbancolumn->fixedTip;?></div>
|
||||
</div>
|
||||
<div class="width-radio-row mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', !empty($execution->minColWidth) ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', !empty($execution->maxColWidth) ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
<div class='autoTip'><?php echo $lang->kanbancolumn->autoTip;?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$width = common::checkNotCN() ? '600px' : '560px';
|
||||
$width = common::checkNotCN() ? '850px' : '700px';
|
||||
echo "<div class='btn-group menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
|
||||
@@ -9,3 +9,5 @@
|
||||
#mainContent table > tbody th {width: 110px !important;}
|
||||
[lang^=en] .laneHeightBox > label, [lang^=de] .laneHeightBox > label, [lang^=fr] .laneHeightBox > label, [lang^=en] .importBox > label, [lang^=de] .importBox > label, [lang^=fr] .importBox > label {margin-left: 0px;}
|
||||
#dataform tr > th {vertical-align: top;}
|
||||
#colWidth + .fixedTip, #maxColWidth + .autoTip {margin-left: 35px; color: #2667E3; padding-top: 1px;}
|
||||
[lang^=en] #colWidth + .fixedTip, [lang^=en] #maxColWidth + .autoTip, [lang^=de] #colWidth + .fixedTip, [lang^=de] #maxColWidth + .autoTip, [lang^=fr] #colWidth + .fixedTip, [lang^=fr] #maxColWidth + .autoTip {margin-left: 50px;}
|
||||
|
||||
@@ -336,6 +336,8 @@ $lang->kanbancolumn->confirmArchive = 'Are you sure to archive this column?
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
$lang->kanbancolumn->confirmDeleteChild = 'Are you sure to delete this column? After deleting a column, all cards in the column will be moved to the parent column.';
|
||||
$lang->kanbancolumn->confirmRestore = 'Are you sure you want to restore this Kanban column? After restoring the Kanban column, the Kanban column and all tasks in the Kanban column will be restored to the previous position at the same time.';
|
||||
$lang->kanbancolumn->fixedTip = 'Fixed column width must >= 200px.';
|
||||
$lang->kanbancolumn->autoTip = 'Minimum column width must >= 200px.';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
@@ -357,7 +359,7 @@ $lang->kanbanlane->heightTypeList['auto'] = "Adaptive <span class='tip'>(Adapt
|
||||
$lang->kanbanlane->heightTypeList['custom'] = "Custom <span class='tip'>(Customize lane height based on number of cards)</span>";
|
||||
|
||||
$lang->kanbancolumn->fluidBoardList['0'] = "Fixed<i class='radio-text-divider'></i>Width";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Column width range";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Range";
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'No. of cards must be a positive integer from 3 to 32767.';
|
||||
|
||||
@@ -336,6 +336,8 @@ $lang->kanbancolumn->confirmArchive = 'Are you sure to archive this column?
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
$lang->kanbancolumn->confirmDeleteChild = 'Are you sure to delete this column? After deleting a column, all cards in the column will be moved to the parent column.';
|
||||
$lang->kanbancolumn->confirmRestore = 'Are you sure you want to restore this Kanban column? After restoring the Kanban column, the Kanban column and all tasks in the Kanban column will be restored to the previous position at the same time.';
|
||||
$lang->kanbancolumn->fixedTip = 'Fixed column width must >= 200px.';
|
||||
$lang->kanbancolumn->autoTip = 'Minimum column width must >= 200px.';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
@@ -357,7 +359,7 @@ $lang->kanbanlane->heightTypeList['auto'] = "Adaptive <span class='tip'>(Adapt
|
||||
$lang->kanbanlane->heightTypeList['custom'] = "Custom <span class='tip'>(Customize lane height based on number of cards)</span>";
|
||||
|
||||
$lang->kanbancolumn->fluidBoardList['0'] = "Fixed<i class='radio-text-divider'></i>Width";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Column width range";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Range";
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'No. of cards must be a positive integer from 3 to 32767.';
|
||||
|
||||
@@ -336,6 +336,8 @@ $lang->kanbancolumn->confirmArchive = 'Are you sure to archive this column?
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
$lang->kanbancolumn->confirmDeleteChild = 'Are you sure to delete this column? After deleting a column, all cards in the column will be moved to the parent column.';
|
||||
$lang->kanbancolumn->confirmRestore = 'Are you sure you want to restore this Kanban column? After restoring the Kanban column, the Kanban column and all tasks in the Kanban column will be restored to the previous position at the same time.';
|
||||
$lang->kanbancolumn->fixedTip = 'Fixed column width must >= 200px.';
|
||||
$lang->kanbancolumn->autoTip = 'Minimum column width must >= 200px.';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
@@ -357,7 +359,7 @@ $lang->kanbanlane->heightTypeList['auto'] = "Adaptive <span class='tip'>(Adapt
|
||||
$lang->kanbanlane->heightTypeList['custom'] = "Custom <span class='tip'>(Customize lane height based on number of cards)</span>";
|
||||
|
||||
$lang->kanbancolumn->fluidBoardList['0'] = "Fixed<i class='radio-text-divider'></i>Width";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Column width range";
|
||||
$lang->kanbancolumn->fluidBoardList['1'] = "Auto Width<i class='radio-text-divider'></i>Range";
|
||||
|
||||
$lang->kanbanlane->error = new stdclass();
|
||||
$lang->kanbanlane->error->mustBeInt = 'Nb de cartes doit être un entier positif compris entre 3 et 32767.';
|
||||
|
||||
@@ -336,6 +336,8 @@ $lang->kanbancolumn->confirmArchive = '您确认归档该列吗?归档列
|
||||
$lang->kanbancolumn->confirmDelete = '您确认删除该列吗?删除列后不可恢复,列上的卡片也会消失。';
|
||||
$lang->kanbancolumn->confirmDeleteChild = '您确认删除该列吗?删除列后,该列中所有卡片会被移动到兄弟列或父列。';
|
||||
$lang->kanbancolumn->confirmRestore = '您确定要还原该看板列吗?还原后,该看板列将回到之前的位置。';
|
||||
$lang->kanbancolumn->fixedTip = '固定列宽不能小于200px。';
|
||||
$lang->kanbancolumn->autoTip = '最小列宽不能小于200px。';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
|
||||
@@ -2367,8 +2367,8 @@ class kanbanModel extends model
|
||||
$this->dao->update(TABLE_KANBAN)->data($kanban)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->kanban->edit->requiredFields, 'notempty')
|
||||
->checkIF(!$kanban->fluidBoard, 'colWidth', 'gt', 0)
|
||||
->batchCheckIF($kanban->fluidBoard, 'minColWidth,maxColWidth', 'gt', 0)
|
||||
->checkIF(!$kanban->fluidBoard, 'colWidth', 'ge', 200)
|
||||
->batchCheckIF($kanban->fluidBoard, 'minColWidth,maxColWidth', 'ge', 200)
|
||||
->checkIF($kanban->minColWidth and $kanban->maxColWidth and $kanban->fluidBoard, 'maxColWidth', 'gt', $kanban->minColWidth)
|
||||
->where('id')->eq($kanbanID)
|
||||
->exec();
|
||||
@@ -3255,7 +3255,11 @@ class kanbanModel extends model
|
||||
$actions .= "</ul>";
|
||||
}
|
||||
|
||||
if(common::hasPriv('kanban', 'setting')) $actions .= html::a(helper::createLink('kanban', 'setting', "kanbanID=$kanban->id", '', true), '<i class="icon icon-cog-outline"></i> ' . $this->lang->kanban->setting, '', "class='iframe btn btn-link' data-width='60%'");
|
||||
if(common::hasPriv('kanban', 'setting'))
|
||||
{
|
||||
$width = common::checkNotCN() ? '65%' : '60%';
|
||||
$actions .= html::a(helper::createLink('kanban', 'setting', "kanbanID=$kanban->id", '', true), '<i class="icon icon-cog-outline"></i> ' . $this->lang->kanban->setting, '', "class='iframe btn btn-link' data-width='$width'");
|
||||
}
|
||||
|
||||
$actions .= "</div>";
|
||||
|
||||
|
||||
@@ -31,12 +31,14 @@
|
||||
<div class="width-radio-row">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', !empty($kanban->colWidth) ? $kanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->colWidth}' autocomplete='off'");?>px
|
||||
<div class='fixedTip'><?php echo $lang->kanbancolumn->fixedTip;?></div>
|
||||
</div>
|
||||
<div class="width-radio-row mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', !empty($kanban->minColWidth) ? $kanban->minColWidth : $this->config->minColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->minColWidth}' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', !empty($kanban->maxColWidth) ? $kanban->maxColWidth : $this->config->maxColWidth, "class='form-control inline-block setting-input' placeholder='{$this->config->maxColWidth}' autocomplete='off'");?>px
|
||||
<div class='autoTip'><?php echo $lang->kanbancolumn->autoTip;?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1348,6 +1348,8 @@ function handleKanbanWidthAttr ()
|
||||
$('#colWidth, #minColWidth, #maxColWidth').attr('maxlength', '3');
|
||||
var fluidBoard = $("#mainContent input[name='fluidBoard'][checked='checked']").val() || 0;
|
||||
var addAttrEle = fluidBoard == 0 ? '#colWidth' : '#minColWidth, #maxColWidth';
|
||||
var $fixedTip = $('#colWidth + .fixedTip');
|
||||
var $autoTip = $('#maxColWidth + .autoTip');
|
||||
$(addAttrEle).closest('.width-radio-row').addClass('required');
|
||||
$('#colWidth').attr('disabled',fluidBoard == 1);
|
||||
$('#minColWidth, #maxColWidth').attr('disabled',fluidBoard == 0);
|
||||
@@ -1356,6 +1358,18 @@ function handleKanbanWidthAttr ()
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
});
|
||||
|
||||
if(fluidBoard == 1)
|
||||
{
|
||||
$fixedTip.addClass('hidden');
|
||||
$autoTip.removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$fixedTip.removeClass('hidden');
|
||||
$autoTip.addClass('hidden');
|
||||
}
|
||||
|
||||
$(document).on('change', "#mainContent input[name='fluidBoard']", function(e)
|
||||
{
|
||||
$('#colWidth').attr('disabled', e.target.value == 1);
|
||||
@@ -1366,6 +1380,8 @@ function handleKanbanWidthAttr ()
|
||||
$('#minColWidth, #maxColWidth').closest('.width-radio-row').removeClass('required');
|
||||
$('#minColWidthLabel, #maxColWidthLabel').remove();
|
||||
$('#minColWidth, #maxColWidth').removeClass('has-error');
|
||||
$fixedTip.removeClass('hidden');
|
||||
$autoTip.addClass('hidden');
|
||||
}
|
||||
else if(e.target.value == 1 && $('#colWidthLabel'))
|
||||
{
|
||||
@@ -1373,6 +1389,8 @@ function handleKanbanWidthAttr ()
|
||||
$('#colWidth').closest('.width-radio-row').removeClass('required');
|
||||
$('#colWidthLabel').remove();
|
||||
$('#colWidth').removeClass('has-error');
|
||||
$fixedTip.addClass('hidden');
|
||||
$autoTip.removeClass('hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user