From 315a6f931fba50e5fa1e0a1e65eefb74973f1d8d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 28 Mar 2018 16:20:28 +0800 Subject: [PATCH] * adjust for datatable. --- module/common/lang/en.php | 4 ++-- module/common/lang/zh-cn.php | 4 ++-- module/datatable/model.php | 7 +++++-- module/my/view/todo.html.php | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 04d21e63fc..7329269936 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -539,8 +539,8 @@ $lang->icons['post'] = 'edit'; $lang->icons['batchCreate'] = 'plus-sign'; $lang->icons['batchEdit'] = 'edit-sign'; $lang->icons['batchClose'] = 'off'; -$lang->icons['edit'] = 'pencil'; -$lang->icons['delete'] = 'remove'; +$lang->icons['edit'] = 'edit'; +$lang->icons['delete'] = 'trash'; $lang->icons['copy'] = 'copy'; $lang->icons['report'] = 'bar-chart'; $lang->icons['export'] = 'download-alt'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 5201209121..86461e1c18 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -539,8 +539,8 @@ $lang->icons['post'] = 'edit'; $lang->icons['batchCreate'] = 'plus-sign'; $lang->icons['batchEdit'] = 'edit-sign'; $lang->icons['batchClose'] = 'off'; -$lang->icons['edit'] = 'pencil'; -$lang->icons['delete'] = 'remove'; +$lang->icons['edit'] = 'edit'; +$lang->icons['delete'] = 'trash'; $lang->icons['copy'] = 'copy'; $lang->icons['report'] = 'bar-chart'; $lang->icons['export'] = 'download-alt'; diff --git a/module/datatable/model.php b/module/datatable/model.php index afd6e2f33c..659de29674 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -127,10 +127,11 @@ class datatableModel extends model { $fixed = $col->fixed == 'no' ? 'true': 'false'; $width = is_numeric($col->width) ? "{$col->width}px" : $col->width; - $sorter = (isset($col->sort) and $col->sort == 'no') ? '' : '{sorter:false}'; $title = isset($col->name) ? "title='$col->name'" : ''; + if($id == 'id' and (int)$width < 90) $width = '90px'; + $width = $id != 'actions' ? "data-width='$width' style='width:$width'" : ''; - echo ""; + echo ""; if($id == 'actions') { echo $this->lang->actions; @@ -141,7 +142,9 @@ class datatableModel extends model } else { + if($id == 'id') echo "
"; common::printOrderLink($id, $orderBy, $vars, $col->title); + if($id == 'id') echo "
"; } echo ''; } diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index c308bf2fe5..2fd5d5ec14 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -28,7 +28,7 @@ ?>
- +