diff --git a/src/web/app/common/tags/poll-editor.tag b/src/web/app/common/tags/poll-editor.tag index 9d9b28c76..447486ec8 100644 --- a/src/web/app/common/tags/poll-editor.tag +++ b/src/web/app/common/tags/poll-editor.tag @@ -90,27 +90,32 @@ this.oninput = (i, e) => { this.choices[i] = e.target.value; - } + }; this.add = () => { this.choices.push(''); this.update(); this.refs.choices.childNodes[this.choices.length - 1].childNodes[0].focus(); - } + }; this.remove = (i) => { this.choices = this.choices.filter((_, _i) => _i != i); this.update(); - } + }; this.destroy = () => { this.opts.ondestroy(); - } + }; this.get = () => { return { choices: this.choices.filter(choice => choice != '') } - } + }; + + this.set = data => { + if (data.choices.length == 0) return; + this.choices = data.choices; + }; diff --git a/src/web/app/common/tags/poll.tag b/src/web/app/common/tags/poll.tag index 6ddaf7759..ce6460bce 100644 --- a/src/web/app/common/tags/poll.tag +++ b/src/web/app/common/tags/poll.tag @@ -78,9 +78,9 @@ this.toggleResult = () => { this.result = !this.result; - } + }; - this.vote = (id) => { + this.vote = id => { if (this.poll.choices.some(c => c.is_voted)) return; this.api('posts/polls/vote', { post_id: this.post.id, @@ -99,6 +99,6 @@ total: this.total + 1 }); }); - } + }; diff --git a/src/web/app/desktop/tags/post-form-window.tag b/src/web/app/desktop/tags/post-form-window.tag index 4f2ea2538..956e83ac6 100644 --- a/src/web/app/desktop/tags/post-form-window.tag +++ b/src/web/app/desktop/tags/post-form-window.tag @@ -1,13 +1,19 @@ - 新規投稿返信添付: { parent.files.length }ファイル{ parent.uploadingFiles.length }個のファイルをアップロード中 - - -
- -
-
- -
+ + + 新規投稿 + 返信 + 添付: { parent.files.length }ファイル + { parent.uploadingFiles.length }個のファイルをアップロード中 + + +
+ +
+
+ +
+