* extract common variable for kanban colWidth
This commit is contained in:
@@ -97,6 +97,11 @@ $config->domainPostfix .= "|international|house|coffee|florist|rich|ceo|camp|edu
|
||||
$config->CSPs = array();
|
||||
$config->CSPs[] = "form-action 'self';connect-src 'self'";
|
||||
|
||||
/* Config for kanban col setting */
|
||||
$config->colWidth = 264;
|
||||
$config->minColWidth = 180;
|
||||
$config->maxColWidth = 384;
|
||||
|
||||
/* 系统框架配置。Framework settings. */
|
||||
$config->framework = new stdclass();
|
||||
$config->framework->autoConnectDB = true; // 是否自动连接数据库。 Whether auto connect database or not.
|
||||
|
||||
@@ -1450,8 +1450,8 @@ function initKanban($kanban)
|
||||
data: groupBy == 'default' ? region.groups : kanbanData[groupBy],
|
||||
maxColHeight: 'auto',
|
||||
calcColHeight: calcColHeight,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : 180,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : 384,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth: defaultMinColWidth,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth: defaultMaxColWidth,
|
||||
cardHeight: getCardHeight(),
|
||||
fluidBoardWidth: fluidBoard,
|
||||
displayCards: typeof window.displayCards === 'number' ? window.displayCards : 2,
|
||||
|
||||
@@ -1232,8 +1232,8 @@ $(function()
|
||||
var commonOptions =
|
||||
{
|
||||
maxColHeight: 'auto',
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : 180,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : 384,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth: defaultMinColWidth,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth: defaultMaxColWidth,
|
||||
cardHeight: getCardHeight(),
|
||||
showCount: true,
|
||||
showZeroCount: true,
|
||||
|
||||
@@ -58,6 +58,8 @@ js::set('executionID', $execution->id);
|
||||
js::set('needLinkProducts', $lang->execution->needLinkProducts);
|
||||
js::set('lastUpdateData', '');
|
||||
js::set('rdSearchValue', '');
|
||||
js::set('defaultMinColWidth', $this->config->minColWidth);
|
||||
js::set('defaultMaxColWidth', $this->config->maxColWidth);
|
||||
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
$canCreateRegion = (common::hasPriv('kanban', 'createRegion') and $groupBy == 'default');
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div style="display: flex;">
|
||||
<div class="radio-col">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', isset($execution->colWidth) ? $execution->colWidth : 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', isset($execution->colWidth) and $execution->colWidth !== 0 ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 10px;">
|
||||
<div class="radio-col mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), "class='inline-block'", $execution->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', isset($execution->minColWidth) ? $execution->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', isset($execution->minColWidth) and $execution->minColWidth !== 0 ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', isset($execution->maxColWidth) ? $execution->maxColWidth : 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', isset($execution->maxColWidth) and $execution->maxColWidth !== 0 ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -229,4 +229,6 @@ js::set('priv',
|
||||
<?php js::set('needLinkProducts', $lang->execution->needLinkProducts);?>
|
||||
<?php js::set('hourUnit', $config->hourUnit);?>
|
||||
<?php js::set('orderBy', $storyOrder);?>
|
||||
<?php js::set('defaultMinColWidth', $this->config->minColWidth);?>
|
||||
<?php js::set('defaultMaxColWidth', $this->config->maxColWidth);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1399,8 +1399,8 @@ function initKanban($kanban)
|
||||
maxColHeight: 510,
|
||||
calcColHeight: calcColHeight,
|
||||
fluidBoardWidth: fluidBoard,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : 180,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : 384,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth: defaultMinColWidth,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth: defaultMaxColWidth,
|
||||
cardHeight: cardHeight,
|
||||
displayCards: typeof window.displayCards === 'number' ? window.displayCards : 2,
|
||||
createColumnText: kanbanLang.createColumn,
|
||||
|
||||
@@ -67,15 +67,15 @@
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div>
|
||||
<div class="radio-col">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
|
||||
<?php echo html::input('colWidth', isset($copyKanban->colWidth) ? $copyKanban->colWidth : 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', isset($copyKanban->colWidth) and $copyKanban->colWidth !== 0 ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div style="margin-top: 10px;">
|
||||
<div class="radio-col mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
|
||||
<?php echo html::input('minColWidth', isset($copyKanban->minColWidth) ? $copyKanban->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', isset($copyKanban->minColWidth) and $copyKanban->minColWidth !== 0 ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', isset($copyKanban->maxColWidth) ? $copyKanban->maxColWidth : 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', isset($copyKanban->maxColWidth) and $copyKanban->maxColWidth !== 0 ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
<tr>
|
||||
<th class='columnWidth'><?php echo $lang->kanban->columnWidth;?></th>
|
||||
<td colspan='2'>
|
||||
<div>
|
||||
<div class="radio-col">
|
||||
<?php echo html::radio('fluidBoard', array(0 => $lang->kanbancolumn->fluidBoardList['0']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('colWidth', isset($kanban->colWidth) ? $kanban->colWidth: 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
<?php echo html::input('colWidth', isset($kanban->colWidth) and $kanban->colWidth !== 0 ? $kanban->colWidth: $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
|
||||
</div>
|
||||
<div style="margin-top: 10px;">
|
||||
<div class="radio-col mt10">
|
||||
<?php echo html::radio('fluidBoard', array(1 => $lang->kanbancolumn->fluidBoardList['1']), $kanban->fluidBoard);?>
|
||||
<?php echo html::input('minColWidth', isset($kanban->minColWidth) ? $kanban->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<?php echo html::input('minColWidth', isset($kanban->minColWidth) and $kanban->minColWidth !== 0 ? $kanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
|
||||
<span class="input-divider">~</span>
|
||||
<?php echo html::input('maxColWidth', isset($kanban->maxColWidth) ? $kanban->maxColWidth: 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
<?php echo html::input('maxColWidth', isset($kanban->maxColWidth) and $kanban->maxColWidth !== 0 ? $kanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -45,6 +45,8 @@ js::set('minColWidth', $kanban->fluidBoard == '0' ? $kanban->colWidth : $kanban-
|
||||
js::set('maxColWidth',$kanban->fluidBoard == '0' ? $kanban->colWidth : $kanban->maxColWidth);
|
||||
js::set('mode', $config->systemMode);
|
||||
js::set('alignment', $kanban->alignment);
|
||||
js::set('defaultMinColWidth', $this->config->minColWidth);
|
||||
js::set('defaultMaxColWidth', $this->config->maxColWidth);
|
||||
js::set('priv', array('canAssignCard' => common::hasPriv('kanban', 'assigncard')));
|
||||
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
|
||||
@@ -57,8 +57,8 @@ $(function()
|
||||
$('#kanban').kanban(
|
||||
{
|
||||
data: kanbanData,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : 180,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : 384,
|
||||
minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth: defaultMinColWidth,
|
||||
maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth: defaultMaxColWidth,
|
||||
maxColHeight: 460,
|
||||
minColHeight: 190,
|
||||
cardHeight: 80,
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<?php js::set('product', $product);?>
|
||||
<?php js::set('systemMode', $config->systemMode);?>
|
||||
<?php js::set('branchStatusList', $branchStatusList);?>
|
||||
<?php js::set('defaultMinColWidth', $this->config->minColWidth);?>
|
||||
<?php js::set('defaultMaxColWidth', $this->config->maxColWidth);?>
|
||||
<?php
|
||||
if($viewType == 'kanban')
|
||||
{
|
||||
|
||||
@@ -122,11 +122,9 @@ body.xxc-embed.m-productplan-view,body.xxc-embed.m-bug-browse,body.xxc-embed.m-p
|
||||
.input-divider {margin: 0 4px;}
|
||||
.setting-input {width: 64px; height: 20px; margin: 0 4px; text-align: center;}
|
||||
.setting-input.disabled,.setting-input[disabled="disabled"] {color: #C4C4C4;}
|
||||
.radio-col {display: flex;}
|
||||
.mt10 {margin-top: 10px;}
|
||||
|
||||
/* #mainMenu > .btn-toolBar .btn-link .label-light,
|
||||
#mainMenu > .btn-toolbar .btn-link .label-light {color: #203362; background: #fff;}
|
||||
#mainMenu > .btn-toolBar .btn-active-text,
|
||||
#mainMenu > .btn-toolbar .btn-active-text {background: #E6EAF1;} */
|
||||
|
||||
#programTableList > tr:hover {background: #E6F0FF; opacity: 0.8;}
|
||||
#programTableList > tr[data-type="project"] > .c-name:hover > a {color: #1E6AEB !important;}
|
||||
|
||||
Reference in New Issue
Block a user