* Delete useless code.

This commit is contained in:
tianshujie
2022-07-21 09:30:35 +08:00
parent 03f9bca910
commit e0537276bd
4 changed files with 3 additions and 67 deletions
@@ -24,12 +24,6 @@ $(function()
{
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName . '&extra=requirement')?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
}
else if(typeof(from) != 'undefined')
{
<?php $fromPage = isset($fromPage) ? $fromPage : '';?>
<?php $fromPage = ($fromPage == 'project' and isset($isStage) and $isStage) ? 'stage' : $fromPage;?>
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName . "&extra=$fromPage")?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
}
else
{
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
-12
View File
@@ -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();
+2 -20
View File
@@ -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';
+1 -29
View File
@@ -104,39 +104,11 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
<thead>
<tr>
<?php
if($isStage)
{
$hasActions = false;
foreach($setting as $key => $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 ++;