diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 07d1e30920..fd4a92d797 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -22,6 +22,7 @@ $(function() var link = createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields'); $.post(link, {'fields' : fields}, function() { + showFields = fields; showCheckedFields(fields); $('#formSetting').parent().removeClass('open'); @@ -55,8 +56,6 @@ $(function() */ function showCheckedFields(fields) { - showFields = fields; - var fieldList = ',' + fields + ','; $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() { @@ -77,22 +76,6 @@ function showCheckedFields(fields) }); } -/** - * Hidden require field. - * - * @access public - * @return void - */ -function hiddenRequireFields() -{ - $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() - { - var field = ',' + $(this).val() + ','; - var required = ',' + requiredFields + ','; - if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden'); - }); -} - /** * Set opened builds. * diff --git a/module/bug/js/batchedit.js b/module/bug/js/batchedit.js index 26a3876963..42770c7cfc 100644 --- a/module/bug/js/batchedit.js +++ b/module/bug/js/batchedit.js @@ -72,4 +72,9 @@ $(document).on('change', 'select', function() $(function() { $('#subNavbar li[data-id="bug"]').addClass('active'); + + $('#customField').click(function() + { + hiddenRequireFields(); + }); }); diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 166e71d0d1..e100d8755c 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -887,20 +887,18 @@ function setBranchRelated(branchID, productID, num) } } -$(document).ready(function() +/** + * Hidden require field. + * + * @access public + * @return void + */ +function hiddenRequireFields() { - $('#customField').click(function() + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() - { - var field = ',' + $(this).val() + ','; - var required = ',' + requiredFields + ','; - if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); - }); + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden'); }); - - $('#formSettingForm .btn-primary').click(function() - { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); - }); -}); +} diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index 8562d126e3..625c95320d 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -13,6 +13,8 @@ lang->bug->dittoNotice);?> + +bug->edit->requiredFields);?>

bug->common . $lang->colon . $lang->bug->batchEdit;?>

diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index db37565d41..aafefbfd9c 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -28,6 +28,7 @@ js::set('blockID', $blockID); js::set('moduleID', $moduleID); js::set('tab', $this->app->tab); js::set('requiredFields', $config->bug->create->requiredFields); +js::set('showFields', $showFields); if($this->app->tab == 'execution') js::set('objectID', $executionID); if($this->app->tab == 'project') js::set('objectID', $projectID); ?> diff --git a/module/common/view/customfield.html.php b/module/common/view/customfield.html.php index 2ccfe0b5d9..d7d158141a 100644 --- a/module/common/view/customfield.html.php +++ b/module/common/view/customfield.html.php @@ -37,7 +37,7 @@ var $formSetting = $('#formSetting'); $formSetting.on('click', '.close-dropdown', function() { - if(showFields != undefined) + if(typeof showFields != 'undefined') { var fieldList = ',' + showFields + ','; $('#formSettingForm > .checkboxes > .checkbox-primary > input:visible').each(function() diff --git a/module/execution/control.php b/module/execution/control.php index 1cc1c84b54..e81ff05f8b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1324,12 +1324,16 @@ class execution extends control list($begin, $end) = $this->execution->getBeginEnd4CFD($execution); $dateList = date::getDateList($begin, $end, 'Y-m-d', ''); + list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type); + $this->view->title = $this->lang->execution->CFD; $this->view->type = $type; $this->view->execution = $execution; $this->view->executionName = $execution->name; $this->view->executionID = $executionID; $this->view->chartData = $this->execution->buildCFDData($executionID, $dateList, $type); + $this->view->cycleTimeAvg = $cycleTimeAvg; + $this->view->throughput = $throughput; $this->display(); } diff --git a/module/execution/css/cfd.css b/module/execution/css/cfd.css index fd514e009f..a4b56cf4df 100644 --- a/module/execution/css/cfd.css +++ b/module/execution/css/cfd.css @@ -1,6 +1,21 @@ .main-content > h2 {font-size: 16px;} -#cfdWrapper {max-width: 1400px; margin: 0 auto; padding: 25px 100px 10px; position: relative;} -#cfdYUnit {position: absolute; color: #CBD0DB; top: 27px; left: 130px;} -#cfdXUnit {position: absolute; color: #CBD0DB; bottom: 35px; right: 60px;} .pull-left .input-control {margin-right: 10px;} + +@media screen and (max-width: 1920px) +{ +#cfdWrapper {max-width: 1400px; margin: 0 auto; padding: 25px 0px 10px; position: relative} +#cfdChart {width:1400px !important; height:600px !important} +#cfdYUnit {position: absolute; color: #CBD0DB; top: 40px; left: 30px} +#cfdXUnit {position: absolute; color: #CBD0DB; bottom: 20px; right: 0px} +} +@media screen and (max-width: 1366px) +{ +#cfdChart {width:1150px !important; height:400px !important}; +} + +#mainContent {min-width: 1400px;} +#burnStatistics {position: absolute; left: 1200px; width: 180px; height: 200px; top: 20%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px; border: 1px solid #dcdcdc; background-color: #F8F8F8; padding: 15px 20px; color: #3c4353; border-radius: 8px;} +#burnStatistics .bg-primary {margin-right: 5px;} +#burnStatistics .icon-help {color: black;} +#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;} \ No newline at end of file diff --git a/module/execution/css/cfd.zh-cn.css b/module/execution/css/cfd.zh-cn.css new file mode 100644 index 0000000000..10fd34d04a --- /dev/null +++ b/module/execution/css/cfd.zh-cn.css @@ -0,0 +1 @@ +#burnStatistics {width : 160px;} diff --git a/module/execution/js/cfd.js b/module/execution/js/cfd.js index e69de29bb2..58c7daec4d 100644 --- a/module/execution/js/cfd.js +++ b/module/execution/js/cfd.js @@ -0,0 +1,95 @@ +$(function() +{ + $('[data-toggle=tooltip]').tooltip(); + + if(chartData) + { + var i = 0; + var series = []; + var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF']; + //var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF']; + + $.each(chartData['line'], function(label, set) + { + series.push({ + name: label, + type: 'line', + stack: 'Total', + color: colors[i], + areaStyle: { + color: colors[i], + opacity: 0.2 + }, + emphasis: { + focus: 'series' + }, + data: eval(set) + }) + i ++; + }) + + var chartDom = document.getElementById('cfdChart'); + var CFD = echarts.init(chartDom); + var option; + + option = { + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross', + label: { + backgroundColor: '#6a7985' + } + } + }, + legend: { + data: Object.keys(chartData['line']) + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + boundaryGap: false, + data: chartData['labels'], + axisLine: + { + show: true, + lineStyle: + { + color: '#999', + width:1 + } + } + }], + yAxis: [ + { + type: 'value', + minInterval: 1, + axisLine: + { + show: true, + lineStyle: + { + color: ['#999'], + width: 1 + } + } + } + ], + series: series, + }; + + option && CFD.setOption(option); + window.addEventListener('resize', CFD.resize); + } + + $('#type').change(function() + { + location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + $(this).val()); + }); +}); diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 41d14ce627..7ebbf823ef 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』should be >= actual beg $lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = 'Referenz'; $lang->execution->charts->burn->graph->actuality = 'Aktualität'; $lang->execution->charts->burn->graph->delay = 'Delay'; +$lang->execution->charts->cfd = new stdclass(); +$lang->execution->charts->cfd->cycleTime = 'Average cycle time'; +$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion'; +$lang->execution->charts->cfd->throughput = 'Throughput Rate'; +$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time'; + $lang->execution->placeholder = new stdclass(); $lang->execution->placeholder->code = 'Abkurzung des Projektnamens'; $lang->execution->placeholder->totalLeft = 'Schätzungen zu Beginn des Projekts.'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 9595d15d66..3d8b3f8888 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』should be >= actual beg $lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = 'Ideal'; $lang->execution->charts->burn->graph->actuality = 'Actual'; $lang->execution->charts->burn->graph->delay = 'Delay'; +$lang->execution->charts->cfd = new stdclass(); +$lang->execution->charts->cfd->cycleTime = 'Average cycle time'; +$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion'; +$lang->execution->charts->cfd->throughput = 'Throughput Rate'; +$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time'; + $lang->execution->placeholder = new stdclass(); $lang->execution->placeholder->code = "Abbreviation of {$lang->executionCommon} name"; $lang->execution->placeholder->totalLeft = "Hours estimated on the first day of the {$lang->executionCommon}."; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 984b261d54..ca0ae9c74a 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -415,6 +415,7 @@ $lang->execution->ge = "『%s』should be >= actual beg $lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -432,6 +433,12 @@ $lang->execution->charts->burn->graph->reference = 'Idéal'; $lang->execution->charts->burn->graph->actuality = 'Actuel'; $lang->execution->charts->burn->graph->delay = 'Delay'; +$lang->execution->charts->cfd = new stdclass(); +$lang->execution->charts->cfd->cycleTime = 'Average cycle time'; +$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion'; +$lang->execution->charts->cfd->throughput = 'Throughput Rate'; +$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time'; + $lang->execution->placeholder = new stdclass(); $lang->execution->placeholder->code = "Abréviation du nom du {$lang->executionCommon}"; $lang->execution->placeholder->totalLeft = "Heures estimées le premier jour du {$lang->executionCommon}."; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 4438833e1e..1586eb9f0b 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』应当不小于实际 $lang->execution->storyDragError = "该{$lang->SRCommon}还是草稿或已变更状态,请评审通过后再拖动"; $lang->execution->countTip = '(%s人)'; $lang->execution->pleaseInput = "请输入"; +$lang->execution->week = '周'; /* 统计。*/ $lang->execution->charts = new stdclass(); @@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = '参考'; $lang->execution->charts->burn->graph->actuality = '实际'; $lang->execution->charts->burn->graph->delay = '延期'; +$lang->execution->charts->cfd = new stdclass(); +$lang->execution->charts->cfd->cycleTime = '平均周期时间'; +$lang->execution->charts->cfd->cycleTimeTip = '平均每个卡片从开发启动到完成的周期时间'; +$lang->execution->charts->cfd->throughput = '吞吐率'; +$lang->execution->charts->cfd->throughputTip = '吞吐率 = 在制品 / 平均周期时间'; + $lang->execution->placeholder = new stdclass(); $lang->execution->placeholder->code = '团队内部的简称'; $lang->execution->placeholder->totalLeft = "{$lang->executionCommon}开始时的总预计工时"; diff --git a/module/execution/model.php b/module/execution/model.php index 5a82330dfb..b4e6f3e89f 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3094,8 +3094,8 @@ class executionModel extends model /** * Get begin and end for CFD. - * - * @param object $execution + * + * @param object $execution * @access public * @return void */ @@ -3110,12 +3110,12 @@ class executionModel extends model } elseif((helper::today() >= $execution->begin) and (helper::today() <= $execution->end)) { - $begin = (date('Y-m-d', strtotime('-14 days')) < $execution->begin) ? $execution->begin : date('Y-m-d', strtotime('-14 days')); + $begin = (date('Y-m-d', strtotime('-13 days')) < $execution->begin) ? $execution->begin : date('Y-m-d', strtotime('-13 days')); $end = helper::today(); } elseif((helper::today() > $execution->end)) { - $begin = date($execution->end, strtotime('-14 days')) > $execution->begin ? date($execution->end, strtotime('-14 days')) : $execution->begin; + $begin = date($execution->end, strtotime('-13 days')) > $execution->begin ? date($execution->end, strtotime('-13 days')) : $execution->begin; $end = $execution->end; } @@ -3236,7 +3236,7 @@ class executionModel extends model /** * Build CFD data. - * + * * @param int $executionID * @param string $type * @param array $dateList @@ -3294,6 +3294,44 @@ class executionModel extends model return $data; } + /** + * Get CFD statistics. + * + * @param int $executionID + * @param array $dateList + * @param string $type + * @access public + * @return void + */ + public function getCFDStatistics($executionID, $dateList, $type) + { + $kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $type); + $kanbanData = array_shift($kanbanData); + + $cycleTime = array(); + foreach($kanbanData->groups as $group) + { + foreach($group->lanes as $lane) + { + if(!isset($lane->items['closed'])) continue; + + foreach($lane->items['closed'] as $item) + { + $diffTime = $type == 'story' ? strtotime($item['lastEditedDate']) - strtotime($item['openedDate']) : strtotime($item['closedDate']) - strtotime($item['openedDate']); + $day = floor($diffTime / (3600 * 24)); + if($day > 0) $cycleTime[$item['id']] = $day; + } + } + } + + $itemCount = count($cycleTime); + if(!$itemCount) return array('', ''); + $cycleTimeAvg = round(array_sum($cycleTime) / $itemCount); + $throughput = round(($itemCount * 7) / $cycleTimeAvg, 1) . "{$this->lang->execution->kanbanCardsUnit}/" . $this->lang->execution->week; + + return array($cycleTimeAvg, $throughput); + } + /** * Get taskes by search. * diff --git a/module/execution/view/cfd.html.php b/module/execution/view/cfd.html.php index ee86dc4d81..57c8e38580 100644 --- a/module/execution/view/cfd.html.php +++ b/module/execution/view/cfd.html.php @@ -14,6 +14,7 @@ +
- - - - - diff --git a/module/index/js/index.js b/module/index/js/index.js index 3963a1a809..d8dfe59d94 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -461,6 +461,7 @@ if(!notTriggerEvent) app.$app.trigger('reloadapp', app); + if(url) $(iframe.contentWindow.document.body).hide(); // Code for task #59703. app.$app.addClass('loading'); if(app._loadTimer) clearTimeout(app._loadTimer); app._loadTimer = setTimeout(function() diff --git a/module/kanban/model.php b/module/kanban/model.php index 248dce117b..c246cd74a1 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1302,16 +1302,19 @@ class kanbanModel extends model if(empty($object)) continue; - $cardData['id'] = $object->id; - $cardData['order'] = $cardOrder++; - $cardData['pri'] = $object->pri ? $object->pri : ''; - $cardData['estimate'] = $cell->type == 'bug' ? '' : $object->estimate; - $cardData['assignedTo'] = $object->assignedTo; - $cardData['deadline'] = $cell->type == 'story' ? '' : $object->deadline; - $cardData['severity'] = $cell->type == 'bug' ? $object->severity : ''; - $cardData['acl'] = 'open'; - $cardData['lane'] = $laneID; - $cardData['column'] = $cell->column; + $cardData['id'] = $object->id; + $cardData['order'] = $cardOrder++; + $cardData['pri'] = $object->pri ? $object->pri : ''; + $cardData['estimate'] = $cell->type == 'bug' ? '' : $object->estimate; + $cardData['assignedTo'] = $object->assignedTo; + $cardData['deadline'] = $cell->type == 'story' ? '' : $object->deadline; + $cardData['severity'] = $cell->type == 'bug' ? $object->severity : ''; + $cardData['acl'] = 'open'; + $cardData['lane'] = $laneID; + $cardData['column'] = $cell->column; + $cardData['openedDate'] = $object->openedDate; + $cardData['closedDate'] = $object->closedDate; + $cardData['lastEditedDate'] = $object->lastEditedDate; if($cell->type == 'task') { diff --git a/module/search/control.php b/module/search/control.php index 22e5935e0e..ab95db6333 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -60,7 +60,7 @@ class search extends control $this->view->searchFields = $fields; $this->view->actionURL = $actionURL; $this->view->fieldParams = $this->search->setDefaultParams($fields, $params); - $this->view->queries = $this->search->getQueryPairs($module); + $this->view->queries = $this->search->getQueryList($module); $this->view->queryID = $queryID; $this->view->style = empty($style) ? 'full' : $style; $this->view->onMenuBar = empty($onMenuBar) ? 'no' : $onMenuBar; @@ -148,13 +148,13 @@ class search extends control { $query = $queryID ? $queryID : ''; $module = empty($module) ? $this->session->searchParams['module'] : $module; - $queries = $this->search->getQueryPairs($module); - + $queries = $this->search->getQueryList($module); $html = ''; - foreach($queries as $queryID => $queryName) + foreach($queries as $query) { - if(empty($queryID)) continue; - $html .= '
  • ' . html::a("javascript:executeQuery({$queryID})", $queryName . (common::hasPriv('search', 'deleteQuery') ? '' : ''), '', "class='label user-query' data-query-id='$queryID'") . '
  • '; + if(empty($query->id)) continue; + + $html .= '
  • ' . html::a("javascript:executeQuery({$query->id})", $query->title . ((common::hasPriv('search', 'deleteQuery') and $this->app->user->account == $query->account) ? '' : ''), '', "class='label user-query' data-query-id='$query->id' title='{$query->title}'") . '
  • '; } echo $html; } diff --git a/module/search/model.php b/module/search/model.php index eb39f7832f..7896fc839b 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -439,6 +439,30 @@ class searchModel extends model return $queries; } + /** + * Get query list. + * + * @param string $module + * @access public + * @return array + */ + public function getQueryList($module) + { + $queries = $this->dao->select('id, account, title') + ->from(TABLE_USERQUERY) + ->where() + ->markLeft(1) + ->where('account')->eq($this->app->user->account) + ->orWhere('common')->eq(1) + ->markRight(1) + ->andWhere('module')->eq($module) + ->orderBy('id_desc') + ->fetchAll(); + if(!$queries) return array('' => $this->lang->search->myQuery); + $queries = array('' => $this->lang->search->myQuery) + $queries; + return $queries; + } + /** * Get records by the condition. * diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index f8b92d3422..4010442081 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -227,10 +227,9 @@ foreach($fieldParams as $fieldName => $param)

    search->savedQuery;?>

    diff --git a/module/story/model.php b/module/story/model.php index e514fcb1da..175726a30b 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3927,7 +3927,7 @@ class storyModel extends model if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected']; } } - $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', 'showinonlybody', '', '', $title); + $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}&plan={$story->plan}&type={$story->type}", $story, $type, 'split', '', 'showinonlybody', '', '', $title); } if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody'); @@ -4089,7 +4089,11 @@ class storyModel extends model foreach($stories as $story) { - if(!isset($group[$story->id])) continue; + if(!isset($group[$story->id])) + { + unset($stories[$story->id]); + continue; + } $story->children = $this->getByList($group[$story->id]); } } @@ -4373,7 +4377,7 @@ class storyModel extends model { $showBranch = isset($this->config->product->browse->showBranch) ? $this->config->product->browse->showBranch : 1; } - if($storyType == 'requirement') echo 'SR '; + if($storyType == 'requirement') echo '' .$this->lang->story->childrenAB. ' '; if($story->parent > 0 and isset($story->parentName)) $story->title = "{$story->parentName} / {$story->title}"; if(isset($branches[$story->branch]) and $showBranch and $this->config->vision == 'rnd') echo "branch]}>{$branches[$story->branch]} "; if($story->module and isset($modulePairs[$story->module])) echo "{$modulePairs[$story->module]} "; diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index b5fa1c0978..e5503a3714 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -23,6 +23,7 @@ $(function() var link = createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields'); $.post(link, {'fields' : fields}, function() { + showFields = fields; showCheckedFields(fields); $('#formSetting').parent().removeClass('open'); diff --git a/module/task/js/batchedit.js b/module/task/js/batchedit.js index 32dd170945..73af9a1c12 100644 --- a/module/task/js/batchedit.js +++ b/module/task/js/batchedit.js @@ -49,4 +49,9 @@ $(document).on('change', 'select', function() $(function() { $('#subNavbar li[data-id="task"]').addClass('active'); + + $('#customField').click(function() + { + hiddenRequireFields(); + }); }); diff --git a/module/task/js/common.js b/module/task/js/common.js index 0d683835b2..fe129b6afe 100644 --- a/module/task/js/common.js +++ b/module/task/js/common.js @@ -29,8 +29,6 @@ function setStoryModule() */ function showCheckedFields(fields) { - showFields = fields; - var fieldList = ',' + fields + ','; $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() { diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index 67e01fe081..611ddbb728 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -15,6 +15,8 @@ lang->task->dittoNotice, $lang->executionCommon); js::set('dittoNotice', $dittoNotice); +js::set('showFields', $showFields); +js::set('requiredFields', $config->task->edit->requiredFields); ?>
    diff --git a/module/testcase/css/batchcreate.css b/module/testcase/css/batchcreate.css index 2704eb6794..993b9e8647 100644 --- a/module/testcase/css/batchcreate.css +++ b/module/testcase/css/batchcreate.css @@ -9,8 +9,10 @@ #batchCreateForm .input-group .colorpicker.open {z-index: 5;} .c-id {width: 50px;} -.c-pri, .c-keywords, .c-review {width: 100px;} +.c-pri, .c-keywords {width: 100px;} .c-branch, .c-type {width: 120px;} .c-stage {width: 140px;} .c-precondition {width: 150px;} .c-story {width: 180px;} +.c-review{width: 105px;} +.c-actions {width: 60px;} diff --git a/module/testcase/css/create.css b/module/testcase/css/create.css index c11942bc27..2ad82ff52e 100644 --- a/module/testcase/css/create.css +++ b/module/testcase/css/create.css @@ -40,5 +40,6 @@ .title-group.required > .required:after {display: block; right: 29px; top: 5px;} .pri-selector > .btn {padding: 5px 8px !important; width: 100%;} .pri-selector > .dropdown-menu {padding: 10px;} +.stageBox {padding-left: 15px !important;} -#refresh {margin-left: 7px;} +#refresh {margin-left: 7px;} \ No newline at end of file diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js index 8a788bd65a..055bf93804 100644 --- a/module/testcase/js/batchcreate.js +++ b/module/testcase/js/batchcreate.js @@ -29,16 +29,73 @@ $(document).ready(function() $('#customField').click(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() - { - var field = ',' + $(this).val() + ','; - var required = ',' + requiredFields + ','; - if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); - }); + hiddenRequireFields(); }); + /* Implement a custom form without feeling refresh. */ $('#formSettingForm .btn-primary').click(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=batchCreateFields'); + $.post(link, {'fields' : fields}, function() + { + showCheckedFields(fields); + $('#formSetting').parent().removeClass('open'); + + var fieldCount = $('#batchCreateForm .table thead>tr>th:visible').length; + $('.form-actions').attr('colspan', fieldCount); + + if(fieldCount > 8) + { + $('#batchCreateForm > .table-responsive').removeClass('scroll-none'); + $('#batchCreateForm > .table-responsive').css('overflow', 'auto'); + } + else + { + $('#batchCreateForm > .table-responsive').addClass('scroll-none'); + $('#batchCreateForm > .table-responsive').css('overflow', 'visible'); + } + + if($('#batchCreateForm table thead tr th.c-title').width() < 170) $('#batchCreateForm table thead tr th.c-title').width('170'); + }); + + return false; }); }); + +/** + * Add item. + * + * @param object $obj + * @access public + * @return void + */ +function addItem(obj) +{ + var item = $('#addItem').html().replace(/%i%/g, itemIndex + 1); + $('' + item + '').insertAfter($(obj).closest('tr')); + + $(obj).closest('tr').next().find('div[id$=_chosen]').remove(); + $(obj).closest('tr').next().find('.picker').remove(); + $(obj).closest('tr').next().find('.chosen').chosen(); + $(obj).closest('tr').next().find('.picker-select').picker(); + + itemIndex ++; +} + +/** + * Delete item. + * + * @param object $obj + * @access public + * @return void + */ +function deleteItem(obj) +{ + $(obj).closest('tr').remove(); +} diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js index 280f5d2e45..e82c364e91 100644 --- a/module/testcase/js/batchedit.js +++ b/module/testcase/js/batchedit.js @@ -116,17 +116,7 @@ $(function() $('#customField').click(function() { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() - { - var field = ',' + $(this).val() + ','; - var required = ',' + requiredFields + ','; - if(required.indexOf(field) >= 0) $(this).attr('disabled', 'disabled'); - }); - }); - - $('#formSettingForm .btn-primary').click(function() - { - $('#formSettingForm > .checkboxes > .checkbox-primary > input').removeAttr('disabled'); + hiddenRequireFields(); }); }); diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index e15400f349..cd380b77b7 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -370,7 +370,7 @@ function loadStories(productID, moduleID, num) if(!stories) stories = ''; if(config.currentMethod == 'batchcreate') { - for(var i = num; i < 10 ; i ++) + for(var i = num; i <= itemIndex ; i ++) { if(i != num && $('#module' + i).val() != 'ditto') break; var nowStories = stories.replaceAll('story' + num, 'story' + i); @@ -426,3 +426,50 @@ function setModules(branchID, productID, num) $('#plan' + (num + 1)).trigger("chosen:updated"); } } + +/** + * Show checked fields. + * + * @param string fields + * @access public + * @return void + */ +function showCheckedFields(fields) +{ + showFields = fields; + + var fieldList = ',' + fields + ','; + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var $field = config.currentMethod == 'create' ? $('#' + $(this).val()) : $('[name^=' + $(this).val() + ']'); + var required = ',' + requiredFields + ','; + var $fieldBox = $('.' + $(this).val() + 'Box' ); + if(fieldList.indexOf(field) >= 0 || required.indexOf(field) >= 0) + { + $fieldBox.removeClass('hidden'); + $field.removeAttr('disabled'); + } + else if(!$fieldBox.hasClass('hidden')) + { + $fieldBox.addClass('hidden'); + $field.attr('disabled', true); + } + }); +} + +/** + * Hidden require field. + * + * @access public + * @return void + */ +function hiddenRequireFields() +{ + $('#formSettingForm > .checkboxes > .checkbox-primary > input').each(function() + { + var field = ',' + $(this).val() + ','; + var required = ',' + requiredFields + ','; + if(required.indexOf(field) >= 0) $(this).closest('div').addClass('hidden'); + }); +} diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index 5a525a8ba6..9acacae0da 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -156,4 +156,28 @@ $(function() }); $('#subNavbar li[data-id="testcase"]').addClass('active'); + + $('#customField').click(function() + { + hiddenRequireFields(); + }); + + /* Implement a custom form without feeling refresh. */ + $('#formSettingForm .btn-primary').click(function() + { + var fields = ''; + $('#formSettingForm > .checkboxes > .checkbox-primary > input:checked').each(function() + { + fields += ',' + $(this).val(); + }); + + var link = createLink('custom', 'ajaxSaveCustomFields', 'module=testcase§ion=custom&key=createFields'); + $.post(link, {'fields' : fields}, function() + { + showCheckedFields(fields); + $('#formSetting').parent().removeClass('open'); + }); + + return false; + }); }); diff --git a/module/testcase/view/batchcreate.html.php b/module/testcase/view/batchcreate.html.php index 0584fdb584..1362b59908 100644 --- a/module/testcase/view/batchcreate.html.php +++ b/module/testcase/view/batchcreate.html.php @@ -15,6 +15,7 @@ testcase->create->requiredFields)?> +

    @@ -54,16 +55,16 @@ idAB;?> - '>product->branch;?> - '>testcase->module;?> - '> testcase->story;?> + branchBox'>product->branch;?> + moduleBox'>testcase->module;?> + storyBox'> testcase->story;?> testcase->title;?> testcase->type;?> - '>testcase->pri;?> - '>testcase->precondition;?> - '>testcase->keywords;?> - '>testcase->stage;?> - '>testcase->review;?> + priBox'>testcase->pri;?> + preconditionBox'>testcase->precondition;?> + keywordsBox'>testcase->keywords;?> + stageBox'>testcase->stage;?> + reviewBox'>testcase->review;?> testcase->getFlowExtendFields(); foreach($extendFields as $extendField) @@ -72,23 +73,24 @@ echo "{$extendField->name}"; } ?> + actions;?> testcase->typeList['']);?> - testcase->batchCreate; $i++):?> + testcase->batchCreate; $i++):?> testcase->typeList['ditto'] = $lang->testcase->ditto; - if($i != 0) $lang->testcase->priList['ditto'] = $lang->testcase->ditto; - $type = $i == 0 ? 'feature' : 'ditto'; - $pri = $i == 0 ? 3 : 'ditto'; + if($i != 1) $currentModuleID = 'ditto'; + if($i != 1) $lang->testcase->typeList['ditto'] = $lang->testcase->ditto; + if($i != 1) $lang->testcase->priList['ditto'] = $lang->testcase->ditto; + $type = $i == 1 ? 'feature' : 'ditto'; + $pri = $i == 1 ? 3 : 'ditto'; ?> - - '> - ' style='overflow:visible'> - ' style='overflow:visible'> id : '', 'class="form-control chosen"');?> + + branchBox'> + moduleBox' style='overflow:visible'> + storyBox' style='overflow:visible'> id : '', 'class="form-control chosen"');?>
    @@ -102,15 +104,21 @@
    testcase->typeList, $type, "class='form-control chosen'");?> - '> testcase->priList, $pri, "class='form-control chosen'");?> - '> - '> - ' style='overflow:visible'>testcase->stageList, '', "class='form-control chosen' multiple");?> - '>testcase->reviewList, $needReview, "class='form-control'");?> + priBox'>testcase->priList, $pri, "class='form-control chosen'");?> + preconditionBox'> + keywordsBox'> + stageBox' style='overflow:visible'>testcase->stageList, '', "class='form-control chosen' multiple");?> + reviewBox'>testcase->reviewList, $needReview, "class='form-control chosen'");?> loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; ?> + + + + + + @@ -126,13 +134,14 @@

    + - - - + + + - - - - - + + + + + loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . ""; ?> +
    %s'>' style='overflow:visible'>' style='overflow:visible'> branchBox'> moduleBox' style='overflow:visible'> storyBox' style='overflow:visible'>
    @@ -146,17 +155,60 @@
    testcase->typeList, $type, "class='form-control chosen'");?>'> testcase->priList, $pri, "class='form-control chosen'");?>'>'> ' style='overflow:visible'>testcase->stageList, '', "class='form-control chosen' multiple");?>'>testcase->reviewList, $needReview, "class='form-control chosen'");?> priBox'>testcase->priList, $pri, "class='form-control chosen'");?> preconditionBox'> keywordsBox'> stageBox' style='overflow:visible'>testcase->stageList, '', "class='form-control chosen' multiple");?> reviewBox'>testcase->reviewList, $needReview, "class='form-control chosen'");?> + + + + +
    +
    + + + + + + + + + + + + + + + loadModel('flow'); + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; + ?> + + + +
    diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php index d2427ba8a4..a3a38b0cf0 100644 --- a/module/testcase/view/batchedit.html.php +++ b/module/testcase/view/batchedit.html.php @@ -17,6 +17,7 @@ testcase->confirmUnlinkTesttask);?> testcase->edit->requiredFields)?> +

    testcase->common . $lang->colon . $lang->testcase->batchEdit;?>

    diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index dcf447e638..4bfecdb21c 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -21,6 +21,14 @@ app->tab);?> app->tab == 'execution') js::set('objectID', $executionID);?> app->tab == 'project') js::set('objectID', $projectID);?> +testcase->create->requiredFields) as $field) +{ + if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; +} +?> +testcase->create->requiredFields);?> +
    @@ -30,12 +38,6 @@
    - testcase->create->requiredFields) as $field) - { - if($field and strpos($showFields, $field) === false) $showFields .= ',' . $field; - } - ?>
    @@ -68,7 +70,8 @@ testcase->typeList['unit']);?> - - - + + -
    testcase->typeList, $type, "class='form-control chosen'");?> + +
    testcase->stage?> testcase->stageList, $stage, "class='form-control chosen' multiple='multiple'");?> @@ -76,8 +79,8 @@
    testcase->lblStory;?>
    @@ -93,7 +96,6 @@
    testcase->title;?> @@ -108,8 +110,8 @@ - - testcase->pri;?> + + testcase->pri;?> testcase->priList as $priKey => $priValue) @@ -129,10 +131,10 @@ } ?> - + -
    +
    @@ -141,7 +143,6 @@
    - testcase->forceNotReview()):?> testcase->forceNotReview, '', "id='forceNotReview0'");?> @@ -220,12 +221,11 @@
    - - + + testcase->keywords;?> - testcase->status;?> diff --git a/www/js/zui/kanban/min.css b/www/js/zui/kanban/min.css index 2737bf7a51..8c0432b47c 100644 --- a/www/js/zui/kanban/min.css +++ b/www/js/zui/kanban/min.css @@ -1,6 +1,6 @@ /*! - * ZUI: ZUI Kanban View - v1.10.0 - 2022-06-15 + * ZUI: ZUI kanban - v1.10.0 - 2022-07-06 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT - */.kanban{min-height:300px}.kanban-header{position:relative;z-index:1;background-color:rgba(0,0,0,.07)}.use-flex .kanban-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-col{min-width:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.no-flex .kanban-col{position:absolute;top:0;bottom:0}.kanban-col+.kanban-col{border-left:2px solid #fff}.kanban-header-cols{position:absolute;top:0;right:0;bottom:0;left:auto}.kanban-header-col{position:relative}.kanban-header-col>.title>.icon{display:inline-block;vertical-align:middle}.kanban-header-col>.title>.text{display:inline-block;margin:0 5px;overflow:hidden;font-weight:700;text-overflow:clip;white-space:nowrap;vertical-align:middle}.kanban-header-col>.title>.count{position:relative;top:1px;display:inline-block;color:#8b91a2;vertical-align:middle}.kanban-affixed .kanban-header-col>.title>.count{color:#ededed}.use-flex .kanban-header-col{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;min-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 30px;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-col>.title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.no-flex .kanban-header-col>.title{position:absolute;top:50%;right:30px;left:30px;margin-top:-10px;line-height:20px;text-align:center;white-space:nowrap}.kanban-header-col>.actions{position:absolute;top:0;right:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.kanban-header-col>.actions>.btn,.kanban-header-col>.actions>a{min-width:20px;padding:5px;border-radius:0}.kanban-affixed .kanban-header-col>.actions>.btn,.kanban-affixed .kanban-header-col>.actions>.btn>.icon,.kanban-affixed .kanban-header-col>.actions>a,.kanban-affixed .kanban-header-col>.actions>a>.icon{color:#fff}.kanban-header-col>.actions>.btn-link:hover{background-color:rgba(0,0,0,.07)}.kanban-header-parent-col>.kanban-header-col,.kanban-header-parent-col>.kanban-header-sub-cols{height:50%}.use-flex .kanban-header-parent-col{padding:0;flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.kanban-header-sub-cols{position:relative;margin-top:-1px;margin-left:-2px;border-top:2px solid #fff;border-right:none}.use-flex .kanban-header-sub-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-sub-cols>.kanban-col{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.kanban-col:first-child>.kanban-header-sub-cols{margin-left:0}.kanban-lane,.kanban-sub-lane{position:relative;background-color:#f1f3f5}.use-flex .kanban-lane,.use-flex .kanban-sub-lane{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.kanban-lane+.kanban-lane{margin-top:2px}.kanban-lane>*{opacity:1;-webkit-transition:opacity .1s;-o-transition:opacity .1s;transition:opacity .1s}.kanban-lane.virtual-pending>*{opacity:0}.kanban-lane .has-sub-lane{background:0 0}.no-flex .kanban-lane-cols{position:absolute;top:0;right:0;bottom:0}.no-flex .kanban-sub-lane-cols{position:absolute;top:0;right:0;bottom:0;left:0}.kanban-sub-lane{-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-lane-name{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:20px;overflow:hidden;color:#fff;text-align:center;background-color:#3dc6fd;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.kanban-lane-name>.text{position:absolute;top:5px;bottom:5px;left:0;display:block;overflow:hidden;line-height:20px;text-align:center;white-space:nowrap;-webkit-writing-mode:tb-rl;-ms-writing-mode:tb-rl;writing-mode:tb-rl;-webkit-writing-mode:vertical-rl;writing-mode:vertical-rl}.no-flex .kanban-lane-name{position:absolute;top:0;bottom:0;left:0}.kanban-sub-lanes{min-width:0}.use-flex .kanban-sub-lanes{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:column;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column}.no-flex .kanban-sub-lanes{position:absolute;top:0;right:0;bottom:0}.kanban-sub-lanes.no-sub-lane{background-color:#f1f3f5}.kanban-dragging .kanban-lane-col{-webkit-transition:-webkit-box-shadow .1s;-o-transition:box-shadow .1s;transition:-webkit-box-shadow .1s;transition:box-shadow .1s;transition:box-shadow .1s,-webkit-box-shadow .1s}.kanban-lane-col.drop-target{-webkit-box-shadow:inset 0 0 0 3px rgba(255,152,0,.25);box-shadow:inset 0 0 0 3px rgba(255,152,0,.25)}.kanban-lane-col.drop-to{-webkit-box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75);box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75)}.kanban-lane-col.drop-to .kanban-lane-actions>.btn{background-color:rgba(255,152,0,.25);border:1px dotted #ff9800}.kanban-lane-col.drop-to .kanban-lane-actions>.btn>span{opacity:0}.kanban-lane-col[data-type=EMPTY]{background-color:#fff}.kanban-lane-items{height:100%;overflow:auto;overflow:overlay!important}.kanban-lane-actions{padding:10px 15px}.use-flex .kanban-items-grid{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.kanban-card{position:relative;padding:8px 10px;background:#fff;border:1px solid #fff;border-radius:4px;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .2s;-o-transition:box-shadow .2s,-o-transform .2s;transition:-webkit-box-shadow .2s,-webkit-transform .2s;transition:box-shadow .2s,transform .2s;transition:box-shadow .2s,transform .2s,-webkit-box-shadow .2s,-webkit-transform .2s,-o-transform .2s}.dragging>.kanban-card{opacity:.2}.kanban-card:hover{border-color:rgba(0,0,0,.1);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.09);box-shadow:0 4px 10px 0 rgba(0,0,0,.09)}.drag-shadow>.kanban-card{z-index:10;border-color:rgba(0,0,0,.2);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);opacity:1!important;-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;-o-transition:box-shadow .2s,-o-transform .4s!important;transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;transition:box-shadow .2s,transform .4s!important;transition:box-shadow .2s,transform .4s,-webkit-box-shadow .2s,-webkit-transform .4s,-o-transform .4s!important}.drag-shadow>.kanban-card.in{-webkit-transform:scale(1.1) rotate(5deg);-ms-transform:scale(1.1) rotate(5deg);-o-transform:scale(1.1) rotate(5deg);transform:scale(1.1) rotate(5deg)}.drag-shadow>.kanban-card a{pointer-events:none}.kanban-expired{display:none!important}.kanban-dragging{cursor:move} \ No newline at end of file + */.kanban{min-height:300px}.kanban-header{position:relative;z-index:1;background-color:rgba(0,0,0,.07)}.use-flex .kanban-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-col{min-width:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.no-flex .kanban-col{position:absolute;top:0;bottom:0}.kanban-col+.kanban-col{border-left:2px solid #fff}.kanban-header-cols{position:absolute;top:0;right:0;bottom:0;left:auto}.kanban-header-col{position:relative}.kanban-header-col>.title>.icon{display:inline-block;vertical-align:middle}.kanban-header-col>.title>.text{display:inline-block;margin:0 5px;overflow:hidden;font-weight:700;text-overflow:clip;white-space:nowrap;vertical-align:middle}.kanban-header-col>.title>.count{position:relative;top:1px;display:inline-block;color:#8b91a2;vertical-align:middle}.kanban-affixed .kanban-header-col>.title>.count{color:#ededed}.use-flex .kanban-header-col{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-width:0;min-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 30px;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-col>.title{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;max-width:100%;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.no-flex .kanban-header-col>.title{position:absolute;top:50%;right:30px;left:30px;margin-top:-10px;line-height:20px;text-align:center;white-space:nowrap}.kanban-header-col>.actions{position:absolute;top:0;right:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.kanban-header-col>.actions>.btn,.kanban-header-col>.actions>a{min-width:20px;padding:5px;border-radius:0}.kanban-affixed .kanban-header-col>.actions>.btn,.kanban-affixed .kanban-header-col>.actions>.btn>.icon,.kanban-affixed .kanban-header-col>.actions>a,.kanban-affixed .kanban-header-col>.actions>a>.icon{color:#fff}.kanban-header-col>.actions>.btn-link:hover{background-color:rgba(0,0,0,.07)}.kanban-header-parent-col>.kanban-header-col,.kanban-header-parent-col>.kanban-header-sub-cols{height:50%}.use-flex .kanban-header-parent-col{padding:0;flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.kanban-header-sub-cols{position:relative;margin-top:-1px;margin-left:-2px;border-top:2px solid #fff;border-right:none}.use-flex .kanban-header-sub-cols{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row}.use-flex .kanban-header-sub-cols>.kanban-col{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.kanban-col:first-child>.kanban-header-sub-cols{margin-left:0}.kanban-lane,.kanban-sub-lane{position:relative;background-color:#f1f3f5}.use-flex .kanban-lane,.use-flex .kanban-sub-lane{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:0;flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.kanban-lane+.kanban-lane{margin-top:2px}.kanban-lane>*{opacity:1;-webkit-transition:opacity .1s;-o-transition:opacity .1s;transition:opacity .1s}.kanban-lane.virtual-pending>*{opacity:0}.kanban-lane .has-sub-lane{background:0 0}.no-flex .kanban-lane-cols{position:absolute;top:0;right:0;bottom:0}.no-flex .kanban-sub-lane-cols{position:absolute;top:0;right:0;bottom:0;left:0}.kanban-sub-lane{-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto}.kanban-lane-name{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:20px;overflow:hidden;color:#fff;text-align:center;background-color:#3dc6fd;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.kanban-lane-name>.text{position:absolute;top:5px;bottom:5px;left:0;display:block;overflow:hidden;line-height:20px;text-align:center;white-space:nowrap;-webkit-writing-mode:tb-rl;-ms-writing-mode:tb-rl;writing-mode:tb-rl;-webkit-writing-mode:vertical-rl;writing-mode:vertical-rl}.no-flex .kanban-lane-name{position:absolute;top:0;bottom:0;left:0}.kanban-sub-lanes{min-width:0}.use-flex .kanban-sub-lanes{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;flex-direction:column;-webkit-box-flex:1;-webkit-flex:auto;-ms-flex:auto;flex:auto;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column}.no-flex .kanban-sub-lanes{position:absolute;top:0;right:0;bottom:0}.kanban-sub-lanes.no-sub-lane{background-color:#f1f3f5}.kanban-dragging .kanban-lane-col{-webkit-transition:-webkit-box-shadow .1s;-o-transition:box-shadow .1s;transition:-webkit-box-shadow .1s;transition:box-shadow .1s;transition:box-shadow .1s,-webkit-box-shadow .1s}.kanban-lane-col.drop-target{-webkit-box-shadow:inset 0 0 0 3px rgba(255,152,0,.25);box-shadow:inset 0 0 0 3px rgba(255,152,0,.25)}.kanban-lane-col.drop-to{-webkit-box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75);box-shadow:inset 0 0 1px 4px rgba(255,152,0,.75)}.kanban-lane-col.drop-to .kanban-lane-actions>.btn{background-color:rgba(255,152,0,.25);border:1px dotted #ff9800}.kanban-lane-col.drop-to .kanban-lane-actions>.btn>span{opacity:0}.kanban-lane-col[data-type=EMPTY]{background-color:#fff}.kanban-lane-items{height:100%;overflow:auto;overflow:overlay!important}.kanban-lane-actions{padding:10px 15px}.use-flex .kanban-items-grid{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.kanban-card{position:relative;padding:8px 10px;background:#fff;border:1px solid #fff;border-radius:4px;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .2s;-o-transition:box-shadow .2s,-o-transform .2s;transition:-webkit-box-shadow .2s,-webkit-transform .2s;transition:box-shadow .2s,transform .2s;transition:box-shadow .2s,transform .2s,-webkit-box-shadow .2s,-webkit-transform .2s,-o-transform .2s}.dragging>.kanban-card{opacity:.2}.kanban-card:hover{border-color:rgba(0,0,0,.1);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.09);box-shadow:0 4px 10px 0 rgba(0,0,0,.09)}.drag-shadow>.kanban-card{z-index:10;border-color:rgba(0,0,0,.2);-webkit-box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);box-shadow:0 4px 10px 0 rgba(0,0,0,.05),0 4px 20px 0 rgba(0,0,0,.3);opacity:1!important;-webkit-transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;-o-transition:box-shadow .2s,-o-transform .4s!important;transition:-webkit-box-shadow .2s,-webkit-transform .4s!important;transition:box-shadow .2s,transform .4s!important;transition:box-shadow .2s,transform .4s,-webkit-box-shadow .2s,-webkit-transform .4s,-o-transform .4s!important}.drag-shadow>.kanban-card.in{-webkit-transform:scale(1.1) rotate(5deg);-ms-transform:scale(1.1) rotate(5deg);-o-transform:scale(1.1) rotate(5deg);transform:scale(1.1) rotate(5deg)}.drag-shadow>.kanban-card a{pointer-events:none}.kanban-expired{display:none!important}.kanban-expired.kanban-board,.kanban-expired.kanban-lane{display:block!important}.kanban-dragging{cursor:move} \ No newline at end of file diff --git a/www/js/zui/kanban/min.js b/www/js/zui/kanban/min.js index a941ed6054..01aac76240 100644 --- a/www/js/zui/kanban/min.js +++ b/www/js/zui/kanban/min.js @@ -1,7 +1,7 @@ /*! - * ZUI: ZUI kanban - v1.10.0 - 2022-07-01 + * ZUI: ZUI kanban - v1.10.0 - 2022-07-06 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT */ -!function(){"use strict";function e(e,a){return n&&!a?requestAnimationFrame(e):setTimeout(e,a||0)}function a(e){return n?cancelAnimationFrame(e):void clearTimeout(e)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:e,clearAsap:a})}(),function(e){"use strict";function a(a,n){"string"==typeof a&&(a=e(a)),a instanceof e&&(a=a[0]);var t=a.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=i&&t.top+t.height<=r;var d=t.top<=r&&t.top+t.height>=0,o=t.left<=i&&t.left+t.width>=0;return d&&o}var n="zui.virtualRender",t=function(a,r){"function"==typeof r&&(r={render:r});var i=this;i.name=n,i.$=e(a),i.options=r=e.extend({trigger:"scroll resize"},t.DEFAULTS,this.$.data(),r),i.rendered=!1;var d=r.container;"function"==typeof d&&(d=d(i));var o=e(d?d:window);i.tryRender()||(i.$container=o,i.scrollListener=i.tryRender.bind(i),r.pendingClass&&i.$.addClass(r.pendingClass),o.on(r.trigger,i.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!a(n.$))&&(n.renderTaskID&&e.zui.clearAsap(n.renderTaskID),n.renderTaskID=e.zui.asap(function(){n.renderTaskID=null;var e=n.options.render(n.$);e!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var a=this;a.renderTaskID&&e.zui.clearAsap(a.renderTaskID),a.scrollListener&&(a.$container.off(a.options.trigger,a.scrollListener),a.scrollListener=null);var t=a.options.pendingClass;t&&a.$.removeClass(t),a.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},e.fn.virtualRender=function(a){return this.each(function(){var r=e(this),i=r.data(n);if(i){if("string"==typeof a)return i[a]();i.destroy()}r.data(n,i=new t(this,a))})},e.zui.isElementInViewport=a}(jQuery),function(e){"use strict";var a="zui.virtuallist",n=function(t,r){"function"==typeof r&&(r={render:r});var i=this;i.name=a,i.$=e(t),i.options=r=e.extend({},n.DEFAULTS,this.$.data(),r),i.scrollTop=this.options.scrollTop||0,i.render(r.list,r.scrollTop);var d=0;i.$.on("scroll."+a,function(){if(i.$.data("ignore-next-scroll"))return i.$.data("ignore-next-scroll",!1);if(!i.rendering){var a=i.$.scrollTop();a!==i.scrollTop&&(i.scrollTop=a,d&&e.zui.clearAsap(d),d=e.zui.asap(function(){d=0,i.render()}))}}),i.$.on("resize."+a,function(){i.rendering||(d&&e.zui.clearAsap(d),d=e.zui.asap(function(){d=0,i.render()}))})};n.prototype.render=function(a,n){var t=this;a?t.list=a:a=t.list,n&&e.extend(this.options,n),t.rendering=!0;var r=t.scrollTop,i=t.$,d=t.options.itemClassName,o=t.options.itemHeight,s=t.options.countPerRow,l=Number.parseFloat(i.css("padding-top"),10),c=Array.isArray(a),u="number"==typeof a?a:a.length,h=i.outerHeight(),p="virtual-list-item-expired",b=i.children(".virtual-list-holder-top"),v=i.children(".virtual-list-holder-bottom");b.length||(b=e('
    ').prependTo(i)),v.length||(v=e('
    ').appendTo(i)),i.children("."+d).addClass(p).addClass("hidden");var f=Math.max(0,s*Math.floor((r-l)/o-1)),m=Math.min(u-1,1+s*Math.ceil((r-l+h)/o)),g=Math.ceil(f/s)*o,k=Math.ceil((u-m-1)/s)*o;b.height(g);for(var C=f;C<=m;C++){var x=t.options.render(C,a,c?a[C]:null);x.addClass(d).removeClass(p).removeClass("hidden")}return v.height(k),i.children("."+p).remove(),b.prependTo(i),v.appendTo(i),t.scrollHeight=t.$[0].scrollHeight,t.rendering=!1,r=Math.min(t.scrollHeight-h,Math.max(g,r)),t.scrollTop=r,r!==t.$.scrollTop()&&t.$.data("ignore-next-scroll",!0).scrollTop(r),!0},n.prototype.destroy=function(){that.$.off("."+a)},n.DEFAULTS={itemClassName:"virtual-list-item",countPerRow:1},e.fn.virtualList=function(t){return this.each(function(){var r=e(this),i=r.data(a);if(i){if("string"==typeof t)return i[t]();i.destroy()}r.data(a,i=new n(this,t))})}}(jQuery),function(e){"use strict";var a="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var i=this;if(i.name=a,i.$=e(n).addClass("kanban"),r=i.setOptions(e.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var d=function(a){var n=e(this);r.onAction(n.data("action"),n,a,i)};i.$.on("click",".action",d).on("dblclick",".action-dbc",d)}var o=r.droppable;if("auto"===o&&(o=!r.readonly),o){var s=r.sortable;"function"==typeof s?s={finish:s}:s&&"object"!=typeof s&&(s={});var l=0;"function"==typeof o?o={drop:o}:"object"!=typeof o&&(o={});var c=e.extend({dropOnMouseleave:!0,selector:".kanban-item",target:".kanban-lane-col:not(.kanban-col-sorting)",mouseButton:"left"},o,{before:function(a){if(o.before){var n=o.before(a);if(n===!1)return n}if(s){var t=a.element.closest(".kanban-lane-items");t.closest(".kanban-col").addClass("kanban-col-sorting"),i._sortResult=null,i._$sortItems=t;var r=t.data("zui.sortable");r||t.sortable(e.extend({},s,{selector:".kanban-item",trigger:".kanban-card",dragCssClass:"kanban-item-sorting",noShadow:!0,finish:function(e){e.changed&&e.list.length>1&&(i._sortResult=e)}})).triggerHandler(a.event)}},drop:function(e){o.drop&&o.drop(e),r.onAction&&r.onAction("dropItem",e.element,e,i)},start:function(a){i.$.addClass("kanban-dragging"),l&&clearTimeout(l),l=setTimeout(function(){e(a.shadowElement).addClass("in"),l=0},50),o.start&&o.start(a)},always:function(e){if(i.$.removeClass("kanban-dragging"),l&&(clearTimeout(l),l=0),s){var a=i._sortResult;i._$sortItems.sortable("destroy").closest(".kanban-col").removeClass("kanban-col-sorting"),a&&s.finish&&a.target&&a.target.closest(".kanban-lane-col")[0]===e.target[0]&&s.finish(i._sortResult)}o.always&&o.always(e)}});i.$.droppable(c)}r.onCreate&&r.onCreate(i)};t.prototype.setOptions=function(a){var t=this,r=e.extend({},t.options,{data:t.data},a);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var i=!!e.fn.virtualRender&&r.virtualize;return i&&("object"!=typeof i&&(i={lane:!0}),t.virtualize=e.extend({},i)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(e){var a=this;e&&(a.data=e),a.data&&!Array.isArray(a.data)&&(a.data=[a.data]);var n=a.options,t=a.data||[];n.beforeRender&&n.beforeRender(a,t),a.$.toggleClass("kanban-readonly",!!n.readonly).toggleClass("kanban-no-lane-name",!!n.noLaneName),a.$.children(".kanban-board").addClass("kanban-expired"),a.maxKanbanBoardWidth=0;for(var r=0;r1&&a.$.children(".kanban-board").css("min-width",a.maxKanbanBoardWidth),n.onRender&&n.onRender(a)},t.prototype.layoutKanban=function(e,a){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,i=0,d={},o=!1,s=[],l=0;l0&&t.subLaneSpace&&(g.$height+=t.subLaneSpace)}}else for(var y=g.items||g.cards||{},C=0;C-1){var r=n.data[t];a=e.extend(r,a),n.data[t]=a}else n.data.push(a)}a.id||(a.id=e.zui.uuid());var i=a.id,d=n.options,o=n.$,s=o.children('.kanban-board[data-id="'+i+'"]');s.length?s.removeClass("kanban-expired"):s=e('
    ').appendTo(o),n.layoutKanban(a,s),n.renderKanbanHeader(a,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=a.lanes||[],c=null,u=0;u
    ').prependTo(n),r.useFlex||d.addClass("clearfix")),d.css("height",(i?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!i);var o=d.children(".kanban-cols");o.css("left",a.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=a.columns,l=a.$layout.columnsMap||{},c=null,u=null,h=0;h.kanban-col").addClass("kanban-expired"):o=e(['
    ','
    ','
    ','','',d.showCount?'':"","
    ","
    ",'
    ',"
    ","
    "].join("")),s&&s.length?s.after(o):n.prepend(o),o.data("col",a).attr("data-type",a.type);var l=r.$layout.columnWidth;d.useFlex&&a.subs?o.css("flex",(a.subs.length||0)+" "+(a.subs.length||0)+" "+l*(a.subs.length||0)+"%"):o.css({width:l*(a.subs.length||0)+"%",left:a.$index*l+"%"});var c=o.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(a.icon||""));var u=c.find(".title>.text").text(a.name).attr("title",a.name);if(a.color&&u.css("color",a.color),d.showCount){var h=void 0!==a.count?a.count:a.$cardsCount||0;d.showZeroCount||h||(h="");var p=c.find(".title>.count").text(h);d.onRenderCount&&d.onRenderCount(p,h,a,i)}d.onRenderHeaderCol&&d.onRenderHeaderCol(o,a,n,r)},t.prototype.renderHeaderCol=function(a,n,t,r,i){var d=this,o=d.options;if(a.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+a.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=e(['
    ','
    ','','',o.showCount?'':"","
    ",'
    ',"
    "].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",a).attr("data-type",a.type);var u=t&&t.subs&&t.subs.length?100/t.subs.length:i.$layout.columnWidth;o.useFlex?l.css("flex","1 1 "+u+"%"):l.css({left:(t?a.$subIndex:a.$index)*u+"%",width:u+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(a.icon||""));var h=l.find(".title>.text").text(a.name).attr("title",a.name);if(a.color&&h.css("color",a.color),o.showCount){var p=void 0!==a.count?a.count:a.$cardsCount||0;o.showZeroCount||p||(p="");var b=l.find(".title>.count").text(p);o.onRenderCount&&o.onRenderCount(b,p,a,d)}o.onRenderHeaderCol&&o.onRenderHeaderCol(l,a,n,i)},t.prototype.renderLane=function(a,t,r,i,d){var o=this,s=o.options;i=i||o.$.children('.kanban-board[data-id="'+a.kanban+'"]');var l=i.children('.kanban-lane[data-id="'+a.id+'"]'),c=t?i.children('.kanban-lane[data-id="'+t.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):(l=e('
    '),n||l.addClass("clearfix")),c&&c.length?c.after(l):i.children(".kanban-header").after(l);var u=a.subLanes?a.subLanes.length:0;l.attr("data-index",a.$index).data("lane",a).toggleClass("has-sub-lane",u>0).css({height:a.$height||"auto"}),o.virtualizeRender(d,"lane",l,function(){if(!s.noLaneName){var n=l.children('.kanban-lane-name[data-id="'+a.id+'"]');n.length||(n=e('
    ').prependTo(l)),n.empty().css("width",s.laneNameWidth).attr("title",a.name).append(e('').text(a.name)),a.color&&n.css("background-color",a.color),s.onRenderLaneName&&s.onRenderLaneName(n,a,i,r,d)}l.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var t;t=a.subLanes?o.renderSubLanes(a,r,l,d):o.renderLaneCols(r,a.items||a.cards||{},l,a,d),s.useFlex||t.css("left",d.$layout.laneNameWidth),l.children(".kanban-expired").remove()},{lane:a,columns:r,kanban:d})},t.prototype.virtualizeRender=function(a,n,t,r,i){var d=this,o=d.virtualize,s=o?o[n]:null;return s?("function"==typeof s&&(s=s(i,t)),"number"==typeof s&&t.height(s),void t.virtualRender(e.extend({render:r},d.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(a,n,t,r){var i=this,d=t.children(".kanban-sub-lanes");d.length?d.removeClass("kanban-expired"):d=e('
    ').appendTo(t),d.children(".kanban-sub-lane").addClass("kanban-expired");for(var o=0;o
    ').appendTo(r),n||o.addClass("clearfix")),o.attr("data-index",d).data("lane",a).css({height:a.$height||"auto"}),o.children(".kanban-col").addClass("kanban-expired");var s=a.items||a.cards;s&&this.renderLaneCols(t,s,o,a,i),o.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(a,n,t,r,i){var d=this,o=t.children(".kanban-cols");o.length?o.removeClass("kanban-expired"):o=e('
    ').appendTo(t),o.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?n[a-1]:null;return d.$index=a,d.$col=e,d.$lane=t,i.renderCard(d,o,s,e,t,r)}})}else{o.children(".kanban-item").addClass("kanban-expired");for(var c=0;c0?a[c-1]:null;u.$index=c,u.$col=e,u.$lane=t,i.renderCard(u,o,h,e,t,r)}o.children(".kanban-expired").remove()}o.css("padding",d.cardSpace/2).toggleClass("kanban-items-grid",s>1).attr("data-cards-per-row",s).data("cards",a)},t.prototype.renderLaneCol=function(a,n,t){var r=this,i=r.options,d=n.children('.kanban-lane-col[data-id="'+a.id+'"]'),o=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;d.length?d.removeClass("kanban-expired"):(d=e(['
    ','
    ',"
    "].join("")),r.options.readonly||d.append(['
    ','","
    "].join("")),i.laneItemsClass&&d.find(".kanban-lane-items").addClass(i.laneItemsClass),i.laneColClass&&d.addClass(i.laneColClass)),o&&o.length?o.after(d):n.prepend(d),d.attr({"data-parent":a.parentType?a.parentType:null,"data-type":a.type}).data("col",a);var s=a.$kanbanData.$layout.columnWidth;return i.useFlex?d.css("flex","1 1 "+s+"%"):d.css({left:a.$index*s+"%",width:s+"%"}),d},t.prototype.renderCard=function(a,n,t,r,i,d){var o=this.options,s=n.children('.kanban-item[data-id="'+a.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=e('
    '),o.wrapCard&&s.append('
    ')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||i.cardsPerRow||d.cardsPerRow||o.cardsPerRow;s.data("item",a).css({padding:o.cardSpace/2,width:c>1?100/c+"%":""});var u=o.wrapCard?s.children(".kanban-card"):s;u.css("height",o.cardHeight);var h=o.cardRender||o.itemRender;if(h)h(a,u,r,i,d);else{var p=u.find(".title");p.length||(p=e('
    ').appendTo(u)),p.text(a.name||a.title)}return s},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},e.fn.kanban=function(n){return this.each(function(){var r=e(this),i=r.data(a),d="object"==typeof n&&n;i||r.data(a,i=new t(this,d)),"string"==typeof n&&i[n]()})},t.NAME=a,e.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file +!function(){"use strict";function e(e,a){return n&&!a?requestAnimationFrame(e):setTimeout(e,a||0)}function a(e){return n?cancelAnimationFrame(e):void clearTimeout(e)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:e,clearAsap:a})}(),function(e){"use strict";function a(a,n){"string"==typeof a&&(a=e(a)),a instanceof e&&(a=a[0]);var t=a.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=i&&t.top+t.height<=r;var o=t.top<=r&&t.top+t.height>=0,d=t.left<=i&&t.left+t.width>=0;return o&&d}var n="zui.virtualRender",t=function(a,r){"function"==typeof r&&(r={render:r});var i=this;i.name=n,i.$=e(a),i.options=r=e.extend({trigger:"scroll resize"},t.DEFAULTS,this.$.data(),r),i.rendered=!1;var o=r.container;"function"==typeof o&&(o=o(i));var d=e(o?o:window);i.tryRender()||(i.$container=d,i.scrollListener=i.tryRender.bind(i),r.pendingClass&&i.$.addClass(r.pendingClass),d.on(r.trigger,i.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!a(n.$))&&(n.renderTaskID&&e.zui.clearAsap(n.renderTaskID),n.renderTaskID=e.zui.asap(function(){n.renderTaskID=null;var e=n.options.render(n.$);e!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var a=this;a.renderTaskID&&e.zui.clearAsap(a.renderTaskID),a.scrollListener&&(a.$container.off(a.options.trigger,a.scrollListener),a.scrollListener=null);var t=a.options.pendingClass;t&&a.$.removeClass(t),a.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},e.fn.virtualRender=function(a){return this.each(function(){var r=e(this),i=r.data(n);if(i){if("string"==typeof a)return i[a]();i.destroy()}r.data(n,i=new t(this,a))})},e.zui.isElementInViewport=a}(jQuery),function(e){"use strict";var a="zui.virtuallist",n=function(t,r){"function"==typeof r&&(r={render:r});var i=this;i.name=a,i.$=e(t),i.options=r=e.extend({},n.DEFAULTS,this.$.data(),r),i.scrollTop=this.options.scrollTop||0,i.render(r.list,r.scrollTop);var o=0;i.$.on("scroll."+a,function(){if(i.$.data("ignore-next-scroll"))return i.$.data("ignore-next-scroll",!1);if(!i.rendering){var a=i.$.scrollTop();a!==i.scrollTop&&(i.scrollTop=a,o&&e.zui.clearAsap(o),o=e.zui.asap(function(){o=0,i.render()}))}}),i.$.on("resize."+a,function(){i.rendering||(o&&e.zui.clearAsap(o),o=e.zui.asap(function(){o=0,i.render()}))})};n.prototype.render=function(a,n){var t=this;a?t.list=a:a=t.list,n&&e.extend(this.options,n),t.rendering=!0;var r=t.scrollTop,i=t.$,o=t.options.itemClassName,d=t.options.itemHeight,s=t.options.countPerRow,l=Number.parseFloat(i.css("padding-top"),10),c=Array.isArray(a),u="number"==typeof a?a:a.length,h=i.outerHeight(),p="virtual-list-item-expired",b=i.children(".virtual-list-holder-top"),v=i.children(".virtual-list-holder-bottom");b.length||(b=e('
    ').prependTo(i)),v.length||(v=e('
    ').appendTo(i)),i.children("."+o).addClass(p).addClass("hidden");var f=Math.max(0,s*Math.floor((r-l)/d-1)),m=Math.min(u-1,1+s*Math.ceil((r-l+h)/d)),g=Math.ceil(f/s)*d,k=Math.ceil((u-m-1)/s)*d;b.height(g);for(var C=f;C<=m;C++){var x=t.options.render(C,a,c?a[C]:null);x.addClass(o).removeClass(p).removeClass("hidden")}return v.height(k),i.children("."+p).remove(),b.prependTo(i),v.appendTo(i),t.scrollHeight=t.$[0].scrollHeight,t.rendering=!1,r=Math.min(t.scrollHeight-h,Math.max(g,r)),t.scrollTop=r,r!==t.$.scrollTop()&&t.$.data("ignore-next-scroll",!0).scrollTop(r),!0},n.prototype.destroy=function(){that.$.off("."+a)},n.DEFAULTS={itemClassName:"virtual-list-item",countPerRow:1},e.fn.virtualList=function(t){return this.each(function(){var r=e(this),i=r.data(a);if(i){if("string"==typeof t)return i[t]();i.destroy()}r.data(a,i=new n(this,t))})}}(jQuery),function(e){"use strict";var a="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var i=this;if(i.name=a,i.$=e(n).addClass("kanban"),r=i.setOptions(e.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var o=function(a){var n=e(this);r.onAction(n.data("action"),n,a,i)};i.$.on("click",".action",o).on("dblclick",".action-dbc",o)}var d=r.droppable;if("auto"===d&&(d=!r.readonly),d){var s=r.sortable;"function"==typeof s?s={finish:s}:s&&"object"!=typeof s&&(s={});var l=0;"function"==typeof d?d={drop:d}:"object"!=typeof d&&(d={});var c=e.extend({dropOnMouseleave:!0,selector:".kanban-item",target:".kanban-lane-col:not(.kanban-col-sorting)",mouseButton:"left"},d,{before:function(a){if(d.before){var n=d.before(a);if(n===!1)return n}if(s){var t=a.element.closest(".kanban-lane-items");t.closest(".kanban-col").addClass("kanban-col-sorting"),i._sortResult=null,i._$sortItems=t;var r=t.data("zui.sortable");r||t.sortable(e.extend({},s,{selector:".kanban-item",trigger:".kanban-card",dragCssClass:"kanban-item-sorting",noShadow:!0,finish:function(e){e.changed&&e.list.length>1&&(i._sortResult=e)}})).triggerHandler(a.event)}},drop:function(e){d.drop&&d.drop(e),r.onAction&&r.onAction("dropItem",e.element,e,i)},start:function(a){i.$.addClass("kanban-dragging"),l&&clearTimeout(l),l=setTimeout(function(){e(a.shadowElement).addClass("in"),l=0},50),d.start&&d.start(a)},always:function(e){if(i.$.removeClass("kanban-dragging"),l&&(clearTimeout(l),l=0),s){var a=i._sortResult;i._$sortItems.sortable("destroy").closest(".kanban-col").removeClass("kanban-col-sorting"),a&&s.finish&&a.target&&a.target.closest(".kanban-lane-col")[0]===e.target[0]&&s.finish(i._sortResult)}d.always&&d.always(e)}});i.$.droppable(c)}r.onCreate&&r.onCreate(i)};t.prototype.setOptions=function(a){var t=this,r=e.extend({},t.options,{data:t.data},a);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var i=!!e.fn.virtualRender&&r.virtualize;return i&&("object"!=typeof i&&(i={lane:!0}),t.virtualize=e.extend({},i)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(a){var n=this;a&&(n.data=a),n.data&&!Array.isArray(n.data)&&(n.data=[n.data]);var t,r=n.options,i=n.data||[];r.fixScroll&&(t=e(window).scrollTop(),e(window).height()+t===document.body.scrollHeight&&(t="bottom")),r.beforeRender&&r.beforeRender(n,i),n.$.toggleClass("kanban-readonly",!!r.readonly).toggleClass("kanban-no-lane-name",!!r.noLaneName),n.$.children(".kanban-board").addClass("kanban-expired"),n.maxKanbanBoardWidth=0;for(var o=0;o1&&n.$.children(".kanban-board").css("min-width",n.maxKanbanBoardWidth),t&&e(window).scrollTop("bottom"===t?document.body.scrollHeight:t),r.onRender&&r.onRender(n)},t.prototype.layoutKanban=function(e,a){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,i=0,o={},d=!1,s=[],l=0;l0&&t.subLaneSpace&&(g.$height+=t.subLaneSpace)}}else for(var y=g.items||g.cards||{},C=0;C-1){var r=n.data[t];a=e.extend(r,a),n.data[t]=a}else n.data.push(a)}a.id||(a.id=e.zui.uuid());var i=a.id,o=n.options,d=n.$,s=d.children('.kanban-board[data-id="'+i+'"]');s.length?s.removeClass("kanban-expired"):s=e('
    ').appendTo(d),n.layoutKanban(a,s),n.renderKanbanHeader(a,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=a.lanes||[],c=null,u=0;u
    ').prependTo(n),r.useFlex||o.addClass("clearfix")),o.css("height",(i?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!i);var d=o.children(".kanban-cols");d.css("left",a.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=a.columns,l=a.$layout.columnsMap||{},c=null,u=null,h=0;h.kanban-col").addClass("kanban-expired"):d=e(['
    ','
    ','
    ','','',o.showCount?'':"","
    ","
    ",'
    ',"
    ","
    "].join("")),s&&s.length?s.after(d):n.prepend(d),d.data("col",a).attr("data-type",a.type);var l=r.$layout.columnWidth;o.useFlex&&a.subs?d.css("flex",(a.subs.length||0)+" "+(a.subs.length||0)+" "+l*(a.subs.length||0)+"%"):d.css({width:l*(a.subs.length||0)+"%",left:a.$index*l+"%"});var c=d.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(a.icon||""));var u=c.find(".title>.text").text(a.name).attr("title",a.name);if(a.color&&u.css("color",a.color),o.showCount){var h=void 0!==a.count?a.count:a.$cardsCount||0;o.showZeroCount||h||(h="");var p=c.find(".title>.count").text(h);o.onRenderCount&&o.onRenderCount(p,h,a,i)}o.onRenderHeaderCol&&o.onRenderHeaderCol(d,a,n,r)},t.prototype.renderHeaderCol=function(a,n,t,r,i){var o=this,d=o.options;if(a.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+a.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=e(['
    ','
    ','','',d.showCount?'':"","
    ",'
    ',"
    "].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",a).attr("data-type",a.type);var u=t&&t.subs&&t.subs.length?100/t.subs.length:i.$layout.columnWidth;d.useFlex?l.css("flex","1 1 "+u+"%"):l.css({left:(t?a.$subIndex:a.$index)*u+"%",width:u+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(a.icon||""));var h=l.find(".title>.text").text(a.name).attr("title",a.name);if(a.color&&h.css("color",a.color),d.showCount){var p=void 0!==a.count?a.count:a.$cardsCount||0;d.showZeroCount||p||(p="");var b=l.find(".title>.count").text(p);d.onRenderCount&&d.onRenderCount(b,p,a,o)}d.onRenderHeaderCol&&d.onRenderHeaderCol(l,a,n,i)},t.prototype.renderLane=function(a,t,r,i,o){var d=this,s=d.options;i=i||d.$.children('.kanban-board[data-id="'+a.kanban+'"]');var l=i.children('.kanban-lane[data-id="'+a.id+'"]'),c=t?i.children('.kanban-lane[data-id="'+t.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):(l=e('
    '),n||l.addClass("clearfix")),c&&c.length?c.after(l):i.children(".kanban-header").after(l);var u=a.subLanes?a.subLanes.length:0;l.attr("data-index",a.$index).data("lane",a).toggleClass("has-sub-lane",u>0).css({height:a.$height||"auto"}),d.virtualizeRender(o,"lane",l,function(){if(!s.noLaneName){var n=l.children('.kanban-lane-name[data-id="'+a.id+'"]');n.length||(n=e('
    ').prependTo(l)),n.empty().css("width",s.laneNameWidth).attr("title",a.name).append(e('').text(a.name)),a.color&&n.css("background-color",a.color),s.onRenderLaneName&&s.onRenderLaneName(n,a,i,r,o)}l.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var t;t=a.subLanes?d.renderSubLanes(a,r,l,o):d.renderLaneCols(r,a.items||a.cards||{},l,a,o),s.useFlex||t.css("left",o.$layout.laneNameWidth),l.children(".kanban-expired").remove()},{lane:a,columns:r,kanban:o})},t.prototype.virtualizeRender=function(a,n,t,r,i){var o=this,d=o.virtualize,s=d?d[n]:null;return s?("function"==typeof s&&(s=s(i,t)),"number"==typeof s&&t.height(s),void t.virtualRender(e.extend({render:r},o.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(a,n,t,r){var i=this,o=t.children(".kanban-sub-lanes");o.length?o.removeClass("kanban-expired"):o=e('
    ').appendTo(t),o.children(".kanban-sub-lane").addClass("kanban-expired");for(var d=0;d
    ').appendTo(r),n||d.addClass("clearfix")),d.attr("data-index",o).data("lane",a).css({height:a.$height||"auto"}),d.children(".kanban-col").addClass("kanban-expired");var s=a.items||a.cards;s&&this.renderLaneCols(t,s,d,a,i),d.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(a,n,t,r,i){var o=this,d=t.children(".kanban-cols");d.length?d.removeClass("kanban-expired"):d=e('
    ').appendTo(t),d.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?n[a-1]:null;return o.$index=a,o.$col=e,o.$lane=t,i.renderCard(o,d,s,e,t,r)}})}else{d.children(".kanban-item").addClass("kanban-expired");for(var c=0;c0?a[c-1]:null;u.$index=c,u.$col=e,u.$lane=t,i.renderCard(u,d,h,e,t,r)}d.children(".kanban-expired").remove()}d.css("padding",o.cardSpace/2).toggleClass("kanban-items-grid",s>1).attr("data-cards-per-row",s).data("cards",a)},t.prototype.renderLaneCol=function(a,n,t){var r=this,i=r.options,o=n.children('.kanban-lane-col[data-id="'+a.id+'"]'),d=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;o.length?o.removeClass("kanban-expired"):(o=e(['
    ','
    ',"
    "].join("")),r.options.readonly||o.append(['
    ','","
    "].join("")),i.laneItemsClass&&o.find(".kanban-lane-items").addClass(i.laneItemsClass),i.laneColClass&&o.addClass(i.laneColClass)),d&&d.length?d.after(o):n.prepend(o),o.attr({"data-parent":a.parentType?a.parentType:null,"data-type":a.type}).data("col",a);var s=a.$kanbanData.$layout.columnWidth;return i.useFlex?o.css("flex","1 1 "+s+"%"):o.css({left:a.$index*s+"%",width:s+"%"}),o},t.prototype.renderCard=function(a,n,t,r,i,o){var d=this.options,s=n.children('.kanban-item[data-id="'+a.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=e('
    '),d.wrapCard&&s.append('
    ')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||i.cardsPerRow||o.cardsPerRow||d.cardsPerRow;s.data("item",a).css({padding:d.cardSpace/2,width:c>1?100/c+"%":""});var u=d.wrapCard?s.children(".kanban-card"):s;u.css("height",d.cardHeight);var h=d.cardRender||d.itemRender;if(h)h(a,u,r,i,o);else{var p=u.find(".title");p.length||(p=e('
    ').appendTo(u)),p.text(a.name||a.title)}return s},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,fixScroll:!0,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},e.fn.kanban=function(n){return this.each(function(){var r=e(this),i=r.data(a),o="object"==typeof n&&n;i||r.data(a,i=new t(this,o)),"string"==typeof n&&i[n]()})},t.NAME=a,e.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file