Revize 8c360548
Přidáno uživatelem Ondřej Anděl před více než 3 roky(ů)
application/view/modals/editModal.html | ||
---|---|---|
25 | 25 |
</div> |
26 | 26 |
<div class="row my-1"> |
27 | 27 |
<div class="col-xs-12 col-sm-4"> |
28 |
<label> <!--for="manuscript"-->Rukopisy:</label>
|
|
28 |
<label for="manuscript-m">Rukopisy:</label>
|
|
29 | 29 |
</div> |
30 | 30 |
<div class="col-xs-12 col-sm-8"> |
31 |
<!--<select id="manuscript" multiple>
|
|
31 |
<select id="manuscript-m" multiple>
|
|
32 | 32 |
<option value = "0">rukopis Vídeňský</option> |
33 | 33 |
<option value = "1">zlomky Hanušovy</option> |
34 | 34 |
<option value = "2">zlomky Hradecké</option> |
... | ... | |
45 | 45 |
<option value = "13">rukopis Zebererův</option> |
46 | 46 |
<option value = "14">vydání Pavla Ješína z Bezdězi, Praha 1620</option> |
47 | 47 |
<option value = "15">básně připsané při Pulkavově kronice v rukopisu Litoměřickém</option> |
48 |
</select>TODO-->
|
|
48 |
</select> |
|
49 | 49 |
</div> |
50 | 50 |
</div> |
51 | 51 |
<div class="row my-1"> |
... | ... | |
291 | 291 |
const button = $(event.relatedTarget); |
292 | 292 |
const pseudo_id = button.data('pseudo-id');// Extract info from data-* attributes |
293 | 293 |
const title = button.data('title');// Extract info from data-* attributes |
294 |
let manuSelect = new vanillaSelectBox("#manuscript"); |
|
294 |
$('#manuscript-m').multiSelect({ |
|
295 |
'noneText': 'Nevybráno', |
|
296 |
}); |
|
295 | 297 |
|
296 | 298 |
let modal = $(this); |
297 | 299 |
modal.find('.modal-title').text(title); |
... | ... | |
544 | 546 |
const staticFields = [ |
545 | 547 |
"#word", |
546 | 548 |
"#lemma", |
547 |
"#manuscript", |
|
549 |
"#manuscript-m",
|
|
548 | 550 |
"#position", |
549 | 551 |
"#namedentity", |
550 | 552 |
"#context", |
... | ... | |
584 | 586 |
|
585 | 587 |
modal.find("#word").val(data.word); |
586 | 588 |
modal.find("#lemma").val(data.lemma.lemma); |
587 |
modal.find("#manuscript").val(data.manuscript); |
|
589 |
modal.find("#manuscript-m").val(data.manuscript);
|
|
588 | 590 |
|
589 | 591 |
//dynamic setting |
590 | 592 |
const morphem = data.tag.tag; |
... | ... | |
648 | 650 |
|
649 | 651 |
formData.append("word", modal.find("#word")[0].value); |
650 | 652 |
formData.append("lemma", modal.find("#lemma")[0].value); |
651 |
//TODO formData.append("manuscript", modal.find("#manuscript")[0].value);
|
|
653 |
formData.append("manuscript", modal.find("#manuscript-m")[0].value);
|
|
652 | 654 |
formData.append("context", modal.find("#context")[0].value); |
653 | 655 |
|
654 | 656 |
//morphem creation |
... | ... | |
715 | 717 |
|
716 | 718 |
formData.append("finished", false); |
717 | 719 |
|
718 |
/* TODO connect to the proper controller
|
|
720 |
/* TODO create with merge
|
|
719 | 721 |
var xhr = new XMLHttpRequest(); |
720 |
xhr.open("POST", "../controller/UpdateController.php");
|
|
722 |
xhr.open("POST", "../controller/InsertController.php");
|
|
721 | 723 |
xhr.send(formData); |
722 | 724 |
*/ |
723 | 725 |
} |
Také k dispozici: Unified diff
Feature #8350: Vytvoření modalů detailu a editu - multiselect fix