From b9d7e79e55a15fb0a9199beba3135a3c69f1efff Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 23 May 2018 14:31:40 +0800 Subject: [PATCH 1/6] * finish task #4226. --- module/admin/control.php | 2 +- module/admin/view/safe.html.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index 967b5101e5..78a15bbbe0 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -172,7 +172,7 @@ class admin extends control { $data = fixer::input('post')->get(); $this->loadModel('setting')->setItems('system.common.safe', $data); - die(js::reload('parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } $this->view->title = $this->lang->admin->safe->common . $this->lang->colon . $this->lang->admin->safe->set; $this->view->position[] = $this->lang->admin->safe->common; diff --git a/module/admin/view/safe.html.php b/module/admin/view/safe.html.php index e9fcfd1fc4..c13c7388f1 100644 --- a/module/admin/view/safe.html.php +++ b/module/admin/view/safe.html.php @@ -19,7 +19,7 @@
-
+ @@ -36,7 +36,7 @@ - + From 6c48a85460e9ec79acb36b0a4a0c4e9331388da1 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 23 May 2018 14:49:37 +0800 Subject: [PATCH 2/6] * Adjust position for productModal, projectModal. * Adjust position for required note. --- module/todo/css/edit.css | 1 + module/todo/view/edit.html.php | 2 +- module/todo/view/view.html.php | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/todo/css/edit.css b/module/todo/css/edit.css index f0de69d394..90a1609841 100644 --- a/module/todo/css/edit.css +++ b/module/todo/css/edit.css @@ -1,2 +1,3 @@ .todoType {margin-top: 6px;} .dateSwitcher {margin-top: 6px;} +.form-horizontal .required::after{right: -10px;} diff --git a/module/todo/view/edit.html.php b/module/todo/view/edit.html.php index ad724c449b..848f2b292b 100644 --- a/module/todo/view/edit.html.php +++ b/module/todo/view/edit.html.php @@ -91,7 +91,7 @@
-
+
type == 'bug' or $todo->type == 'task') ? 'readonly' : ''; echo html::input('name', $todo->name, "$readType class='form-control' autocomplete='off'"); diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index 6a8b5d04f1..3f27311fce 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -161,9 +161,9 @@ unset($_GET['onlybody']); echo ""; echo ""; if($isonlybody) $_GET['onlybody'] = 'yes'; } From 74c933526a7d144968a79fb08a751766042fa5f6 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 23 May 2018 14:51:15 +0800 Subject: [PATCH 3/6] * change style of misc/changelog view. --- module/misc/css/changelog.css | 10 ++++- module/misc/view/changelog.html.php | 64 ++++++++++++++++------------- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/module/misc/css/changelog.css b/module/misc/css/changelog.css index 20a2f25952..b74f1c90a6 100644 --- a/module/misc/css/changelog.css +++ b/module/misc/css/changelog.css @@ -1,9 +1,17 @@ #versionMenu {margin-left: 20px;} #versionMenu .dropdown-menu {min-width: 130px; max-height:180px;overflow-y:auto;} -#featureList {padding: 0 20px 20px; min-height:200px;} +#mainContent {min-height: 240px;} +#featureList {padding: 0 10px;} #featureList > .item {padding: 0 0 10px 0;} #featureList > .item > h3 {color: #114f8e; font-size: 16px; margin: 0; padding: 10px 0} #featureList > .item > .desc {color: #666; padding-left: 18px;} #featureList > .item > .more-link {color: #666; padding-left: 18px;} #featureList > .item > .more {display: none} +#featureList + #details {padding: 0;} +#details .details-list {display: none; padding: 10px; background: #f1f1f1; border-radius: 4px;} +#details.show-details .details-list {display: block;} +#details > .btn > .icon-angle-right {transition: transform .2s; display: inline-block;} +#details.show-details > .btn > .icon-angle-right {transform: rotate(90deg)} +#details.show-details > .btn:focus {border-radius: 4px 4px 0 0;} +#details.show-details > .btn:focus + .details-list {border-radius: 0 0 4px 4px;} \ No newline at end of file diff --git a/module/misc/view/changelog.html.php b/module/misc/view/changelog.html.php index 23b888f7cd..890b1ca869 100644 --- a/module/misc/view/changelog.html.php +++ b/module/misc/view/changelog.html.php @@ -1,35 +1,41 @@ -
-
-
-

changeLog ?>

-
- + From b1bbcb7c2287f62a372af43955a84f7a76c53620 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 23 May 2018 14:55:33 +0800 Subject: [PATCH 4/6] * finish task #4225. --- module/custom/control.php | 24 ++++++++++++------------ module/custom/view/flow.html.php | 2 +- module/custom/view/required.html.php | 2 +- module/custom/view/score.html.php | 4 ++-- module/custom/view/set.html.php | 2 +- module/custom/view/working.html.php | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index 4efba93390..0fb47cb64a 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -119,29 +119,29 @@ class custom extends control /* Invalid key. It should be numbers. (It includes severityList in bug module and priList in stroy, task, bug, testcasea, testtask and todo module.) */ if($field == 'priList' or $field == 'severityList') { - if(!is_numeric($key) or $key > 255) die(js::alert($this->lang->custom->notice->invalidNumberKey)); + if(!is_numeric($key) or $key > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidNumberKey)); } - if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->invalidStringKey)); + if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey)); /* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */ if($field == 'roleList' or $module == 'todo' and $field == 'typeList') { - if(strlen($key) > 10) die(js::alert($this->lang->custom->notice->invalidStrlen['ten'])); + if(strlen($key) > 10) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['ten'])); } /* The length of sourceList in story module and typeList in task module is less than 20, check it when saved. */ if($field == 'sourceList' or $module == 'task' and $field == 'typeList') { - if(strlen($key) > 20) die(js::alert($this->lang->custom->notice->invalidStrlen['twenty'])); + if(strlen($key) > 20) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twenty'])); } /* The length of stageList in testcase module is less than 255, check it when saved. */ - if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) die(js::alert($this->lang->custom->notice->invalidStrlen['twoHundred'])); + if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twoHundred'])); /* The length of field that in bug and testcase module and reasonList in story and task module is less than 30, check it when saved. */ if($module == 'bug' or $field == 'reasonList' or $module == 'testcase') { - if(strlen($key) > 30) die(js::alert($this->lang->custom->notice->invalidStrlen['thirty'])); + if(strlen($key) > 30) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['thirty'])); } } @@ -156,8 +156,8 @@ class custom extends control $this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value); } } - if(dao::isError()) die(js::error(dao::getError())); - die(js::locate($this->createLink('custom', 'set', "module=$module&field=$field&lang=" . str_replace('-', '_', $lang)), 'parent')); + if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError())); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } /* Check whether the current language has been customized. */ @@ -237,7 +237,7 @@ class custom extends control $this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec(); } - die(js::reload('parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } $this->view->title = $this->lang->custom->flow; @@ -250,7 +250,7 @@ class custom extends control if($_POST) { $this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow); - die(js::reload('parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } $this->view->title = $this->lang->custom->working; @@ -272,7 +272,7 @@ class custom extends control if($_POST) { $this->custom->saveRequiredFields($moduleName); - die(js::reload('parent.parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } foreach($this->config->custom->requiredModules as $requiredModule) $this->app->loadLang($requiredModule); @@ -306,7 +306,7 @@ class custom extends control if($_POST) { $this->loadModel('setting')->setItem('system.common.global.scoreStatus', $this->post->score); - die(js::reload('parent')); + $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } $this->view->title = $this->lang->custom->score; diff --git a/module/custom/view/flow.html.php b/module/custom/view/flow.html.php index 95e2fdd323..31af5a105c 100644 --- a/module/custom/view/flow.html.php +++ b/module/custom/view/flow.html.php @@ -14,7 +14,7 @@
- +
custom->flow?> diff --git a/module/custom/view/required.html.php b/module/custom/view/required.html.php index 71f71c1df5..c02b0a334e 100644 --- a/module/custom/view/required.html.php +++ b/module/custom/view/required.html.php @@ -26,7 +26,7 @@
- +
$moduleName->common?> diff --git a/module/custom/view/score.html.php b/module/custom/view/score.html.php index 01db559cdc..12a567ec1a 100644 --- a/module/custom/view/score.html.php +++ b/module/custom/view/score.html.php @@ -13,7 +13,7 @@
- +
custom->score?> @@ -25,7 +25,7 @@
diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index 94dfd06ccf..ac39c8385e 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -45,7 +45,7 @@ EOT;
- +
custom->object[$module] . $lang->arrow . $lang->custom->$module->fields[$field]?> diff --git a/module/custom/view/working.html.php b/module/custom/view/working.html.php index c1b73bf130..f134856c9e 100644 --- a/module/custom/view/working.html.php +++ b/module/custom/view/working.html.php @@ -14,7 +14,7 @@
- +
custom->working?> From da248b64bc52f808d254284ddca5783821f415e0 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 23 May 2018 14:59:48 +0800 Subject: [PATCH 5/6] * Adjust width. --- module/todo/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/todo/view/create.html.php b/module/todo/view/create.html.php index dc81d2eb05..dad3cb03fe 100644 --- a/module/todo/view/create.html.php +++ b/module/todo/view/create.html.php @@ -23,7 +23,7 @@
admin->safe->password?>
admin->safe->weak?>safe->weak, "class='form-control' rows='4'")?>safe->weak, "class='form-control' style='height:100px'")?>
admin->safe->changeWeak?> global->scoreStatus) ? $config->global->scoreStatus : 0;?> custom->scoreStatus as $key => $value):?> -

+

-
todo->date;?> +
From 67aec16baafd70c17413b0d01c4eac3eee97fe89 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 23 May 2018 15:11:48 +0800 Subject: [PATCH 6/6] * finish task #4224. --- module/webhook/view/header.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/webhook/view/header.html.php b/module/webhook/view/header.html.php index 23fab0e144..6c70ec5ca7 100644 --- a/module/webhook/view/header.html.php +++ b/module/webhook/view/header.html.php @@ -25,7 +25,7 @@
- + createLink('webhook', 'create'), " {$lang->webhook->create}", '', "class='btn btn-primary'");?>