summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/js/index.js15
-rw-r--r--templates/repo/home.tmpl2
2 files changed, 8 insertions, 9 deletions
diff --git a/public/js/index.js b/public/js/index.js
index c69cb753d4..810d835340 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2635,16 +2635,15 @@ function initTopicbar() {
}, function(data, textStatus, xhr){
if (xhr.responseJSON.status === 'ok') {
viewDiv.children(".topic").remove();
- if (topics.length === 0) {
- return
- }
- var topicArray = topics.split(",");
+ if (topics.length) {
+ var topicArray = topics.split(",");
- var last = viewDiv.children("a").last();
- for (var i=0; i < topicArray.length; i++) {
- $('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
+ var last = viewDiv.children("a").last();
+ for (var i=0; i < topicArray.length; i++) {
+ $('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last)
+ }
}
- editDiv.css('display', 'none'); // hide Semantic UI Grid
+ editDiv.css('display', 'none');
viewDiv.show();
}
}).fail(function(xhr){
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 72c0e47ed7..5a08a95ad4 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -41,7 +41,7 @@
</div>
</div>
<div class="two wide column">
- <a class="ui compact button primary" href="javascript:;" id="save_topic"
+ <a class="ui button primary" href="javascript:;" id="save_topic"
data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
</div>
</div>