práce na stylování treenode jen zobrazování
This commit is contained in:
		
							parent
							
								
									2f3a83d2ef
								
							
						
					
					
						commit
						ffe3e8256f
					
				
					 3 changed files with 11 additions and 18 deletions
				
			
		|  | @ -7,7 +7,7 @@ | |||
| 			<button v-on:click="currentText = originalText;editorShow=!editorShow;">Zahodit úpravy</button> | ||||
| 		</div> | ||||
| 		<div v-else> | ||||
| 		<h4>{{ currentText }} </h4> <button v-on:click="editorShow=!editorShow">Upravit</button> | ||||
| 		<h4>{{ currentText }} </h4> <button v-if="editorMode" v-on:click="editorShow=!editorShow">Upravit</button> | ||||
| 		</div> | ||||
| 	</div> | ||||
| </template> | ||||
|  |  | |||
|  | @ -16,14 +16,14 @@ | |||
| 	</div> | ||||
| 
 | ||||
| 	<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> | ||||
| 			<addnewnode :types="item.appendable_children" :refnode="item.node" where="syn" /> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 
 | ||||
| 	<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> | ||||
| 			<addnewnode :types="item.children[0].appendable_siblings" :refnode="item.children[0].node" where="pred" />  | ||||
| 		</div> | ||||
|  | @ -33,7 +33,8 @@ | |||
| 					<!--Hide: {{hideNode(chld)}}, v tematu: {{v_tematu}}, force_visible: {{force_visible}}--> | ||||
| 					<div v-if="!hideNode(chld)"> | ||||
| 						<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" | ||||
| 									:force_visible="showChildren" | ||||
| 									:editorMode="editorMode" | ||||
|  | @ -47,14 +48,15 @@ | |||
| 									:debugMode="debugMode"> | ||||
| 							</TreeNode> | ||||
| 						</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-else>Vložit za: </b> | ||||
| 							<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" />  | ||||
| 						</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 v-else> | ||||
| 				<div v-for="(chld, index) in item.children" v-bind:key="chld.nazev" > | ||||
|  | @ -73,7 +75,7 @@ | |||
| 								:debugMode="debugMode"> | ||||
| 						</TreeNode> | ||||
| 					</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-else>Vložit za: </b> | ||||
| 						<addnewnode :types="chld.appendable_siblings" :refnode="chld.node" where="za" />  | ||||
|  | @ -110,8 +112,7 @@ export default { | |||
| 	}, | ||||
| 	data: () => ({ | ||||
| 		debugShow: false, | ||||
| 		showChildren: false, | ||||
| 		editorMode: false | ||||
| 		showChildren: false | ||||
| 	}), | ||||
| 	computed: { | ||||
| 	}, | ||||
|  | @ -153,16 +154,8 @@ export default { | |||
|   border: #6a0043 2px dashed; | ||||
| } | ||||
| 
 | ||||
| .mam-org-only { | ||||
| 	margin: 4px; | ||||
| } | ||||
| 
 | ||||
| .nodebug { | ||||
| 	/* display: none; */ | ||||
| } | ||||
| 
 | ||||
| .schovat { | ||||
| 	display: none | ||||
| } | ||||
| 
 | ||||
| </style> | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
| 	<div class="ulohavzoraknode"> | ||||
| 		<!--pre>UlohaVzorakNode {{item}} {{typeof(item)}}</pre--> | ||||
| 		<h5>Řešení {{item.node.uloha.cislo_zadani.poradi}}.{{ item.node.uloha.kod }}: {{ item.node.uloha.nazev }}</h5> | ||||
| 		<button v-on:click="showSelect=!showSelect" class="upravit">Upravit</button> | ||||
| 		<button v-if="editorMode" v-on:click="showSelect=!showSelect" class="upravit">Upravit</button> | ||||
| 		<div v-if="showSelect"> | ||||
| 			<form class="searchForm" v-on:submit.prevent="submitSearch"> | ||||
| 				<input type="text" v-model="searchQuery" placeholder="Napište název" @keyup="submitSearch"> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Kateřina Č
						Kateřina Č