diff --git a/module/bug/css/create.css b/module/bug/css/create.css index b826dd7d6e..beee04a958 100644 --- a/module/bug/css/create.css +++ b/module/bug/css/create.css @@ -1,2 +1,10 @@ -.ke-outline .ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;} -#tplBox {padding: 0} +.ke-outline .ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;} + +/* template box */ +#tplBox .list-group-item {padding: 6px 6px;} +#tplBox .list-group-item:hover {background: #f1f1f1} +#tplBox .list-group-item a {color: #333} + +.bootbox-prompt .modal-dialog {width: 500px; margin-top: 10%;} + +#buildBoxActions {padding-left: 15px;} diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 1d073a7142..f86c35c20a 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -42,7 +42,7 @@ function loadAll(productID) if(changeProductConfirmed || firstChoice) { $('#taskIdBox').innerHTML = ''; // Reset the task. - $('#task').chosen({no_results_text: noResultsMatch}); + $('#task').chosen(defaultChosenOptions); loadProductModules(productID); loadProductProjects(productID); loadProductBuilds(productID); @@ -116,7 +116,7 @@ function loadProductBuilds(productID) if(page == 'create') { - $('#buildBox').load(link, function(){ notice(); }); + $('#buildBox').load(link, function(){ notice(); $('#openedBuild').chosen(defaultChosenOptions)}); } else { @@ -219,7 +219,7 @@ function setStories(moduleID, productID) if(!stories) stories = ''; $('#story').replaceWith(stories); $('#story_chosen').remove(); - $("#story").chosen({no_results_text: ''}); + $("#story").chosen(defaultChosenOptions); }); } @@ -233,15 +233,18 @@ function notice() { if($('#openedBuild').find('option').length <= 1) { + var html = ''; if($('#project').val() == '') { - $('#buildBox').append('' + createRelease + ' '); - $('#buildBox').append('' + refresh + ''); + html += '' + createRelease + ' '; + html += '' + refresh + ''; } else { - $('#buildBox').append('' + createBuild + ''); - $('#buildBox').append('' + refresh + ''); + html += '' + createBuild + ''; + html += '' + refresh + ''; } + var $bba = $('#buildBoxActions'); + if($bba.length) $bba.html(html); else $('#buildBox').append(html); } } diff --git a/module/bug/js/create.js b/module/bug/js/create.js index 30b31a9762..625748a38f 100644 --- a/module/bug/js/create.js +++ b/module/bug/js/create.js @@ -49,7 +49,7 @@ KindEditor.plugin('savetemplate', function(K) click: function(id) { content = self.html(); - jPrompt(setTemplateTitle, '','', function(r) + bootbox.prompt(setTemplateTitle, function(r) { if(!r || !content) return; saveTemplateLink = createLink('bug', 'saveTemplate'); @@ -66,9 +66,10 @@ KindEditor.plugin('savetemplate', function(K) /* Set template. */ function setTemplate(templateID) { - $('#tplTitleBox' + templateID).attr('style', 'text-decoration:underline; color:#8B008B'); + $('#tplBox .list-group-item.active').removeClass('active'); + $('#tplTitleBox' + templateID).closest('.list-group-item').addClass('active'); steps = $('#template' + templateID).html(); - editor.html(steps); + editor['#'].html(steps); } /* Delete template. */ diff --git a/module/bug/view/browse.custom.html.php b/module/bug/view/browse.custom.html.php index 06bc8895d4..d80e449b3d 100644 --- a/module/bug/view/browse.custom.html.php +++ b/module/bug/view/browse.custom.html.php @@ -1,10 +1,14 @@
-
icons['product']);?>
- -
- tree->manage);?> +
+
icons['product']);?>
+
+ +
+ tree->manage);?> +
+
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 5d0415fa43..c31a550808 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -66,7 +66,7 @@ js::set('customed', $customed); if($customed) { include './browse.custom.html.php'; - include '../../common/view/footer.lite.html.php'; + include '../../common/view/footer.html.php'; exit; } ?> diff --git a/module/bug/view/buildtemplates.html.php b/module/bug/view/buildtemplates.html.php index f7fbf29b05..7c9f163d54 100644 --- a/module/bug/view/buildtemplates.html.php +++ b/module/bug/view/buildtemplates.html.php @@ -5,9 +5,9 @@ KindEditor.lang({'savetemplate' : 'bug->saveTemplate;?>'}); $template) { - echo "
  • "; - echo $lang->arrow. " $template->title"; - echo "  "; + echo "
  • "; + echo " $template->title"; + echo "  "; echo ""; echo '
  • '; } diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index a0c23c99a7..f0774a8a38 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -14,7 +14,6 @@ include '../../common/view/header.html.php'; include '../../common/view/form.html.php'; include '../../common/view/chosen.html.php'; -include '../../common/view/alert.html.php'; include '../../common/view/kindeditor.html.php'; js::set('holders', $lang->bug->placeholder); js::set('page', 'create'); @@ -35,7 +34,6 @@ js::set('refresh', $lang->refresh); bug->lblProductAndModule;?> -
    @@ -64,6 +62,7 @@ js::set('refresh', $lang->refresh); + bug->lblAssignedTo;?> @@ -77,7 +76,7 @@ js::set('refresh', $lang->refresh); bug->steps;?> - + diff --git a/module/build/control.php b/module/build/control.php index 14b0ed34b8..f255d7efbb 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -212,8 +212,8 @@ class build extends control */ public function ajaxGetProductBuilds($productID, $varName, $build = '', $index = 0) { - if($varName == 'openedBuild' ) die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=select-3 multiple')); - if($varName == 'openedBuilds' ) die(html::select($varName . "[$index][]", $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=select-3 multiple')); + if($varName == 'openedBuild' ) die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=form-control multiple')); + if($varName == 'openedBuilds' ) die(html::select($varName . "[$index][]", $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, 'size=4 class=form-control multiple')); if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty,release'), $build, "class='form-control'")); } @@ -233,7 +233,7 @@ class build extends control if($varName == 'openedBuild') { $builds = $this->build->getProjectBuildPairs($projectID, $productID, 'noempty,release'); - $output = html::select($varName . '[]', $builds , $build, 'size=4 class=select-3 multiple'); + $output = html::select($varName . '[]', $builds , $build, 'size=4 class=form-control multiple'); if(count($builds) == 1 and $needCreate) { $output .= html::a($this->createLink('build', 'create', "projectID=$projectID"), $this->lang->build->create, '_blank'); @@ -241,7 +241,7 @@ class build extends control } die($output); } - if($varName == 'openedBuilds') die(html::select($varName . "[$index][]", $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); + if($varName == 'openedBuilds') die(html::select($varName . "[$index][]", $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=form-control multiple')); if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, "class='form-control'")); if($varName == 'testTaskBuild') die(html::select('build', $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, "class='form-control'")); } diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 34535e388c..ae65ca5f38 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -435,6 +435,7 @@ $lang->icons['app'] = 'th-large'; $lang->icons['results'] = 'flag-checkered'; $lang->icons['create'] = 'plus'; +$lang->icons['post'] = 'edit'; $lang->icons['batchCreate'] = 'plus-sign'; $lang->icons['batchEdit'] = 'edit-sign'; $lang->icons['batchClose'] = 'off'; diff --git a/module/common/view/debug.html.php b/module/common/view/debug.html.php index d882c012e8..ad1e50cc12 100644 --- a/module/common/view/debug.html.php +++ b/module/common/view/debug.html.php @@ -4,7 +4,7 @@ debug;?>
    - +