From e98a0590b7d7c156490abb2bbd524489495cd115 Mon Sep 17 00:00:00 2001 From: Tomas 'Jethro' Pokorny Date: Tue, 3 Nov 2020 22:13:31 +0100 Subject: [PATCH 1/2] treenode_editor | Fixed missing editorMode property. --- vue_frontend/src/components/UlohaVzorakNode.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vue_frontend/src/components/UlohaVzorakNode.vue b/vue_frontend/src/components/UlohaVzorakNode.vue index fef14e21..753a5cef 100644 --- a/vue_frontend/src/components/UlohaVzorakNode.vue +++ b/vue_frontend/src/components/UlohaVzorakNode.vue @@ -35,6 +35,7 @@ export default { item: Object, create: Boolean, showSelect: Boolean, + editorMode: Boolean, }, mounted: function(){ if (this.item.node.uloha === null){ @@ -71,4 +72,4 @@ export default { .upravit { margin-top:-40px; } - \ No newline at end of file + From aa19d67e20cf39b502db25833f804dfad8a0d0cf Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Wed, 4 Nov 2020 00:56:20 +0100 Subject: [PATCH 2/2] archiv | Zobrazovat TreeNode u cisel v archvu. --- seminar/templates/seminar/archiv/cislo.html | 9 +++++++++ vue_frontend/src/components/TreeNodeRoot.vue | 5 +++++ vue_frontend/src/router/index.js | 7 ++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index 80905e00..fd37d16f 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -1,4 +1,5 @@ {% extends "seminar/archiv/base.html" %} +{% load render_bundle from webpack_loader %} {% block content %}
@@ -48,6 +49,14 @@
{% endif %} + +
+ +
+ {% render_bundle 'chunk-vendors' %} + {% render_bundle 'vue_app_01' %} + + {% if cislo.verejna_vysledkovka %}

Výsledkovka

diff --git a/vue_frontend/src/components/TreeNodeRoot.vue b/vue_frontend/src/components/TreeNodeRoot.vue index e62a85b4..20cf47ac 100644 --- a/vue_frontend/src/components/TreeNodeRoot.vue +++ b/vue_frontend/src/components/TreeNodeRoot.vue @@ -31,10 +31,15 @@ export default { }), props:{ tnid: Number, + tnsource: String, editorMode: Boolean, debugMode: Boolean, }, mounted: function() { + if (this.tnsource && this.tnsource=='inline'){ + let data = JSON.parse(document.getElementById('vuedata').textContent); + this.tnid = data.treenode; + } this.getArticles(); this.$root.$on('updateData',(arg) => { console.log(arg); diff --git a/vue_frontend/src/router/index.js b/vue_frontend/src/router/index.js index 6578d459..aead18ba 100644 --- a/vue_frontend/src/router/index.js +++ b/vue_frontend/src/router/index.js @@ -22,7 +22,12 @@ export default new Router({ name: 'treenode_zadani', props: {'tnid': 23}, component: TreeNodeRoot - }, + }, { + path: '/cislo/:cislo', + name: 'treenode_cislo', + props: {'tnsource':'inline'}, + component: TreeNodeRoot + } ] })