diff --git a/module/block/control.php b/module/block/control.php index b63a02e337..c70cfc6292 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1118,7 +1118,7 @@ class block extends control $productID = isset($this->session->product) ? 0 : $this->session->product; if($productID && !array_key_exists($productID, $products)) $productID = 0; - $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task'); + $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task', false); $this->view->products = $products; $this->view->productID = $productID; } diff --git a/module/block/js/dashboard.js b/module/block/js/dashboard.js index d18e2fabbb..8eafeb9f3d 100644 --- a/module/block/js/dashboard.js +++ b/module/block/js/dashboard.js @@ -1,7 +1,7 @@ /** * Delete block. - * - * @param int $index + * + * @param int $index * @access public * @return void */ @@ -26,8 +26,8 @@ function deleteBlock(index) /** * Sort blocks. - * - * @param array $orders format is {'blockid' : 1, 'block1' : 2} + * + * @param array $orders format is {'blockid' : 1, 'block1' : 2} * @param function $callback * @access public * @return void @@ -65,7 +65,7 @@ function refreshBlock($panel, afterRefresh) else { $panel.children('.panel-move-handler,style,script').remove(); - $panel.find('.panel-body,.empty-tip').replaceWith($data); + $panel.find('.panel-body,.empty-tip').first().replaceWith($data); } $panel.find('.progress-pie').progressPie(); if($.isFunction(afterRefresh)) @@ -78,6 +78,7 @@ function refreshBlock($panel, afterRefresh) }); } $panel.find('.tablesorter').sortTable(); + $panel.find('.chosen').chosen(); initTableHeader($panel); $(".sparkline").sparkline(); }).fail(function() @@ -121,7 +122,7 @@ function initTableHeader($wrapper) if(!$table.length || !$table.children('thead').length || ($panel.find('#assigntomeBlock').length && $panel.find('#assigntomeBlock > div').length > 1)) return; var isFixed = $panel.find('.panel-body').height() < $table.outerHeight(); - + $panel.toggleClass('with-fixed-header', isFixed); var $header = $panel.children('.table-header-fixed').toggle(isFixed); if(!isFixed) @@ -194,7 +195,7 @@ function checkRefreshProgress($dashboard, doneCallback) * @param index $index * @access public * @return void - */ + */ function hiddenBlock(index) { $.getJSON(createLink('block', 'delete', 'index=' + index + '&module=' + module + '&type=hidden'), function(data) @@ -240,7 +241,7 @@ $(function() { resizeBlock(e.element.data('id'), isSideCol ? 4 : 8); }); - + e.element.toggleClass('block-sm', isSideCol); } }).on('click', '.refresh-panel', function() diff --git a/module/block/view/cmmiganttblock.html.php b/module/block/view/cmmiganttblock.html.php index 692d90a489..d64cbdee89 100644 --- a/module/block/view/cmmiganttblock.html.php +++ b/module/block/view/cmmiganttblock.html.php @@ -1,60 +1,79 @@
+ +
programplan->noData;?>
+
-
+
+
programplan->today; ?>
+
+
diff --git a/module/block/view/programteamblock.html.php b/module/block/view/programteamblock.html.php index da67cfe13f..58feb5de83 100644 --- a/module/block/view/programteamblock.html.php +++ b/module/block/view/programteamblock.html.php @@ -8,13 +8,12 @@ $maxConsumed = 0;
- teamCount, $maxTeamCount); $maxConsumed = max($program->consumed, $maxConsumed); ?> -
name;?>
+
name;?>
@@ -47,26 +46,26 @@ $maxConsumed = 0;
diff --git a/module/program/model.php b/module/program/model.php index 241b941be5..3daf4d08b8 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -347,6 +347,7 @@ class programModel extends model ->setIF($this->post->acl != 'custom', 'whitelist', '') ->setIF($this->post->acl == 'custom' and !isset($_POST['whitelist']), 'whitelist', '') ->setDefault('team', $this->post->name) + ->setDefault('isCat', 0) ->join('whitelist', ',') ->stripTags($this->config->program->editor->edit['id'], $this->config->allowedTags) ->remove('products, branch, uid, plans') diff --git a/module/programplan/model.php b/module/programplan/model.php index 1a66e9cd71..4dd79f4075 100644 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -106,10 +106,11 @@ class programplanModel extends model * @param int $productID * @param int $baselineID * @param string $selectCustom + * @param bool $returnJson * @access public * @return string */ - public function getDataForGantt($programID, $productID, $baselineID = 0, $selectCustom = '') + public function getDataForGantt($programID, $productID, $baselineID = 0, $selectCustom = '', $returnJson = true) { $this->loadModel('stage'); @@ -240,7 +241,7 @@ class programplanModel extends model $datas['data'][$index]->taskProgress = $progress; } - return json_encode($datas); + return $returnJson ? json_encode($datas) : $datas; } public function getTotalPercent($plan)