Fix: Issues cannot be created with labels (#622)

Signed-off-by: Kazuki Sawada <kazuki@6715.jp>
This commit is contained in:
Kazuki Sawada 2017-01-10 22:57:03 +09:00 committed by Lunny Xiao
parent 742f2c0301
commit e5620f07a4
1 changed files with 3 additions and 3 deletions

View File

@ -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 () {