Revize 4f8f0fb8
Přidáno uživatelem Milan Vacek před téměř 4 roky(ů)
application/view/modals/editModal.html | ||
---|---|---|
9 | 9 |
<div class="container"> |
10 | 10 |
<div class="row my-1"> |
11 | 11 |
<div class="col-xs-12 col-sm-4"> |
12 |
<label for="lemma">Lemma: <b class="required">*</b></label> |
|
12 |
<label for="lemma_edit">Lemma: <b class="required">*</b></label>
|
|
13 | 13 |
</div> |
14 | 14 |
<div class="col-xs-12 col-sm-8"> |
15 |
<input class="min-wdth" id="lemma"/> |
|
15 |
<input class="min-wdth" id="lemma_edit"/>
|
|
16 | 16 |
</div> |
17 | 17 |
</div> |
18 | 18 |
<div class="row my-1"> |
... | ... | |
82 | 82 |
</div> |
83 | 83 |
<div class="row my-1"> |
84 | 84 |
<div class="col-xs-12 col-sm-4"> |
85 |
<label for="description2">Poznámka 2:</label> |
|
85 |
<label for="description2_edit">Poznámka 2:</label>
|
|
86 | 86 |
</div> |
87 | 87 |
<div class="col-xs-12 col-sm-8"> |
88 |
<input class="min-wdth" id="description2"/> |
|
88 |
<input class="min-wdth" id="description2_edit"/>
|
|
89 | 89 |
</div> |
90 | 90 |
</div> |
91 | 91 |
<div class="row my-1"> |
... | ... | |
331 | 331 |
modal.find('#submit-but').click(() => createData(modal)); |
332 | 332 |
|
333 | 333 |
enableSubmit(modal); |
334 |
modal.find("#lemma").change(() => enableSubmit(modal)); |
|
334 |
modal.find("#lemma_edit").change(() => enableSubmit(modal));
|
|
335 | 335 |
modal.find("#word").change(() => enableSubmit(modal)); |
336 | 336 |
modal.find("#position").change(() => enableSubmit(modal)); |
337 | 337 |
modal.find("#wordclass").change(() => enableSubmit(modal)); |
... | ... | |
346 | 346 |
irregularMChange(modal); |
347 | 347 |
|
348 | 348 |
enableSubmit(modal); |
349 |
modal.find("#lemma").change(() => enableSubmit(modal)); |
|
349 |
modal.find("#lemma_edit").change(() => enableSubmit(modal));
|
|
350 | 350 |
modal.find("#word").change(() => enableSubmit(modal)); |
351 | 351 |
modal.find("#position").change(() => enableSubmit(modal)); |
352 | 352 |
modal.find("#wordclass").change(() => enableSubmit(modal)); |
... | ... | |
582 | 582 |
|
583 | 583 |
const staticFields = [ |
584 | 584 |
"#word", |
585 |
"#lemma", |
|
585 |
"#lemma_edit",
|
|
586 | 586 |
"#manuscript-m", |
587 | 587 |
"#position", |
588 | 588 |
"#namedentity", |
589 | 589 |
"#context", |
590 | 590 |
"#description", |
591 |
"#description2", |
|
591 |
"#description2_edit",
|
|
592 | 592 |
"#description3", |
593 | 593 |
"#wordclass" |
594 | 594 |
]; |
... | ... | |
618 | 618 |
if(data !== null){ |
619 | 619 |
modal.find("#context").val(data.context); |
620 | 620 |
modal.find("#description").val(data.description); |
621 |
modal.find("#description2").val(data.description2);
|
|
621 |
modal.find("#description2_edit").val(data.description2_edit);
|
|
622 | 622 |
modal.find("#description3").val(data.description3); |
623 | 623 |
modal.find("#namedentity").prop('checked', data.namedentity === 1); |
624 | 624 |
|
... | ... | |
628 | 628 |
modal.find("#position").val(position); |
629 | 629 |
|
630 | 630 |
modal.find("#word").val(data.word); |
631 |
modal.find("#lemma").val(data.lemma.lemma); |
|
631 |
modal.find("#lemma_edit").val(data.lemma.lemma);
|
|
632 | 632 |
modal.find("#manuscript-m").val(data.manuscript);//TODO not sure if this one works... kinda does what it wants |
633 | 633 |
|
634 | 634 |
//dynamic setting |
... | ... | |
664 | 664 |
|
665 | 665 |
function enableSubmit(modal) { |
666 | 666 |
if ( |
667 |
modal.find("#lemma")[0].value === "" || |
|
667 |
modal.find("#lemma_edit")[0].value === "" ||
|
|
668 | 668 |
modal.find("#word")[0].value === "" || |
669 | 669 |
modal.find("#position")[0].value === "" || |
670 | 670 |
modal.find("#wordclass")[0].value === "" |
... | ... | |
703 | 703 |
formData.append("positiondetail", (position[2] !== undefined) ? position[2] : ""); |
704 | 704 |
|
705 | 705 |
formData.append("word", modal.find("#word")[0].value); |
706 |
formData.append("lemma", modal.find("#lemma")[0].value); |
|
706 |
formData.append("lemma", modal.find("#lemma_edit")[0].value);
|
|
707 | 707 |
|
708 | 708 |
//this is to get data from manuscript --> possible better? |
709 | 709 |
var elements = modal.find("#manuscript-m").data('multiSelectContainer').find('input:checked'); |
... | ... | |
717 | 717 |
formData.append("manuscript", ms_value.join()); |
718 | 718 |
formData.append("context", modal.find("#context")[0].value); |
719 | 719 |
formData.append("description", modal.find("#description")[0].value); |
720 |
formData.append("description2", modal.find("#description2")[0].value); |
|
720 |
formData.append("description2", modal.find("#description2_edit")[0].value);
|
|
721 | 721 |
formData.append("description3", modal.find("#description3")[0].value); |
722 | 722 |
|
723 | 723 |
//morphem creation |
Také k dispozici: Unified diff
Enhancement #8640 Testování a oprava jednotlivých funkcionalit aplikace