* Adjusted programplan ajaxCustom function.
This commit is contained in:
@@ -10,5 +10,52 @@ declare(strict_types=1);
|
||||
*/
|
||||
class programplanZen extends programplan
|
||||
{
|
||||
/**
|
||||
* 处理请求数据
|
||||
* Processing request data.
|
||||
*
|
||||
* @param object $formData
|
||||
* @param string $owner
|
||||
* @param string $module
|
||||
* @access protected
|
||||
* @return object
|
||||
*/
|
||||
protected function beforeAjaxCustom(object $formData, string $owner, string $module): object
|
||||
{
|
||||
$data = $formData->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 $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成自定义设置视图。
|
||||
* Build custom setting view form data.
|
||||
*
|
||||
* @param string $owner
|
||||
* @param string $module
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function buildAjaxCustomView(string $owner, string $module, array $customFields)
|
||||
{
|
||||
$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");
|
||||
|
||||
$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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user