Revize c2873e44
Přidáno uživatelem Ondřej Anděl před více než 3 roky(ů)
application/view/modals/detailModal.html | ||
---|---|---|
137 | 137 |
<i id="mood"></i> |
138 | 138 |
</div> |
139 | 139 |
</div> |
140 |
<div class="row" id="irregular-wrapper"> |
|
141 |
<div class="col-xs-12 col-sm-4"> |
|
142 |
<label>Neurčitý slovesný tvar:</label> |
|
143 |
</div> |
|
144 |
<div class="col-xs-12 col-sm-8"> |
|
145 |
<i id="irregular"></i> |
|
146 |
</div> |
|
147 |
</div> |
|
140 | 148 |
<div class="row" id="person-wrapper"> |
141 | 149 |
<div class="col-xs-12 col-sm-4"> |
142 | 150 |
<label>Osoba:</label> |
... | ... | |
225 | 233 |
modal.find('#k-type-wrapper').hide(); |
226 | 234 |
modal.find('#type-wrapper').hide(); |
227 | 235 |
modal.find('#mood-wrapper').hide(); |
236 |
modal.find('#irregular-wrapper').hide(); |
|
228 | 237 |
} else { |
229 | 238 |
if(morphem.charAt(0) === 'J') { |
230 | 239 |
modal.find('#mood-wrapper').hide(); |
231 | 240 |
modal.find('#type-wrapper').hide(); |
241 |
modal.find('#irregular-wrapper').hide(); |
|
232 | 242 |
|
233 | 243 |
modal.find('#k-type-wrapper').show(); |
234 | 244 |
modal.find('#k-type').text(codeToKType[morphem.charAt(7)]); |
235 | 245 |
} else if(morphem.charAt(0) === 'P') { |
236 | 246 |
modal.find('#k-type-wrapper').hide(); |
237 | 247 |
modal.find('#mood-wrapper').hide(); |
248 |
modal.find('#irregular-wrapper').hide(); |
|
238 | 249 |
|
239 | 250 |
modal.find('#type-wrapper').show(); |
240 | 251 |
modal.find('#type').text(codeToType[morphem.charAt(7)]); |
... | ... | |
242 | 253 |
modal.find('#k-type-wrapper').hide(); |
243 | 254 |
modal.find('#type-wrapper').hide(); |
244 | 255 |
|
245 |
modal.find('#mood-wrapper').show(); |
|
246 |
modal.find('#mood').text(codeToMood[morphem.charAt(7)]); |
|
256 |
if(codeToMood[morphem.charAt(7)] !== undefined){ |
|
257 |
modal.find('#irregular-wrapper').hide(); |
|
258 |
modal.find('#mood-wrapper').show(); |
|
259 |
modal.find('#mood').text(codeToMood[morphem.charAt(7)]); |
|
260 |
} else { |
|
261 |
modal.find('#mood-wrapper').hide(); |
|
262 |
modal.find('#irregular-wrapper').show(); |
|
263 |
modal.find('#irregular').text(codeToIrregular[morphem.charAt(7)]); |
|
264 |
} |
|
247 | 265 |
} else { |
248 | 266 |
modal.find('#k-type-wrapper').hide(); |
249 | 267 |
modal.find('#type-wrapper').hide(); |
250 | 268 |
modal.find('#mood-wrapper').hide(); |
269 |
modal.find('#irregular-wrapper').hide(); |
|
251 | 270 |
} |
252 | 271 |
} |
253 | 272 |
|
... | ... | |
400 | 419 |
}; |
401 | 420 |
|
402 | 421 |
const codeToMood = { |
403 |
"f": "Infinitiv", |
|
404 | 422 |
"d": "Indikativ", |
405 | 423 |
"i": "Imperativ", |
406 |
"c": "Kondicionál", |
|
424 |
"c": "Kondicionál" |
|
425 |
}; |
|
426 |
|
|
427 |
const codeToIrregular = { |
|
428 |
"f": "Infinitiv", |
|
407 | 429 |
"S": "Supinum", |
408 | 430 |
"e": "Přech. přítomný", |
409 | 431 |
"m": "Přech. minulý", |
application/view/searchContent.php | ||
---|---|---|
91 | 91 |
false, |
92 | 92 |
false, |
93 | 93 |
false, |
94 |
false, |
|
94 | 95 |
false |
95 | 96 |
]); |
96 | 97 |
break; |
... | ... | |
107 | 108 |
false, |
108 | 109 |
false, |
109 | 110 |
false, |
111 |
false, |
|
110 | 112 |
false |
111 | 113 |
]); |
112 | 114 |
break; |
... | ... | |
123 | 125 |
false, |
124 | 126 |
false, |
125 | 127 |
false, |
128 |
false, |
|
126 | 129 |
false |
127 | 130 |
]); |
128 | 131 |
break; |
... | ... | |
139 | 142 |
false, |
140 | 143 |
false, |
141 | 144 |
false, |
145 |
false, |
|
142 | 146 |
false |
143 | 147 |
]); |
144 | 148 |
break; |
... | ... | |
155 | 159 |
true, |
156 | 160 |
true, |
157 | 161 |
true, |
162 |
true, |
|
158 | 163 |
false |
159 | 164 |
]); |
160 | 165 |
break; |
... | ... | |
171 | 176 |
false, |
172 | 177 |
false, |
173 | 178 |
false, |
179 |
false, |
|
174 | 180 |
false |
175 | 181 |
]); |
176 | 182 |
break; |
... | ... | |
187 | 193 |
false, |
188 | 194 |
false, |
189 | 195 |
false, |
196 |
false, |
|
190 | 197 |
false |
191 | 198 |
]); |
192 | 199 |
break; |
... | ... | |
203 | 210 |
false, |
204 | 211 |
false, |
205 | 212 |
false, |
213 |
false, |
|
206 | 214 |
true |
207 | 215 |
]); |
208 | 216 |
break; |
... | ... | |
219 | 227 |
false, |
220 | 228 |
false, |
221 | 229 |
false, |
230 |
false, |
|
222 | 231 |
false |
223 | 232 |
]); |
224 | 233 |
break; |
... | ... | |
235 | 244 |
false, |
236 | 245 |
false, |
237 | 246 |
false, |
247 |
false, |
|
238 | 248 |
false |
239 | 249 |
]); |
240 | 250 |
break; |
... | ... | |
251 | 261 |
false, |
252 | 262 |
false, |
253 | 263 |
false, |
264 |
false, |
|
254 | 265 |
false |
255 | 266 |
]); |
256 | 267 |
break; |
... | ... | |
266 | 277 |
"filter-grade", |
267 | 278 |
"filter-type", |
268 | 279 |
"filter-mood", |
280 |
"filter-irregular", |
|
269 | 281 |
"filter-person", |
270 | 282 |
"filter-time", |
271 | 283 |
"filter-vid", |
... | ... | |
347 | 359 |
<label for="mood" class="mr-2">Způsob</label> |
348 | 360 |
<select id="mood"> |
349 | 361 |
<option selected="selected" value = "">Nevybráno</option> |
350 |
<option value = "f">Infinitiv</option> |
|
351 | 362 |
<option value = "d">Indikativ</option> |
352 | 363 |
<option value = "i">Imperativ</option> |
353 | 364 |
<option value = "c">Kondicionál</option> |
365 |
</select> |
|
366 |
</div> |
|
367 |
<div class="mr-3" id="filter-irregular"> |
|
368 |
<label for="irregular" class="mr-2">Neurčitý slovesný tvar</label> |
|
369 |
<select id="irregular"> |
|
370 |
<option selected="selected" value = "">Nevybráno</option> |
|
371 |
<option value = "f">Infinitiv</option> |
|
354 | 372 |
<option value = "S">Supinum</option> |
355 | 373 |
<option value = "e">Přech. přítomný</option> |
356 | 374 |
<option value = "m">Přech. minulý</option> |
... | ... | |
459 | 477 |
if(pos === "P"){ |
460 | 478 |
formData.append("tag_sentence", document.getElementById("type").value); |
461 | 479 |
} else if(pos === "V"){ |
462 |
formData.append("tag_sentence", document.getElementById("mood").value); |
|
480 |
const mood = document.getElementById("mood").value; |
|
481 |
if(mood !== ""){ |
|
482 |
formData.append("tag_sentence", mood); |
|
483 |
} else { |
|
484 |
formData.append("tag_sentence", document.getElementById("irregular").value); |
|
485 |
} |
|
463 | 486 |
} else if(pos === "J"){ |
464 | 487 |
formData.append("tag_sentence", document.getElementById("k-type").value); |
465 | 488 |
} |
Také k dispozici: Unified diff
Bug #8528: Rozdělení položky způsob