diff --git a/config/config.php b/config/config.php
index f17bc0b372..dba114d322 100644
--- a/config/config.php
+++ b/config/config.php
@@ -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.
diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js
index b7fcb181bb..26d8f3db70 100644
--- a/module/execution/js/kanban.js
+++ b/module/execution/js/kanban.js
@@ -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,
diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js
index d385bc9f2d..0cc572f91f 100644
--- a/module/execution/js/taskkanban.js
+++ b/module/execution/js/taskkanban.js
@@ -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,
diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php
index 7ec479d6a5..ef11cd5ea9 100644
--- a/module/execution/view/kanban.html.php
+++ b/module/execution/view/kanban.html.php
@@ -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');
diff --git a/module/execution/view/setkanban.html.php b/module/execution/view/setkanban.html.php
index 2e3d91fbf4..e3a3c02aa8 100644
--- a/module/execution/view/setkanban.html.php
+++ b/module/execution/view/setkanban.html.php
@@ -23,15 +23,15 @@
| kanban->columnWidth;?> |
-
+
$lang->kanbancolumn->fluidBoardList['0']), "class='inline-block'", $execution->fluidBoard);?>
- colWidth) ? $execution->colWidth : 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
+ colWidth) and $execution->colWidth !== 0 ? $execution->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
-
+
$lang->kanbancolumn->fluidBoardList['1']), "class='inline-block'", $execution->fluidBoard);?>
- minColWidth) ? $execution->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
+ minColWidth) and $execution->minColWidth !== 0 ? $execution->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
~
- maxColWidth) ? $execution->maxColWidth : 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
+ maxColWidth) and $execution->maxColWidth !== 0 ? $execution->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php
index 7ddc2b1e0c..ba22053143 100644
--- a/module/execution/view/taskkanban.html.php
+++ b/module/execution/view/taskkanban.html.php
@@ -229,4 +229,6 @@ js::set('priv',
execution->needLinkProducts);?>
hourUnit);?>
+config->minColWidth);?>
+config->maxColWidth);?>
diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js
index 4fc8e4b81f..6f8d39a5b8 100644
--- a/module/kanban/js/view.js
+++ b/module/kanban/js/view.js
@@ -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,
diff --git a/module/kanban/view/create.html.php b/module/kanban/view/create.html.php
index 30de7f46da..c65a796b0e 100644
--- a/module/kanban/view/create.html.php
+++ b/module/kanban/view/create.html.php
@@ -67,15 +67,15 @@
| kanban->columnWidth;?> |
-
+
$lang->kanbancolumn->fluidBoardList['0']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
- colWidth) ? $copyKanban->colWidth : 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
+ colWidth) and $copyKanban->colWidth !== 0 ? $copyKanban->colWidth : $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
-
+
$lang->kanbancolumn->fluidBoardList['1']), isset($copyKanban->fluidBoard) ? $copyKanban->fluidBoard : 0);?>
- minColWidth) ? $copyKanban->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
+ minColWidth) and $copyKanban->minColWidth !== 0 ? $copyKanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
~
- maxColWidth) ? $copyKanban->maxColWidth : 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
+ maxColWidth) and $copyKanban->maxColWidth !== 0 ? $copyKanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
diff --git a/module/kanban/view/setting.html.php b/module/kanban/view/setting.html.php
index 2c8788f922..831ba0f4d9 100644
--- a/module/kanban/view/setting.html.php
+++ b/module/kanban/view/setting.html.php
@@ -28,15 +28,15 @@
| kanban->columnWidth;?> |
-
+
$lang->kanbancolumn->fluidBoardList['0']), $kanban->fluidBoard);?>
- colWidth) ? $kanban->colWidth: 264, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
+ colWidth) and $kanban->colWidth !== 0 ? $kanban->colWidth: $this->config->colWidth, "class='form-control inline-block setting-input' required placeholder='264' autocomplete='off'");?>px
-
+
$lang->kanbancolumn->fluidBoardList['1']), $kanban->fluidBoard);?>
- minColWidth) ? $kanban->minColWidth : 180, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
+ minColWidth) and $kanban->minColWidth !== 0 ? $kanban->minColWidth: $this->config->minColWidth, "class='form-control inline-block setting-input' required placeholder='180' autocomplete='off'");?>px
~
- maxColWidth) ? $kanban->maxColWidth: 384, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
+ maxColWidth) and $kanban->maxColWidth !== 0 ? $kanban->maxColWidth: $this->config->maxColWidth, "class='form-control inline-block setting-input' required placeholder='384' autocomplete='off'");?>px
|
diff --git a/module/kanban/view/view.html.php b/module/kanban/view/view.html.php
index 280b41e850..ef9ba46c63 100644
--- a/module/kanban/view/view.html.php
+++ b/module/kanban/view/view.html.php
@@ -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;
diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js
index 9442ad83fe..f9b4ea064d 100644
--- a/module/productplan/js/browse.js
+++ b/module/productplan/js/browse.js
@@ -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,
diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php
index 6f8a177c8b..c5cb22da0b 100644
--- a/module/productplan/view/browse.html.php
+++ b/module/productplan/view/browse.html.php
@@ -21,6 +21,8 @@
systemMode);?>
+config->minColWidth);?>
+config->maxColWidth);?>
.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;}