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 @@