From 7cf2f42078a68d61b114bf337ed90ea1bbe80df9 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 20 Apr 2018 12:09:19 +0800 Subject: [PATCH 1/3] * Refact detail page of todo. --- module/block/view/admin.html.php | 2 +- module/block/view/dashboard.html.php | 16 +-- module/block/view/todoblock.html.php | 11 +- module/my/view/editprofile.html.php | 176 ++++++++++++------------- module/todo/css/edit.css | 2 + module/todo/css/view.css | 2 + module/todo/view/edit.html.php | 16 ++- module/todo/view/view.html.php | 187 ++++++++++++++------------- 8 files changed, 207 insertions(+), 205 deletions(-) diff --git a/module/block/view/admin.html.php b/module/block/view/admin.html.php index 463eeff3e5..01a89a8f14 100644 --- a/module/block/view/admin.html.php +++ b/module/block/view/admin.html.php @@ -39,7 +39,7 @@ include '../../common/view/chosen.html.php';
-   +
diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php index c6914f3efb..7a2741cec9 100644 --- a/module/block/view/dashboard.html.php +++ b/module/block/view/dashboard.html.php @@ -38,14 +38,14 @@ $useGuest = $this->app->user->account == 'guest'; @@ -78,14 +78,14 @@ $useGuest = $this->app->user->account == 'guest'; diff --git a/module/block/view/todoblock.html.php b/module/block/view/todoblock.html.php index e508e91628..4d834d0737 100644 --- a/module/block/view/todoblock.html.php +++ b/module/block/view/todoblock.html.php @@ -25,10 +25,10 @@
-
+
- - + +
@@ -47,8 +47,9 @@
-
- +
+ +
diff --git a/module/my/view/editprofile.html.php b/module/my/view/editprofile.html.php index 3fb047d226..1f250130a9 100644 --- a/module/my/view/editprofile.html.php +++ b/module/my/view/editprofile.html.php @@ -18,99 +18,91 @@

my->editProfile;?>

-
- my->form->lblBasic;?> - - - - - - - - - - - - - - - - - -
user->realname;?>realname, "class='form-control' autocomplete='off'");?>user->email;?>email, "class='form-control' autocomplete='off'");?>
user->gender;?>user->genderList, $user->gender);?>user->birthyear;?>birthday,"class='form-date form-control' autocomplete='off'");?>
user->join;?> - join);?> - join);?> -
-
-
- my->form->lblAccount;?> - - - - - - - - - - +
user->account;?>account, "class='form-control' readonly='readonly' autocomplete='off'");?>user->commiter;?>commiter, "class='form-control' autocomplete='off'");?>
user->password;?> - - - safe->mode) ? $lang->user->placeholder->passwordStrength[$config->safe->mode] : '') . "'");?> - - + + + + + + + + + + + + + + + + + - - - -
my->form->lblBasic;?>
user->realname;?>realname, "class='form-control' autocomplete='off'");?>user->email;?>email, "class='form-control' autocomplete='off'");?>
user->gender;?>user->genderList, $user->gender);?>user->birthyear;?>birthday,"class='form-date form-control' autocomplete='off'");?>
user->join;?> + join);?> + join);?> user->password2;?>
- -
- my->form->lblContact;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
user->skype;?>skype, "class='form-control' autocomplete='off'");?>user->qq;?>qq, "class='form-control' autocomplete='off'");?>
user->yahoo;?>yahoo, "class='form-control' autocomplete='off'");?>user->gtalk;?>gtalk, "class='form-control' autocomplete='off'");?>
user->wangwang;?>wangwang, "class='form-control' autocomplete='off'");?>user->mobile;?>mobile, "class='form-control' autocomplete='off'");?>
user->phone;?>phone, "class='form-control' autocomplete='off'");?>user->address;?>address, "class='form-control' autocomplete='off'");?>
user->zipcode;?>zipcode, "class='form-control' autocomplete='off'");?>
-
-
- user->verify;?> - - - - - -
user->verifyPassword;?> -
- user->placeholder->verify}'");?> -
-
+
+ + + + + + + + + + + + + + +
my->form->lblAccount;?>
user->account;?>account, "class='form-control' readonly='readonly' autocomplete='off'");?>user->commiter;?>commiter, "class='form-control' autocomplete='off'");?>
user->password;?> + + + safe->mode) ? $lang->user->placeholder->passwordStrength[$config->safe->mode] : '') . "'");?> + + + user->password2;?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
my->form->lblContact;?>
user->skype;?>skype, "class='form-control' autocomplete='off'");?>user->qq;?>qq, "class='form-control' autocomplete='off'");?>
user->yahoo;?>yahoo, "class='form-control' autocomplete='off'");?>user->gtalk;?>gtalk, "class='form-control' autocomplete='off'");?>
user->wangwang;?>wangwang, "class='form-control' autocomplete='off'");?>user->mobile;?>mobile, "class='form-control' autocomplete='off'");?>
user->phone;?>phone, "class='form-control' autocomplete='off'");?>user->address;?>address, "class='form-control' autocomplete='off'");?>
user->zipcode;?>zipcode, "class='form-control' autocomplete='off'");?>
+ + + + + + +
user->verify;?>
user->verifyPassword;?> +
+ user->placeholder->verify}'");?> +
diff --git a/module/todo/css/edit.css b/module/todo/css/edit.css index e69de29bb2..f0de69d394 100644 --- a/module/todo/css/edit.css +++ b/module/todo/css/edit.css @@ -0,0 +1,2 @@ +.todoType {margin-top: 6px;} +.dateSwitcher {margin-top: 6px;} diff --git a/module/todo/css/view.css b/module/todo/css/view.css index aff5b64dc7..0873d4764f 100644 --- a/module/todo/css/view.css +++ b/module/todo/css/view.css @@ -1 +1,3 @@ #wrap .outer>table#actionbox>caption {margin-top:0px;} +.table-data tbody > tr > th {width: 80px;} +.modal-footer {text-align: center;} diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php index 138735f527..5b90b3dc31 100644 --- a/module/todo/view/edit.html.php +++ b/module/todo/view/edit.html.php @@ -78,7 +78,7 @@
-
+
todo->typeList[$todo->type];?>
@@ -109,7 +109,7 @@
- todo->statusList, $todo->status, "class='form-control chosen'");?> + todo->statusList, $todo->status, "class='form-control'");?>
@@ -121,15 +121,19 @@ end, 'class="form-control chosen"');?>
- begin == 2400) echo 'checked';?> > - +
+ begin == 2400) echo 'checked';?> > + +
- private) echo 'checked';?> /> - +
+ private) echo 'checked';?> /> + +
diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index 4ff5808fc0..798851f151 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -13,117 +13,118 @@ private or ($todo->private and $todo->account == $app->user->account)):?> -
-
-
- icons['todo']);?> id;?> - name;?> -
+ -
-
-
- todo->legendBasic;?> - - - - - - - - - - - - - - - - - - - - - - - - - - assignedTo)):?> - - - - - - - - - -
todo->pri;?>todo->priList[$todo->pri];?>
todo->status;?>todo->statusList[$todo->status];?>
todo->type;?>todo->typeList[$todo->type];?>
todo->account;?>account);?>
todo->date;?>date == '20300101' ? $lang->todo->periods['future'] : date(DT_DATE1, strtotime($todo->date));?>
todo->beginAndEnd;?>begin])) echo $times[$todo->begin]; if(isset($times[$todo->end])) echo ' ~ ' . $times[$todo->end];?>
todo->assignTo;?>assignedTo;?>
todo->assignTo . $lang->todo->date;?>assignedDate;?>
-
+
+
+
+
todo->legendBasic;?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + assignedTo)):?> + + + + + + + + + +
todo->pri;?>todo->priList[$todo->pri];?>
todo->status;?>todo->statusList[$todo->status];?>
todo->type;?>todo->typeList[$todo->type];?>
todo->account;?>account);?>
todo->date;?>date == '20300101' ? $lang->todo->periods['future'] : formatTime($todo->date);?>
todo->beginAndEnd;?>begin])) echo $times[$todo->begin]; if(isset($times[$todo->end])) echo ' ~ ' . $times[$todo->end];?>
todo->assignTo;?>assignedTo;?>
todo->assignTo . $lang->todo->date;?>assignedDate, DT_DATE1);?>
+
+
cycle):?> config = json_decode($todo->config);?> -
- todo->cycle;?> - - - - - - - - - -
todo->beginAndEnd?>config->begin . " ~ " . $todo->config->end;?>
todo->cycleConfig?> - config->type == 'day') - { - echo $lang->todo->every . $todo->config->day . $lang->day; - } - elseif($todo->config->type == 'week') - { - foreach(explode(',', $todo->config->week) as $week) echo $lang->todo->dayNames[$week] . ' '; - } - elseif($todo->config->type == 'month') - { - foreach(explode(',', $todo->config->month) as $month) echo $month . ' '; - } - echo '
'; - if($todo->config->beforeDays) printf($lang->todo->lblBeforeDays, $todo->config->beforeDays); - ?> -
-
+
+
todo->cycle;?>
+
+ + + + + + + + + +
todo->beginAndEnd?>config->begin . " ~ " . $todo->config->end;?>
todo->cycleConfig?> + config->type == 'day') + { + echo $lang->todo->every . $todo->config->day . $lang->day; + } + elseif($todo->config->type == 'week') + { + foreach(explode(',', $todo->config->week) as $week) echo $lang->todo->dayNames[$week] . ' '; + } + elseif($todo->config->type == 'month') + { + foreach(explode(',', $todo->config->month) as $month) echo $month . ' '; + } + echo '
'; + if($todo->config->beforeDays) printf($lang->todo->lblBeforeDays, $todo->config->beforeDays); + ?> +
+
+
- +
+
+ + $actions):?> + +
+
+ + action->dynamic->today;?> + + + +
+
    + + $action):?> + +
  • actor == $this->app->user->account) echo "class='active'";?>> +
    + time?> + + actor) . ' ' . $action->actionLabel;?> + objectLabel;?> + objectID;?> + objectLink, $action->objectName);?> + +
    +
  • + +
+
+ +
+ + originalDate) + 24 * 3600); + $lastDate = substr($action->originalDate, 0, 10); + $hasPre = $this->action->hasPreOrNext($firstDate, 'pre'); + $hasNext = $this->action->hasPreOrNext($lastDate, 'next'); + ?> + + + + +
+ diff --git a/module/story/config.php b/module/story/config.php index cc7e2ea343..f7d11e4e86 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -193,5 +193,5 @@ $config->story->datatable->fieldList['caseCount']['name'] = $lang->story->ca $config->story->datatable->fieldList['actions']['title'] = 'actions'; $config->story->datatable->fieldList['actions']['fixed'] = 'right'; -$config->story->datatable->fieldList['actions']['width'] = '156'; +$config->story->datatable->fieldList['actions']['width'] = '157'; $config->story->datatable->fieldList['actions']['required'] = 'yes'; From 52e0a63267e067caef8d2ccd4fd2e179b466cd9b Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 20 Apr 2018 14:15:21 +0800 Subject: [PATCH 3/3] * Refact detail view of todo. * Optimize codes. --- module/block/view/dashboard.html.php | 6 +++--- module/company/view/browse.html.php | 8 +++----- module/my/view/todo.html.php | 3 ++- module/product/view/all.html.php | 8 +++----- module/productplan/view/browse.html.php | 8 +++----- module/task/model.php | 12 ++++++++---- module/todo/view/view.html.php | 20 ++++++++++---------- www/js/zui/min.js | 4 ++-- 8 files changed, 34 insertions(+), 35 deletions(-) diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php index 7a2741cec9..36d4292e00 100644 --- a/module/block/view/dashboard.html.php +++ b/module/block/view/dashboard.html.php @@ -32,15 +32,15 @@ $useGuest = $this->app->user->account == 'guest';
" . $lang->todo->export, '', "class='btn btn-link iframe'");?> - + " . $lang->todo->batchCreate, '', "id='batchCreate' class='btn btn-secondary iframe' data-width='80%'", '', 'true');?> + " . $lang->todo->create, '', "id='create' class='btn btn-primary iframe' data-width='80%'", '', 'true');?>
diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 3f129d83b2..29f4bb8a30 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -91,12 +91,10 @@ -
- - -
+ id => sprintf('%03d', $product->id)));?> + + id);?> - id);?> createLink('product', 'view', 'product=' . $product->id), $product->name);?> line);?> diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index d7ea74387e..4b63dfd765 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -62,12 +62,10 @@ -
- - -
- + id => sprintf('%03d', $plan->id)));?> + id);?> + id"), $plan->title);?> session->currentProductType != 'normal'):?> diff --git a/module/task/model.php b/module/task/model.php index a4ea4e4a10..460ac6f0c4 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2106,10 +2106,14 @@ class taskModel extends model switch($id) { case 'id': - echo "
"; - if($mode == 'table' && $canBatchAction) echo ""; - echo sprintf('%03d', $task->id); - echo '
'; + if($mode == 'table' && $canBatchAction) + { + echo html::checkbox('taskIDList', array($task->id => sprintf('%03d', $task->id))); + } + else + { + printf('%03d', $task->id); + } break; case 'pri': echo ""; diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index 798851f151..69bc42d960 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -164,15 +164,15 @@ common::printRPN($browseLink); ?> +
+

comment;?>

+
id")?>' target='hiddenwin'> +
+ +
+
-
- comment;?> -
id")?>' target='hiddenwin'> -
- -
-