diff --git a/module/programplan/control.php b/module/programplan/control.php
index 2c66ab4dfa..d607021d95 100644
--- a/module/programplan/control.php
+++ b/module/programplan/control.php
@@ -119,6 +119,7 @@ class programplan extends control
$this->view->position[] = $this->lang->programplan->browse;
$this->view->projectID = $projectID;
$this->view->productID = $this->productID;
+ $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID);
$this->view->type = $type;
$this->view->plans = $plans;
$this->view->orderBy = $orderBy;
@@ -245,19 +246,40 @@ class programplan extends control
*/
public function ajaxCustom()
{
- $data = fixer::input('post')->get();
- $owner = $this->app->user->account;
- $module = 'programplan';
- $section = 'browse';
- $object = 'stageCustom';
- $setting = $this->loadModel('setting');
- $custom = empty($data->stageCustom) ? '' : implode(',', $data->stageCustom);
- $setting->setItem("$owner.$module.$section.$object", $custom);
+ $owner = $this->app->user->account;
+ $module = 'programplan';
+ $this->app->loadLang('execution');
+ $this->loadModel('datatable');
+ $this->loadModel('setting');
- $response = array();
- $response['result'] = 'success';
- $response['message'] = '';
- return $this->send($response);
+ $stageCustom = $this->setting->getItem("owner=$owner&module=$module§ion=browse&key=stageCustom");
+ $ganttFields = $this->setting->getItem("owner=$owner&module=$module§ion=ganttCustom&key=ganttFields");
+ $zooming = $this->setting->getItem("owner=$owner&module=$module§ion=ganttCustom&key=zooming");
+
+ if($_POST)
+ {
+ $data = fixer::input('post')->get();
+ $zooming = empty($data->zooming) ? '' : $data->zooming;
+ $stageCustom = empty($data->stageCustom) ? '' : implode(',', $data->stageCustom);
+ $ganttFields = empty($data->ganttFields) ? '' : implode(',', $data->ganttFields);
+
+ $this->setting->setItem("$owner.$module.browse.stageCustom", $stageCustom);
+ $this->setting->setItem("$owner.$module.ganttCustom.ganttFields", $ganttFields);
+ $this->setting->setItem("$owner.$module.ganttCustom.zooming", $zooming);
+
+ return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
+ }
+
+ /* Set Custom. */
+ foreach(explode(',', $this->config->programplan->custom->customGanttFields) as $field) $customFields[$field] = $this->lang->programplan->ganttCustom[$field];
+
+ $this->view->zooming = $zooming;
+ $this->view->customFields = $customFields;
+ $this->view->showFields = $this->config->programplan->ganttCustom->ganttFields;
+ $this->view->ganttFields = $ganttFields;
+ $this->view->stageCustom = $stageCustom;
+
+ $this->display();
}
/**
diff --git a/module/programplan/lang/de.php b/module/programplan/lang/de.php
index 889b03bcaa..a186daf4c5 100644
--- a/module/programplan/lang/de.php
+++ b/module/programplan/lang/de.php
@@ -62,6 +62,8 @@ $lang->programplan->hideCriticalPath = 'Hide Critical Path';
$lang->programplan->showCriticalPath = 'Show Critical Path';
$lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
+$lang->programplan->settingGantt = 'Gantt Setting';
+$lang->programplan->viewSetting = 'Setting';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
diff --git a/module/programplan/lang/en.php b/module/programplan/lang/en.php
index 6ed9867b61..b2084c75f4 100644
--- a/module/programplan/lang/en.php
+++ b/module/programplan/lang/en.php
@@ -62,6 +62,8 @@ $lang->programplan->hideCriticalPath = 'Hide Critical Path';
$lang->programplan->showCriticalPath = 'Show Critical Path';
$lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
+$lang->programplan->settingGantt = 'Gantt Setting';
+$lang->programplan->viewSetting = 'Setting';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
diff --git a/module/programplan/lang/fr.php b/module/programplan/lang/fr.php
index 889b03bcaa..a186daf4c5 100644
--- a/module/programplan/lang/fr.php
+++ b/module/programplan/lang/fr.php
@@ -62,6 +62,8 @@ $lang->programplan->hideCriticalPath = 'Hide Critical Path';
$lang->programplan->showCriticalPath = 'Show Critical Path';
$lang->programplan->delay = 'Delay';
$lang->programplan->delayDays = 'Delay days';
+$lang->programplan->settingGantt = 'Gantt Setting';
+$lang->programplan->viewSetting = 'Setting';
$lang->programplan->errorBegin = "Project begin date: %s, begin date should be >= project begin date.";
$lang->programplan->errorEnd = "Project end date: %s, end date should be <= project end date.";
diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php
index 1e4fdfbacd..b3f4b04429 100644
--- a/module/programplan/lang/zh-cn.php
+++ b/module/programplan/lang/zh-cn.php
@@ -62,6 +62,8 @@ $lang->programplan->hideCriticalPath = '隐藏关键路径';
$lang->programplan->showCriticalPath = '显示关键路径';
$lang->programplan->delay = '是否延期';
$lang->programplan->delayDays = '延期天数';
+$lang->programplan->settingGantt = '设置甘特图';
+$lang->programplan->viewSetting = '显示设置';
$lang->programplan->errorBegin = '阶段的开始时间不能小于所属项目的开始时间%s';
$lang->programplan->errorEnd = '阶段的结束时间不能大于所属项目的结束时间%s';
diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php
index 6b1f88c074..e68b128d0e 100644
--- a/module/programplan/view/gantt.html.php
+++ b/module/programplan/view/gantt.html.php
@@ -45,7 +45,7 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
.gantt_row.task-item{cursor: pointer;}
#ganttDownload, #ganttHeader {display: none;}
-#ganttContainer {margin-top: 10px;}
+#ganttContainer {margin-top: 40px;}
#mainContent:before {background: #fff;}
#mainContent.loading {overflow: hidden}
#mainContent.loading #ganttView {overflow: hidden}
@@ -65,6 +65,9 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
.gantt_task_line.gantt_task_inline_color{border:0px;}
.gantt_grid_scale, .gantt_task_scale, .gantt_task_vscroll{background-color: #F2F7FF;}
#myCover {display:none;left:12px!important;z-index:10!important;top:9px!important;height:unset!important;}
+.button-group{position: relative;}
+.flax{display: flex; margin-bottom: 10px;}
+.switchBtn > i {padding-left: 7px;}
createLink('programplan', 'ajaxCustom'));?>
@@ -74,34 +77,43 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
config->programplan->ganttCustom->ganttFields);?>
-
- app->getModuleName() == 'programplan')
- {
- $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=programplan§ion=ganttCustom&key=ganttFields');
- include '../../common/view/customfield.html.php';
- }
- ?>
-
-