Skip to content
Snippets Groups Projects
Commit 1caacba1 authored by dcz's avatar dcz
Browse files

Enable filtering of schamata and frames.

parent 5a44bee8
No related branches found
No related tags found
No related merge requests found
......@@ -427,9 +427,6 @@ function initialize_main_form() {
if (response.errors) {
show_form_errors(main_form, response.errors);
} else if (response.success) {
if(window.unificationLeftPaneApp) {
// window.unificationLeftPaneApp.refresh();
}
update_entries();
$('#entry-filters').modal('hide');
}
......@@ -479,7 +476,7 @@ function initialize_local_form(selector, url) {
if (response.errors) {
show_form_errors(form, response.errors);
} else if (response.success) {
get_entry(curr_entry, curr_no_filters);
update_entries();
selector.modal('hide');
}
submit.prop('disabled', false);
......
......@@ -24,11 +24,11 @@
}
},
methods: {
setup() {
reset_entry_list() {
this.$emit('lexicalUnitSelected', null, null);
setup_entries_list({
table: this.$refs.table,
lexicalUnitSelected: (entryId, lexicalUnitId) => { this.$emit('lexicalUnitSelected', entryId, lexicalUnitId); },
selectEntryId: this.initialEntryId
});
}
},
......
......@@ -150,7 +150,7 @@ export default {
success : function(response) {
window.clear_info();
this.frame = response.frames[0];
this.frame = response.frames.length > 0 ? response.frames[0] : null;
this.unifiedFrame = response.unified_frame;
this.subentries = response.subentries;
this.alternations = response.alternations;
......@@ -278,7 +278,7 @@ export default {
<!-- <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-component v-if="examples && frame"
:examples="examples"
:frame="frame"
:frame_arguments="selectedFrameArguments"
......
......@@ -123,7 +123,7 @@ export default {
<div class="mb-1 sticky-top"><h5 class="bg-dark text-light p-1">{{subentry.str}}</h5></div>
<template v-for="schema in subentry.schemata">
<div class="schema mb-3"
v-if="alternations[this.frame.id][schema.id]"
v-if="this.frame && alternations[this.frame.id][schema.id]"
@mouseenter="schema.hover=true"
@mouseleave="schema.hover=false"
@click="selectSchema(schema)"
......
......@@ -25,6 +25,6 @@ window.update_entries = function () {
mounted = true;
}
if(app._context.config.globalProperties.$entries_list) {
app._context.config.globalProperties.$entries_list.setup();
app._context.config.globalProperties.$entries_list.reset_entry_list();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment