summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/js/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 61b774b1fe..a3ff42705a 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -123,10 +123,10 @@ function initCommentForm() {
}
}
- var labelIds = "";
+ var labelIds = [];
$(this).parent().find('.item').each(function () {
if ($(this).hasClass('checked')) {
- labelIds += $(this).data('id') + ",";
+ labelIds.push($(this).data('id'));
$($(this).data('id-selector')).removeClass('hide');
} else {
$($(this).data('id-selector')).addClass('hide');
@@ -137,7 +137,7 @@ function initCommentForm() {
} else {
$noSelect.addClass('hide');
}
- $($(this).parent().data('id')).val(labelIds);
+ $($(this).parent().data('id')).val(labelIds.join(","));
return false;
});
$labelMenu.find('.no-select.item').click(function () {