|
@ -16,14 +16,14 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-if="item.children.length === 0"> |
|
|
<div v-if="item.children.length === 0"> |
|
|
<div v-if="item.appendable_children.length > 0" :class="editorMode ? 'org' : 'schovat'"> |
|
|
<div v-if="item.appendable_children.length > 0 && editorMode"> |
|
|
<b>Vložit jako syna: </b> |
|
|
<b>Vložit jako syna: </b> |
|
|
<addnewnode :types="item.appendable_children" :refnode="item.node" where="syn" /> |
|
|
<addnewnode :types="item.appendable_children" :refnode="item.node" where="syn" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-else :class="editorMode ? 'children-org' : 'children'"> <!-- bude tu nějaký if na class="children" --> |
|
|
<div v-else :class="editorMode ? 'children-org' : 'children'"> <!-- bude tu nějaký if na class="children" --> |
|
|
<div v-if="item.children.length > 0 && item.children[0].appendable_siblings.length > 0" :class="editorMode ? 'org' : 'schovat'"> |
|
|
<div v-if="item.children.length > 0 && item.children[0].appendable_siblings.length > 0 && editorMode"> |
|
|
<b>Vložit před: </b> |
|
|
<b>Vložit před: </b> |
|
|
<addnewnode :types="item.children[0].appendable_siblings" :refnode="item.children[0].node" where="pred" /> |
|
|
<addnewnode :types="item.children[0].appendable_siblings" :refnode="item.children[0].node" where="pred" /> |
|
|
</div> |
|
|
</div> |
|
@ -33,7 +33,8 @@ |
|
|
<!--Hide: {{hideNode(chld)}}, v tematu: {{v_tematu}}, force_visible: {{force_visible}}--> |
|
|
<!--Hide: {{hideNode(chld)}}, v tematu: {{v_tematu}}, force_visible: {{force_visible}}--> |
|
|
<div v-if="!hideNode(chld)"> |
|
|
<div v-if="!hideNode(chld)"> |
|
|
<div v-if="chld.node.polymorphic_ctype.model==='ulohazadaninode'"> |
|
|
<div v-if="chld.node.polymorphic_ctype.model==='ulohazadaninode'"> |
|
|
<button v-on:click="showChildren=!showChildren"> Tady možná něco je </button> |
|
|
<button v-if="showChildren" v-on:click="showChildren=!showChildren"> Schovat </button> |
|
|
|
|
|
<button v-else v-on:click="showChildren=!showChildren"> Rozbalit </button> |
|
|
<TreeNode :item="chld" :v_tematu="true" |
|
|
<TreeNode :item="chld" :v_tematu="true" |
|
|
:force_visible="showChildren" |
|
|
:force_visible="showChildren" |
|
|
:editorMode="editorMode" |
|
|
:editorMode="editorMode" |
|
@ -47,14 +48,15 @@ |
|
|
:debugMode="debugMode"> |
|
|
:debugMode="debugMode"> |
|
|
</TreeNode> |
|
|
</TreeNode> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="chld.appendable_siblings.length > 0" :class="editorMode ? 'org' : 'schovat'" > |
|
|
<div v-if="chld.appendable_siblings.length > 0 && editorMode" > |
|
|
<b v-if="index < (item.children.length - 1)">Vložit mezi: </b> |
|
|
<b v-if="index < (item.children.length - 1)">Vložit mezi: </b> |
|
|
<b v-else>Vložit za: </b> |
|
|
<b v-else>Vložit za: </b> |
|
|
<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" /> |
|
|
<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<button v-on:click="showChildren=!showChildren"> Tady možná něco je </button> |
|
|
<button v-if="showChildren" v-on:click="showChildren=!showChildren"> Schovat </button> |
|
|
|
|
|
<button v-else v-on:click="showChildren=!showChildren"> Rozbalit </button> |
|
|
</div> |
|
|
</div> |
|
|
<div v-else> |
|
|
<div v-else> |
|
|
<div v-for="(chld, index) in item.children" v-bind:key="chld.nazev" > |
|
|
<div v-for="(chld, index) in item.children" v-bind:key="chld.nazev" > |
|
@ -73,7 +75,7 @@ |
|
|
:debugMode="debugMode"> |
|
|
:debugMode="debugMode"> |
|
|
</TreeNode> |
|
|
</TreeNode> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="chld.appendable_siblings.length > 0" :class="editorMode ? 'org' : 'schovat'" > |
|
|
<div v-if="chld.appendable_siblings.length > 0 && editorMode" > |
|
|
<b v-if="index < (item.children.length - 1)">Vložit mezi: </b> |
|
|
<b v-if="index < (item.children.length - 1)">Vložit mezi: </b> |
|
|
<b v-else>Vložit za: </b> |
|
|
<b v-else>Vložit za: </b> |
|
|
<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" /> |
|
|
<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" /> |
|
@ -110,8 +112,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data: () => ({ |
|
|
data: () => ({ |
|
|
debugShow: false, |
|
|
debugShow: false, |
|
|
showChildren: false, |
|
|
showChildren: false |
|
|
editorMode: false |
|
|
|
|
|
}), |
|
|
}), |
|
|
computed: { |
|
|
computed: { |
|
|
}, |
|
|
}, |
|
@ -153,16 +154,8 @@ export default { |
|
|
border: #6a0043 2px dashed; |
|
|
border: #6a0043 2px dashed; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.mam-org-only { |
|
|
|
|
|
margin: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nodebug { |
|
|
.nodebug { |
|
|
/* display: none; */ |
|
|
/* display: none; */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.schovat { |
|
|
|
|
|
display: none |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|