|
|
@ -1,12 +1,9 @@ |
|
|
|
<template> |
|
|
|
<details> |
|
|
|
|
|
|
|
<!-- následující řádek nefunguje, protože summary musí být první tag v details --> |
|
|
|
<!-- <div class="treenode-org"> bude tu nějaký if na class="treenode" --> |
|
|
|
|
|
|
|
<summary> |
|
|
|
<div class="treenode-org"> |
|
|
|
<b v-if="v_tematku">ubvoueab</b> |
|
|
|
<component :is='item.node.polymorphic_ctype.model' :item='item' :key='item.node.id'></component> |
|
|
|
</summary> |
|
|
|
|
|
|
|
|
|
|
|
<button v-on:click="debugShow = !debugShow" class="nodebug">Ladící data</button> <!-- bude tu nějaký if na class="nodebug", v debug módu bude tlačítko vidět, jinak ne --> |
|
|
|
<div v-if="debugShow"> |
|
|
@ -28,7 +25,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-for="(chld, index) in item.children" v-bind:key="chld.nazev" > |
|
|
|
<TreeNode :item="chld"> |
|
|
|
<TreeNode :item="chld" :v_tematku="item.node.polymorphic_ctype.model==='temavcislenode'||v_tematku"> |
|
|
|
</TreeNode> |
|
|
|
<div v-if="chld.appendable_siblings.length > 0" class="mam-org-only" > |
|
|
|
<b v-if="index < (item.children.length - 1)">Vložit mezi: </b> |
|
|
@ -38,7 +35,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</details> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
@ -68,7 +64,9 @@ export default { |
|
|
|
debugShow: false, |
|
|
|
}), |
|
|
|
props: { |
|
|
|
item: Object |
|
|
|
item: Object, |
|
|
|
visible: Boolean, |
|
|
|
v_tematku: Boolean |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
@ -76,13 +74,13 @@ export default { |
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
.treenode-org { |
|
|
|
padding: 5px; |
|
|
|
margin: 5px; |
|
|
|
border: #6a0043 2px dashed; |
|
|
|
border: #6a0043 2px solid; |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
.children-org { |
|
|
|
padding: 10px; |
|
|
@ -98,16 +96,4 @@ export default { |
|
|
|
/* display: none; */ |
|
|
|
} |
|
|
|
|
|
|
|
/* jsou potřeba obě verze, jedna funguje pro chrome a druhá pro firefox */ |
|
|
|
details > summary:first-of-type { |
|
|
|
list-style-type: none; |
|
|
|
} |
|
|
|
details summary::-webkit-details-marker { |
|
|
|
display:none; |
|
|
|
} |
|
|
|
|
|
|
|
details summary { |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|