diff --git a/config/config.php b/config/config.php index aaeef0b3ff..68f4151936 100644 --- a/config/config.php +++ b/config/config.php @@ -37,10 +37,10 @@ $config->themes['default'] = 'default'; $config->langs['zh-cn'] = '简体'; $config->langs['zh-tw'] = '繁體'; $config->langs['en'] = 'English'; -$config->langs['de'] = 'Deutsch'; -$config->langs['fr'] = 'Français'; -$config->langs['vi'] = 'Tiếng Việt'; -$config->langs['ja'] = '日本語'; +//$config->langs['de'] = 'Deutsch'; +//$config->langs['fr'] = 'Français'; +//$config->langs['vi'] = 'Tiếng Việt'; +//$config->langs['ja'] = '日本語'; /* 设备类型视图文件前缀。The prefix for view file for different device. */ $config->devicePrefix['mhtml'] = ''; diff --git a/module/custom/model.php b/module/custom/model.php index 91f7308d9c..3b51c53e50 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -328,7 +328,8 @@ class customModel extends model if(empty($module)) $module = 'main'; global $app, $lang, $config; - if($module == 'main') $allMenu = $lang->menu; + $allMenu = new stdclass(); + if($module == 'main' and !empty($lang->menu)) $allMenu = $lang->menu; if($module != 'main' and isset($lang->menu->$module) and isset($lang->menu->{$module}['subMenu'])) $allMenu = $lang->menu->{$module}['subMenu']; if($module == 'product' and isset($allMenu->branch)) $allMenu->branch = str_replace('@branch@', $lang->custom->branch, $allMenu->branch); $flowModule = $config->global->flow . '_' . $module; diff --git a/module/datatable/model.php b/module/datatable/model.php index d37b0db5c6..d45cc009e8 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -88,6 +88,11 @@ class datatableModel extends model $set->title = $fieldList[$id]['title']; $set->sort = isset($fieldList[$id]['sort']) ? $fieldList[$id]['sort'] : 'yes'; $set->name = isset($fieldList[$id]['name']) ? $fieldList[$id]['name'] : ''; + + if(isset($fieldList[$id]['minWidth'])) $set->minWidth = $fieldList[$id]['minWidth']; + if(isset($fieldList[$id]['maxWidth'])) $set->maxWidth = $fieldList[$id]['maxWidth']; + if(isset($fieldList[$id]['pri'])) $set->pri = $fieldList[$id]['pri']; + $setting[$key] = $set; } } @@ -152,10 +157,25 @@ class datatableModel extends model $title = isset($col->title) ? "title='$col->title'" : ''; $title = (isset($col->name) and $col->name) ? "title='$col->name'" : $title; if($id == 'id' and (int)$width < 90) $width = '90px'; - $width = "data-width='$width' style='width:$width'"; $align = $id == 'actions' ? 'text-center' : ''; - echo ""; + $style = ''; + $data = ''; + $data .= "data-width='$width'"; + $style .= "width:$width;"; + if(isset($col->minWidth)) + { + $data .= "data-minWidth='{$col->minWidth}px'"; + $style .= "min-width:{$col->minWidth}px;"; + } + if(isset($col->maxWidth)) + { + $data .= "data-maxWidth='{$col->maxWidth}px'"; + $style .= "max-width:{$col->maxWidth}px;"; + } + if(isset($col->pri)) $data .= "data-pri='{$col->pri}'"; + + echo ""; if($id == 'actions') { echo $this->lang->actions; diff --git a/module/project/config.php b/module/project/config.php index de06ba0ca8..985368c990 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -33,65 +33,80 @@ $config->project->datatable->fieldList['id']['title'] = 'ID'; $config->project->datatable->fieldList['id']['fixed'] = 'left'; $config->project->datatable->fieldList['id']['width'] = '60'; $config->project->datatable->fieldList['id']['required'] = 'yes'; +$config->project->datatable->fieldList['id']['pri'] = '1'; $config->project->datatable->fieldList['name']['title'] = 'name'; $config->project->datatable->fieldList['name']['fixed'] = 'left'; -$config->project->datatable->fieldList['name']['width'] = '180'; +$config->project->datatable->fieldList['name']['width'] = 'auto'; +$config->project->datatable->fieldList['name']['minWidth'] = '180'; $config->project->datatable->fieldList['name']['required'] = 'yes'; $config->project->datatable->fieldList['name']['sort'] = 'no'; +$config->project->datatable->fieldList['name']['pri'] = '1'; $config->project->datatable->fieldList['PM']['title'] = 'PM'; $config->project->datatable->fieldList['PM']['fixed'] = 'no'; $config->project->datatable->fieldList['PM']['width'] = '80'; $config->project->datatable->fieldList['PM']['required'] = 'yes'; $config->project->datatable->fieldList['PM']['sort'] = 'no'; +$config->project->datatable->fieldList['PM']['pri'] = '2'; $config->project->datatable->fieldList['status']['title'] = 'status'; $config->project->datatable->fieldList['status']['fixed'] = 'left'; $config->project->datatable->fieldList['status']['width'] = '80'; $config->project->datatable->fieldList['status']['required'] = 'no'; $config->project->datatable->fieldList['status']['sort'] = 'yes'; +$config->project->datatable->fieldList['status']['pri'] = '2'; $config->project->datatable->fieldList['begin']['title'] = 'begin'; $config->project->datatable->fieldList['begin']['fixed'] = 'no'; -$config->project->datatable->fieldList['begin']['width'] = '100'; +$config->project->datatable->fieldList['begin']['width'] = '90'; $config->project->datatable->fieldList['begin']['required'] = 'no'; +$config->project->datatable->fieldList['begin']['pri'] = '9'; $config->project->datatable->fieldList['end']['title'] = 'end'; $config->project->datatable->fieldList['end']['fixed'] = 'no'; -$config->project->datatable->fieldList['end']['width'] = '100'; +$config->project->datatable->fieldList['end']['width'] = '90'; $config->project->datatable->fieldList['end']['required'] = 'no'; +$config->project->datatable->fieldList['end']['pri'] = '3'; $config->project->datatable->fieldList['budget']['title'] = 'budget'; $config->project->datatable->fieldList['budget']['fixed'] = 'no'; $config->project->datatable->fieldList['budget']['width'] = '80'; $config->project->datatable->fieldList['budget']['required'] = 'yes'; +$config->project->datatable->fieldList['budget']['pri'] = '3'; $config->project->datatable->fieldList['teamCount']['title'] = 'teamCount'; $config->project->datatable->fieldList['teamCount']['fixed'] = 'no'; $config->project->datatable->fieldList['teamCount']['width'] = '70'; $config->project->datatable->fieldList['teamCount']['required'] = 'no'; $config->project->datatable->fieldList['teamCount']['sort'] = 'no'; +$config->project->datatable->fieldList['teamCount']['pri'] = '8'; $config->project->datatable->fieldList['estimate']['title'] = 'estimate'; $config->project->datatable->fieldList['estimate']['fixed'] = 'no'; -$config->project->datatable->fieldList['estimate']['width'] = '50'; +$config->project->datatable->fieldList['estimate']['width'] = '70'; +$config->project->datatable->fieldList['estimate']['maxWidth'] = '80'; $config->project->datatable->fieldList['estimate']['required'] = 'no'; $config->project->datatable->fieldList['estimate']['sort'] = 'no'; +$config->project->datatable->fieldList['estimate']['pri'] = '8'; $config->project->datatable->fieldList['consume']['title'] = 'consume'; $config->project->datatable->fieldList['consume']['fixed'] = 'no'; -$config->project->datatable->fieldList['consume']['width'] = '50'; +$config->project->datatable->fieldList['consume']['width'] = '70'; +$config->project->datatable->fieldList['consume']['maxWidth'] = '80'; $config->project->datatable->fieldList['consume']['required'] = 'no'; $config->project->datatable->fieldList['consume']['sort'] = 'no'; +$config->project->datatable->fieldList['consume']['pri'] = '7'; $config->project->datatable->fieldList['progress']['title'] = 'progress'; $config->project->datatable->fieldList['progress']['fixed'] = 'right'; $config->project->datatable->fieldList['progress']['width'] = '60'; $config->project->datatable->fieldList['progress']['required'] = 'no'; $config->project->datatable->fieldList['progress']['sort'] = 'no'; +$config->project->datatable->fieldList['progress']['pri'] = '6'; $config->project->datatable->fieldList['actions']['title'] = 'actions'; $config->project->datatable->fieldList['actions']['fixed'] = 'right'; $config->project->datatable->fieldList['actions']['width'] = '180'; $config->project->datatable->fieldList['actions']['required'] = 'yes'; +$config->project->datatable->fieldList['actions']['pri'] = '1'; diff --git a/module/project/css/browse.css b/module/project/css/browse.css index 26af2131ec..3c5a1c9361 100644 --- a/module/project/css/browse.css +++ b/module/project/css/browse.css @@ -2,5 +2,6 @@ .side-col {padding-right: 20px; width: 18%;} #sidebar>.cell {width: 100%;} +th.c-budget,{text-align:right;} td.c-actions {overflow: visible;} .c-actions .btn {overflow: visible;} diff --git a/module/project/model.php b/module/project/model.php index db830f76d7..e47ca9d81e 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1315,7 +1315,7 @@ class projectModel extends model if($col->show) { $title = ''; - $class = "c-$id" . (in_array($id, ['budget', 'teamCount']) ? ' c-number' : ' c-name'); + $class = "c-$id" . (in_array($id, array('budget', 'teamCount', 'estimate', 'consume')) ? ' c-number' : ''); if($id == 'id') $class .= ' cell-id'; diff --git a/module/project/view/browse.html.php b/module/project/view/browse.html.php index b3c89be249..8e3b26688d 100644 --- a/module/project/view/browse.html.php +++ b/module/project/view/browse.html.php @@ -85,11 +85,12 @@ js::set('browseType', $browseType); id == 'status' and $browseType !== 'all') $value->show = false; - if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); - } + foreach($setting as $value) + { + if($value->id == 'status' and $browseType !== 'all') $value->show = false; + if($value->id == 'teamCount' and $browseType == 'all') $value->show = false; + if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit); + } ?> diff --git a/module/upgrade/model.php b/module/upgrade/model.php index da0d745d0a..46c59a8029 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -4055,6 +4055,20 @@ class upgradeModel extends model $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); } + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('createlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'createLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + + $stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('doc')->andWhere('method')->eq('editlib')->query(); + while($grouppriv = $stmt->fetch()) + { + $grouppriv->method = 'editLib'; + $this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec(); + } + return true; }