diff --git a/module/integration/js/create.js b/module/integration/js/create.js index 2894b9a9b9..06b63e32f5 100644 --- a/module/integration/js/create.js +++ b/module/integration/js/create.js @@ -66,19 +66,16 @@ $('#triggerType').change(function() var type = $(this).val(); if(type == 'tag') { - $('.tag-fields').removeClass('hidden'); $('.comment-fields').addClass('hidden'); $('.custom-fields').addClass('hidden'); } else if(type == 'commit') { - $('.tag-fields').addClass('hidden'); $('.comment-fields').removeClass('hidden'); $('.custom-fields').addClass('hidden'); } else if(type == 'schedule') { - $('.tag-fields').addClass('hidden'); $('.comment-fields').addClass('hidden'); $('.custom-fields').removeClass('hidden'); } diff --git a/module/integration/js/edit.js b/module/integration/js/edit.js index b66621326a..a772843d13 100644 --- a/module/integration/js/edit.js +++ b/module/integration/js/edit.js @@ -68,19 +68,16 @@ $('#triggerType').change(function() var type = $(this).val(); if(type == 'tag') { - $('.tag-fields').removeClass('hidden'); $('.comment-fields').addClass('hidden'); $('.custom-fields').addClass('hidden'); } else if(type == 'commit') { - $('.tag-fields').addClass('hidden'); $('.comment-fields').removeClass('hidden'); $('.custom-fields').addClass('hidden'); } else if(type == 'schedule') { - $('.tag-fields').addClass('hidden'); $('.comment-fields').addClass('hidden'); $('.custom-fields').removeClass('hidden'); } diff --git a/module/integration/lang/en.php b/module/integration/lang/en.php index d3706339cd..148eb157e0 100644 --- a/module/integration/lang/en.php +++ b/module/integration/lang/en.php @@ -18,8 +18,7 @@ $lang->integration->scheduleDay = 'Custom Days'; $lang->integration->lastExec = 'Last Executed'; $lang->integration->example = 'e.g.'; -$lang->integration->tagEx = 'build_#15, to build Jenkins job that id is 15.'; -$lang->integration->commitEx = 'start build #15, to build Jenkins job that id is 15.'; +$lang->integration->commitEx = '%build% %integration% %id%15, to build Jenkins job that id is 15.'; $lang->integration->cronSample = 'e.g. 0 0 2 * * 2-6/1 means 2:00 a.m. every weekday.'; $lang->integration->sendExec = 'Send execute request success.'; diff --git a/module/integration/lang/zh-cn.php b/module/integration/lang/zh-cn.php index f4ef638185..dc327991d9 100644 --- a/module/integration/lang/zh-cn.php +++ b/module/integration/lang/zh-cn.php @@ -20,8 +20,7 @@ $lang->integration->scheduleDay = '自定义天数'; $lang->integration->lastExec = '最后执行'; $lang->integration->example = '举例'; -$lang->integration->tagEx = 'build_#15,其中15为Jenkins任务编号'; -$lang->integration->commitEx = 'start build #15,其中15为Jenkins任务编号'; +$lang->integration->commitEx = '%build% %integration% %id%15,其中15为Jenkins任务编号'; $lang->integration->cronSample = '如 0 0 2 * * 2-6/1 表示每个工作日凌晨2点'; $lang->integration->sendExec = '发送执行请求成功!'; diff --git a/module/integration/model.php b/module/integration/model.php index a99d8210ba..1f446e07d2 100644 --- a/module/integration/model.php +++ b/module/integration/model.php @@ -75,6 +75,10 @@ class integrationModel extends model if(!isset($integration->scheduleDay)) $integration->scheduleDay = array(); $integration->scheduleDay = join(',', $integration->scheduleDay); } + else + { + $integration->scheduleDay = ''; + } $this->dao->insert(TABLE_INTEGRATION)->data($integration) ->batchCheck($this->config->integration->create->requiredFields, 'notempty') @@ -99,7 +103,7 @@ class integrationModel extends model public function update($id) { $oldIntegration = $this->getById($id); - $integration = fixer::input('post') + $integration = fixer::input('post') ->add('editedBy', $this->app->user->account) ->add('editedDate', helper::now()) ->remove('repoType') @@ -109,6 +113,10 @@ class integrationModel extends model if(!isset($integration->scheduleDay)) $integration->scheduleDay = array(); $integration->scheduleDay = join(',', $integration->scheduleDay); } + else + { + $integration->scheduleDay = ''; + } $this->dao->update(TABLE_INTEGRATION)->data($integration) ->batchCheck($this->config->integration->edit->requiredFields, 'notempty') diff --git a/module/integration/view/create.html.php b/module/integration/view/create.html.php index 7056779d96..40becea011 100644 --- a/module/integration/view/create.html.php +++ b/module/integration/view/create.html.php @@ -45,13 +45,10 @@
| repo->module;?> | -
-
- repo->matchComment['module'] as $module => $match):?>
- {$module}->common;?>
-
-
-
+ | repo->selectModule;?> | ++ repo->matchComment['module'] as $module => $match) $modules[$module] = $lang->{$module}->common; + echo html::select('selectModule', $modules, $selectModule, "class='form-control chosen'"); + ?> | +|
|---|---|---|---|---|
| task->common;?> | +repo->module;?> |
+ repo->matchComment['module'] as $module => $match):?>
+
+
+
+
+
+ |
+ ||
| idAB;?> | -+ |
repo->matchComment['id'] as $method => $match):?>
repo->$method;?>
@@ -73,23 +83,24 @@
|
||
| repo->matchComment->exampleLabel;?> | -+ | |||
| + | @@ -102,36 +113,62 @@ | |||