|
|
@ -2635,16 +2635,15 @@ function initTopicbar() { |
|
|
|
}, function(data, textStatus, xhr){ |
|
|
|
}, function(data, textStatus, xhr){ |
|
|
|
if (xhr.responseJSON.status === 'ok') { |
|
|
|
if (xhr.responseJSON.status === 'ok') { |
|
|
|
viewDiv.children(".topic").remove(); |
|
|
|
viewDiv.children(".topic").remove(); |
|
|
|
if (topics.length === 0) { |
|
|
|
if (topics.length) { |
|
|
|
return |
|
|
|
var topicArray = topics.split(","); |
|
|
|
} |
|
|
|
|
|
|
|
var topicArray = topics.split(","); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var last = viewDiv.children("a").last(); |
|
|
|
var last = viewDiv.children("a").last(); |
|
|
|
for (var i=0; i < topicArray.length; i++) { |
|
|
|
for (var i=0; i < topicArray.length; i++) { |
|
|
|
$('<div class="ui green basic label topic" style="cursor:pointer;">'+topicArray[i]+'</div>').insertBefore(last) |
|
|
|
$('<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(); |
|
|
|
viewDiv.show(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).fail(function(xhr){ |
|
|
|
}).fail(function(xhr){ |
|
|
|