From 4520e903fb3f4a58a6dab69ad00b4c29cce55fe4 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 6 May 2021 16:29:16 +0800 Subject: [PATCH] * Fix bug #2852. --- module/common/view/datatable.fix.html.php | 10 ++++++- module/datatable/control.php | 36 ++++++++++++++--------- module/product/control.php | 1 + module/story/view/view.html.php | 2 ++ 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index 6ed9254b0d..fbb3031a4e 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -17,7 +17,15 @@ $(function() datatable->$datatableId->mode) ? $config->datatable->$datatableId->mode : 'table';?> var $dropdown = $(''); var $dropmenu = $(''); - $dropmenu.append("
  • datatable->custom?>
  • "); + if(typeof(storyType) != 'undefined' && storyType == 'requirement') + { + $dropmenu.append("
  • ' data-toggle='modal' data-type='ajax'>datatable->custom?>
  • "); + } + else + { + $dropmenu.append("
  • datatable->custom?>
  • "); + + } $dropmenu.append("
  • \", true);' id='switchToDatatable'>datatable->switchToDatatable : $lang->datatable->switchToTable;?>
  • "); $dropdown.append($dropmenu).appendTo($btnToolbar); } diff --git a/module/datatable/control.php b/module/datatable/control.php index 4c2b53230b..6707a493bf 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -3,17 +3,17 @@ * The view file of datatable module of ZenTaoPMS. * * @copyright Copyright 2014-2014 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com) - * @license business(商业软件) + * @license business(商业软件) * @author Hao sun - * @package datatable + * @package datatable * @version $Id$ * @link http://www.zentao.net */ class datatable extends control { /** - * Construct function, set menu. - * + * Construct function, set menu. + * * @access public * @return void */ @@ -24,7 +24,7 @@ class datatable extends control /** * Save config - * + * * @access public * @return void */ @@ -47,13 +47,14 @@ class datatable extends control /** * custom fields. - * - * @param string $module - * @param string $method + * + * @param string $module + * @param string $method + * @param string $extra * @access public * @return void */ - public function ajaxCustom($module, $method) + public function ajaxCustom($module, $method, $extra = '') { $target = $module . ucfirst($method); $mode = isset($this->config->datatable->$target->mode) ? $this->config->datatable->$target->mode : 'table'; @@ -85,17 +86,24 @@ class datatable extends control $setting = json_encode($this->config->$module->datatable->defaultField); } - $this->view->cols = $this->datatable->getFieldList($module); + $cols = $this->datatable->getFieldList($module); + if($extra == 'requirement') + { + unset($cols['plan']); + unset($cols['stage']); + } + + $this->view->cols = $cols; $this->view->setting = $setting; $this->display(); } /** * Ajax reset cols - * - * @param string $module - * @param string $method - * @param string $confirm + * + * @param string $module + * @param string $method + * @param string $confirm * @access public * @return void */ diff --git a/module/product/control.php b/module/product/control.php index 5996b5b15f..7a4b1c24bb 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -248,6 +248,7 @@ class product extends control $this->lang->story->create = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->create); $this->config->product->search['fields']['title'] = $this->lang->story->title; unset($this->config->product->search['fields']['plan']); + unset($this->config->product->search['fields']['stage']); } /* Build search form. */ diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 869350d735..8d3282d80e 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -318,6 +318,7 @@ story->status;?> processStatus('story', $story);?> + type != 'requirement'):?> story->stage;?> @@ -333,6 +334,7 @@ ?> + story->pri;?> pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?>