diff --git a/entries/static/entries/js/components/LexicalUnitDisplay.js b/entries/static/entries/js/components/LexicalUnitDisplay.js index 98af15685d26ed6117fc7c590a33689e6b946107..d4d5244665f9e649fcac216ef6831e4b8d96b527 100644 --- a/entries/static/entries/js/components/LexicalUnitDisplay.js +++ b/entries/static/entries/js/components/LexicalUnitDisplay.js @@ -129,42 +129,42 @@ export default { setup () { $('#lexical-unit-notes').html(''); - get_entry(this.entryId, false, this.lexicalUnitId).then(entry => { - this.frame = entry.frames[0]; - this.unifiedFrame = entry.unified_frame; - this.subentries = entry.subentries; - this.alternations = entry.alternations; - this.realisation_phrases = entry.realisation_phrases; - this.realisation_descriptions = entry.realisation_descriptions; - this.examples = entry.examples; - setup_notes($('#lexical-unit-notes'), $('#lexical-unit-notes-template'), this.lexicalUnitId, 'meanings.LexicalUnit', this.setup_notes); - }); - - // var data = { 'entry' : this.entryId, 'no_filters' : false, 'lexical_unit_id': this.lexicalUnitId }; - // $.ajax({ - // type : 'post', - // url : '/' + lang + '/entries/get_entry/', - // dataType : 'json', - // data : data, - // timeout : 60000, - // success : function(response) { - // - // window.clear_info(); - // this.frame = response.frames[0]; - // this.unifiedFrame = response.unified_frame; - // this.subentries = response.subentries; - // this.alternations = response.alternations; - // this.realisation_phrases = response.realisation_phrases; - // this.realisation_descriptions = response.realisation_descriptions; - // this.examples = response.examples; - // - // window.update_last_visited(response.last_visited); - // window.setup_notes($('#lexical-unit-notes'), $('#lexical-unit-notes-template'), this.lexicalUnitId, 'meanings.LexicalUnit', this.setup_notes); - // }.bind(this), - // error: function(request, errorType, errorMessage) { - // show_error(errorType + ' (' + errorMessage + ')'); - // } + // get_entry(this.entryId, false, this.lexicalUnitId).then(entry => { + // this.frame = entry.frames[0]; + // this.unifiedFrame = entry.unified_frame; + // this.subentries = entry.subentries; + // this.alternations = entry.alternations; + // this.realisation_phrases = entry.realisation_phrases; + // this.realisation_descriptions = entry.realisation_descriptions; + // this.examples = entry.examples; + // setup_notes($('#lexical-unit-notes'), $('#lexical-unit-notes-template'), this.lexicalUnitId, 'meanings.LexicalUnit', this.setup_notes); // }); + + var data = { 'entry' : this.entryId, 'no_filters' : false, 'lexical_unit_id': this.lexicalUnitId }; + $.ajax({ + type : 'post', + url : '/' + lang + '/entries/get_entry/', + dataType : 'json', + data : data, + timeout : 60000, + success : function(response) { + + window.clear_info(); + this.frame = response.frames[0]; + this.unifiedFrame = response.unified_frame; + this.subentries = response.subentries; + this.alternations = response.alternations; + this.realisation_phrases = response.realisation_phrases; + this.realisation_descriptions = response.realisation_descriptions; + this.examples = response.examples; + + window.update_last_visited(response.last_visited); + window.setup_notes($('#lexical-unit-notes'), $('#lexical-unit-notes-template'), this.lexicalUnitId, 'meanings.LexicalUnit', this.setup_notes); + }.bind(this), + error: function(request, errorType, errorMessage) { + show_error(errorType + ' (' + errorMessage + ')'); + } + }); } }, mounted () { @@ -189,7 +189,7 @@ export default { <div id="main-frames-pane" class="row"> <div class="col h-100 pl-3 pr-1 pt-0 pb-2 overflow-auto" id="semantics-frames-pane"> <spinner /> - <div id="semantics-frames"></div> +<!-- <div id="semantics-frames"></div>--> <div id="vue-semantics-frames" v-if="frame"> <div class="frame mb-3 active"> <div class="frame mt-0" id="lexical-unit"> @@ -255,24 +255,24 @@ export default { :selectedExamples="selectedExamples" @schemata-selected="schemataSelected" /> - <div id="semantics-schemata"></div> +<!-- <div id="semantics-schemata"></div>--> </div> </div> <div id="vue-examples" class="row overflow-auto"> - <div class="col w-100 p-0 tab-pane overflow-auto" id="examples"> - <table id="semantics-examples" class="table table-sm table-hover"> - <thead> - <tr> - <th scope="col">{{ gettext("Przykład") }}<i id="examples-argument"></i><i id="examples-lu"></i><i id="examples-schema"></i></th> - <th scope="col">{{ gettext("Źródło") }}</th> - <th scope="col">{{ gettext("Opinia") }}</th> - </tr> - </thead> - <tbody id="semantics-examples-list"> - </tbody> - </table> - <p class="mx-1 my-1" id="semantics-no-examples">{{ gettext("Brak przykładów") }}</p> - </div> +<!-- <div class="col w-100 p-0 tab-pane overflow-auto" id="examples">--> +<!-- <table id="semantics-examples" class="table table-sm table-hover">--> +<!-- <thead>--> +<!-- <tr>--> +<!-- <th scope="col">{{ gettext("Przykład") }}<i id="examples-argument"></i><i id="examples-lu"></i><i id="examples-schema"></i></th>--> +<!-- <th scope="col">{{ gettext("Źródło") }}</th>--> +<!-- <th scope="col">{{ gettext("Opinia") }}</th>--> +<!-- </tr>--> +<!-- </thead>--> +<!-- <tbody id="semantics-examples-list">--> +<!-- </tbody>--> +<!-- </table>--> +<!-- <p class="mx-1 my-1" id="semantics-no-examples">{{ gettext("Brak przykładów") }}</p>--> +<!-- </div>--> <div class="col w-100 pr-4 overflow-auto"> <examples-component v-if="examples" :examples="examples"