From e0537276bdb1a1eb6233d8a5b865dfdb566d5410 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 21 Jul 2022 09:30:35 +0800 Subject: [PATCH] * Delete useless code. --- module/common/view/datatable.fix.html.php | 6 ----- module/datatable/control.php | 12 --------- module/execution/config.php | 22 ++--------------- module/execution/view/all.html.php | 30 +---------------------- 4 files changed, 3 insertions(+), 67 deletions(-) diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index 2d434fa2d0..48a26082c2 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -24,12 +24,6 @@ $(function() { $dropmenu.append("
  • ' data-toggle='modal' data-type='ajax'>datatable->custom?>
  • "); } - else if(typeof(from) != 'undefined') - { - - - $dropmenu.append("
  • datatable->custom?>
  • "); - } else { $dropmenu.append("
  • datatable->custom?>
  • "); diff --git a/module/datatable/control.php b/module/datatable/control.php index 1f2ba3a0c1..8c2b0c4886 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -99,18 +99,6 @@ class datatable extends control unset($cols['caseCount']); } - if($module == 'execution' and $method == 'all') - { - if($extra == 'execution' or $extra == 'project') - { - unset($cols['percent']); - unset($cols['attribute']); - unset($cols['actions']); - } - - if($extra == 'project' or $extra == 'stage') unset($cols['project']); - } - $this->view->cols = $cols; $this->view->setting = $setting; $this->display(); diff --git a/module/execution/config.php b/module/execution/config.php index a79943e81e..8f369cf79f 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -141,11 +141,11 @@ $config->execution->gantt->linkType['begin']['end'] = 3; $config->execution->datatable = new stdclass(); if(!isset($config->setCode) or $config->setCode == 1) { - $config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'percent', 'attribute', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn', 'actions'); + $config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); } else { - $config->execution->datatable->defaultField = array('id', 'name', 'project', 'PM', 'status', 'progress', 'percent', 'attribute', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn', 'actions'); + $config->execution->datatable->defaultField = array('id', 'name', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); } $config->execution->datatable->fieldList['id']['title'] = 'idAB'; @@ -187,18 +187,6 @@ $config->execution->datatable->fieldList['progress']['width'] = '70'; $config->execution->datatable->fieldList['progress']['required'] = 'no'; $config->execution->datatable->fieldList['progress']['sort'] = 'no'; -$config->execution->datatable->fieldList['percent']['title'] = 'percent'; -$config->execution->datatable->fieldList['percent']['fixed'] = 'no'; -$config->execution->datatable->fieldList['percent']['width'] = '85'; -$config->execution->datatable->fieldList['percent']['required'] = 'no'; -$config->execution->datatable->fieldList['percent']['sort'] = 'no'; - -$config->execution->datatable->fieldList['attribute']['title'] = 'attribute'; -$config->execution->datatable->fieldList['attribute']['fixed'] = 'no'; -$config->execution->datatable->fieldList['attribute']['width'] = '80'; -$config->execution->datatable->fieldList['attribute']['required'] = 'no'; -$config->execution->datatable->fieldList['attribute']['sort'] = 'no'; - $config->execution->datatable->fieldList['openedDate']['title'] = 'openedDate'; $config->execution->datatable->fieldList['openedDate']['fixed'] = 'no'; $config->execution->datatable->fieldList['openedDate']['width'] = '85'; @@ -249,9 +237,3 @@ $config->execution->datatable->fieldList['burn']['fixed'] = 'no'; $config->execution->datatable->fieldList['burn']['width'] = '80'; $config->execution->datatable->fieldList['burn']['required'] = 'no'; $config->execution->datatable->fieldList['burn']['sort'] = 'no'; - -$config->execution->datatable->fieldList['actions']['title'] = 'actions'; -$config->execution->datatable->fieldList['actions']['fixed'] = 'right'; -$config->execution->datatable->fieldList['actions']['width'] = '180'; -$config->execution->datatable->fieldList['actions']['required'] = 'yes'; -$config->execution->datatable->fieldList['actions']['sort'] = 'no'; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index b1aa1a8181..2cca80f2ba 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -104,39 +104,11 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) $value) - { - if($value->id == 'actions') - { - $hasActions = true; - $value->show = true; - } - } - - if(!$hasActions) - { - $data = new stdclass(); - $data->id = 'actions'; - $data->order = $value->order + 1; - $data->show = true; - $data->width = '180px'; - $data->fixed = 'right'; - $data->title = $lang->actions; - $data->sort = 'no'; - - $setting[] = $data; - } - } - foreach($setting as $key => $value) { if($value->show) { - if(!$isStage and in_array($value->id, array('percent', 'attribute', 'actions'))) continue; - if(($config->systemMode == 'classic' or ($config->systemMode == 'new' and $this->app->tab != 'execution')) and $value->id == 'project') continue; + if($config->systemMode == 'classic' and $value->id == 'project') continue; $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); $columns ++;