* [bug#57116,done,0.5h] show gantt label and search toggle.

This commit is contained in:
liumengyi
2024-11-20 08:53:28 +08:00
committed by 刘梦艺
parent c719ef8cc8
commit 6d1210f5aa
2 changed files with 15 additions and 19 deletions
+5 -5
View File
@@ -646,11 +646,11 @@ function initGantt()
resizeGanttView();
$(window).off('.gannt').on('resize.gannt', function(){resizeGanttView()});
if(typeof isSearch != 'undefined' && isSearch)
{
gantt._clear_data();
ganttData.links = [];
}
/* 渲染甘特图时先清空原有数据。 */
gantt._clear_data();
/* 搜索时隐藏任务关系。 */
if(typeof isSearch != 'undefined' && isSearch) ganttData.links = [];
gantt.init(ganttID);
gantt.parse(ganttData);
gantt.showDate(new Date());
+10 -14
View File
@@ -18,28 +18,24 @@ include './ganttfields.html.php';
if($app->rawModule == 'programplan')
{
$productDropdown = null;
if($project->stageBy == 'product')
{
$viewName = $productID != 0 ? zget($productList, $productID) : $lang->product->allProduct;
$items = array();
foreach($productList as $key => $productName) $items[] = array('text' => $productName, 'url' => $this->createLink('programplan', 'browse', "projectID=$projectID&productID=$key&type=gantt"));
featureBar
$productDropdown = dropdown
(
dropdown
(
btn(set::type('link'), setClass('no-underline'), $viewName),
set::items($items)
)
);
}
else
{
featureBar
(
btn(setClass('ghost mr-2', ($browseType != 'bysearch' ? 'active' : '')), $lang->programplan->gantt, set::url($this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"))),
$hasSearch ? li(searchToggle(set::module('projectTask'), set::open($browseType == 'bysearch'))) : null
btn(set::type('link'), setClass('no-underline'), $viewName),
set::items($items)
);
}
featureBar
(
btn(setClass('ghost mr-2', ($browseType != 'bysearch' ? 'active' : '')), $lang->programplan->gantt, set::url($this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"))),
$productDropdown,
$hasSearch ? li(searchToggle(set::module('projectTask'), set::open($browseType == 'bysearch'))) : null
);
toolbar
(
btnGroup