From 43d42508c470bdfa6b1eaa8539731bc9049ddf14 Mon Sep 17 00:00:00 2001 From: hylom Date: Thu, 2 Mar 2017 22:50:22 +0900 Subject: [PATCH] js: fix some codes not working well in vuejs 2.x --- src/newslash_web/public/js/article-item.js | 10 +++++++--- src/newslash_web/public/js/content-editor.js | 3 +++ src/newslash_web/templates/journal/editor.html.tt2 | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/newslash_web/public/js/article-item.js b/src/newslash_web/public/js/article-item.js index 2bf62d2e..1c04114a 100644 --- a/src/newslash_web/public/js/article-item.js +++ b/src/newslash_web/public/js/article-item.js @@ -3,11 +3,15 @@ var articleItem = {}; articleItem.run = function run() { Vue.component('article-item', { template: '#article-item', + data: function () { + return { + topicIconURL: "", + editable: 0, + url: "", + }; + }, props: { item: {}, - topicIconURL: "", - editable: 0, - url: "", }, computed: { topicIconURL: function () { diff --git a/src/newslash_web/public/js/content-editor.js b/src/newslash_web/public/js/content-editor.js index 5bfa9857..391f3b7f 100644 --- a/src/newslash_web/public/js/content-editor.js +++ b/src/newslash_web/public/js/content-editor.js @@ -10,6 +10,9 @@ contentEditor.run = function run(params) { introtext: "", bodytext: "", title: "", + commentstatus: "enabled", + submissioncopy: 0, + previewIntro: "", previewBody: "", previewTitle: "", diff --git a/src/newslash_web/templates/journal/editor.html.tt2 b/src/newslash_web/templates/journal/editor.html.tt2 index bafeac22..b5bcefba 100644 --- a/src/newslash_web/templates/journal/editor.html.tt2 +++ b/src/newslash_web/templates/journal/editor.html.tt2 @@ -1,5 +1,5 @@ -
+

-- 2.11.0