mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-11-20 09:26:20 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0fe4360bb | ||
|
|
1c18806c9c | ||
|
|
9487aa7a60 | ||
|
|
6559051fd5 | ||
|
|
0882e085a3 |
No files matched your search
@@ -45,12 +45,6 @@ def dashboard():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# @bp.route('/user_manual')
|
|
||||||
# @register_breadcrumb(bp, '.user_manual', '<i class="material-icons left">help</i>User manual')
|
|
||||||
# def user_manual():
|
|
||||||
# return render_template('main/user_manual.html.j2', title='User manual')
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/news')
|
@bp.route('/news')
|
||||||
@register_breadcrumb(bp, '.news', '<i class="material-icons left">email</i>News')
|
@register_breadcrumb(bp, '.news', '<i class="material-icons left">email</i>News')
|
||||||
def news():
|
def news():
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
submitQueryChipElement(dataType = undefined, prettyQueryText = undefined, queryText = undefined, index = null, isClosingTag = false, isEditable = false) {
|
submitQueryChipElement(dataType=undefined, prettyQueryText=undefined, queryText=undefined, index=null, isClosingTag=false, isEditable=false) {
|
||||||
if (this.elements.editingModusOn) {
|
if (this.elements.editingModusOn) {
|
||||||
let editedQueryChipElement = this.elements.queryChipElements[this.elements.editedQueryChipElementIndex];
|
let editedQueryChipElement = this.elements.queryChipElements[this.elements.editedQueryChipElementIndex];
|
||||||
editedQueryChipElement.dataset.type = dataType;
|
editedQueryChipElement.dataset.type = dataType;
|
||||||
@@ -81,7 +81,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queryChipFactory(dataType, prettyQueryText, queryText, index = null, isClosingTag = false, isEditable = false) {
|
queryChipFactory(dataType, prettyQueryText, queryText, index=null, isClosingTag=false, isEditable=false) {
|
||||||
// Creates a new query chip element, adds Eventlisteners for selection, deletion and drag and drop and appends it to the query input field.
|
// Creates a new query chip element, adds Eventlisteners for selection, deletion and drag and drop and appends it to the query input field.
|
||||||
queryText = nopaque.Utils.escape(queryText);
|
queryText = nopaque.Utils.escape(queryText);
|
||||||
prettyQueryText = nopaque.Utils.escape(prettyQueryText);
|
prettyQueryText = nopaque.Utils.escape(prettyQueryText);
|
||||||
@@ -93,7 +93,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
</span>
|
</span>
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
this.actionListeners(queryChipElement);
|
this.addActionListeners(queryChipElement);
|
||||||
queryChipElement.addEventListener('dragstart', this.handleDragStart.bind(this, queryChipElement));
|
queryChipElement.addEventListener('dragstart', this.handleDragStart.bind(this, queryChipElement));
|
||||||
queryChipElement.addEventListener('dragend', this.handleDragEnd);
|
queryChipElement.addEventListener('dragend', this.handleDragEnd);
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
this.queryPreviewBuilder();
|
this.queryPreviewBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
actionListeners(queryChipElement) {
|
addActionListeners(queryChipElement) {
|
||||||
let notQuantifiableDataTypes = ['start-sentence', 'end-sentence', 'start-entity', 'start-empty-entity', 'end-entity', 'token-incidence-modifier'];
|
let notQuantifiableDataTypes = ['start-sentence', 'end-sentence', 'start-entity', 'start-empty-entity', 'end-entity', 'token-incidence-modifier'];
|
||||||
queryChipElement.addEventListener('click', (event) => {
|
queryChipElement.addEventListener('click', (event) => {
|
||||||
if (event.target.classList.contains('chip')) {
|
if (event.target.classList.contains('chip')) {
|
||||||
@@ -129,8 +129,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let chipActionButtons = queryChipElement.querySelectorAll('.chip-action-button');
|
let chipActionButtons = queryChipElement.querySelectorAll('.chip-action-button');
|
||||||
// chipActionButtons.forEach(button => {
|
chipActionButtons.forEach(button => {
|
||||||
for (let button of chipActionButtons) {
|
|
||||||
button.addEventListener('click', (event) => {
|
button.addEventListener('click', (event) => {
|
||||||
if (event.target.dataset.chipAction === 'delete') {
|
if (event.target.dataset.chipAction === 'delete') {
|
||||||
this.deleteChipElement(queryChipElement);
|
this.deleteChipElement(queryChipElement);
|
||||||
@@ -140,8 +139,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
this.lockClosingChipElement(queryChipElement);
|
this.lockClosingChipElement(queryChipElement);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
editChipElement(queryChipElement) {
|
editChipElement(queryChipElement) {
|
||||||
@@ -175,10 +173,10 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
let elementIndex = Array.from(this.elements.queryInputField.children).indexOf(attr);
|
let elementIndex = Array.from(this.elements.queryInputField.children).indexOf(attr);
|
||||||
switch (attr.dataset.type) {
|
switch (attr.dataset.type) {
|
||||||
case 'start-sentence':
|
case 'start-sentence':
|
||||||
this.deletingClosingTagHandler(elementIndex, 'end-sentence');
|
this.deleteClosingTagHandler(elementIndex, 'end-sentence');
|
||||||
break;
|
break;
|
||||||
case 'start-entity':
|
case 'start-entity':
|
||||||
this.deletingClosingTagHandler(elementIndex, 'end-entity');
|
this.deleteClosingTagHandler(elementIndex, 'end-entity');
|
||||||
break;
|
break;
|
||||||
case 'token':
|
case 'token':
|
||||||
let nextElement = Array.from(this.elements.queryInputField.children)[elementIndex+1];
|
let nextElement = Array.from(this.elements.queryInputField.children)[elementIndex+1];
|
||||||
@@ -196,7 +194,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
this.queryPreviewBuilder();
|
this.queryPreviewBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
deletingClosingTagHandler(elementIndex, closingTagType) {
|
deleteClosingTagHandler(elementIndex, closingTagType) {
|
||||||
let closingTags = this.elements.queryInputField.querySelectorAll(`[data-type="${closingTagType}"]`);
|
let closingTags = this.elements.queryInputField.querySelectorAll(`[data-type="${closingTagType}"]`);
|
||||||
for (let i = 0; i < closingTags.length; i++) {
|
for (let i = 0; i < closingTags.length; i++) {
|
||||||
let closingTag = closingTags[i];
|
let closingTag = closingTags[i];
|
||||||
@@ -208,7 +206,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDragStart(queryChipElement, event) {
|
handleDragStart(queryChipElement) {
|
||||||
// is called when a query chip is dragged. It creates a dropzone (in form of a chip) for the dragged chip and adds it to the query input field.
|
// is called when a query chip is dragged. It creates a dropzone (in form of a chip) for the dragged chip and adds it to the query input field.
|
||||||
let queryChips = this.elements.queryInputField.querySelectorAll('.query-component');
|
let queryChips = this.elements.queryInputField.querySelectorAll('.query-component');
|
||||||
if (queryChipElement.dataset.type === 'token-incidence-modifier') {
|
if (queryChipElement.dataset.type === 'token-incidence-modifier') {
|
||||||
@@ -232,7 +230,7 @@ nopaque.corpus_analysis.query_builder.QueryBuilder = class QueryBuilder {
|
|||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDragEnd(event) {
|
handleDragEnd() {
|
||||||
document.querySelectorAll('.drop-target').forEach(target => target.remove());
|
document.querySelectorAll('.drop-target').forEach(target => target.remove());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,36 +102,12 @@ nopaque.corpus_analysis.query_builder.TokenAttributeBuilderFunctions = class Tok
|
|||||||
notSelectedButton.parentNode.removeChild(notSelectedButton);
|
notSelectedButton.parentNode.removeChild(notSelectedButton);
|
||||||
this.elements.tokenQuery.appendChild(tokenQueryTemplateClone);
|
this.elements.tokenQuery.appendChild(tokenQueryTemplateClone);
|
||||||
|
|
||||||
// Deleting the options which do not make sense in the context of the condition like "word" AND "word". Also sets selection default.
|
|
||||||
let selectionDefault = "word";
|
|
||||||
let optionDeleteList = ['empty-token'];
|
|
||||||
if (conditionText === 'and') {
|
|
||||||
switch (this.elements.positionalAttrSelection.value) {
|
|
||||||
case 'english-pos' || 'german-pos':
|
|
||||||
optionDeleteList.push('english-pos', 'german-pos');
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
optionDeleteList.push(this.elements.positionalAttrSelection.value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let originalSelectionList =
|
|
||||||
`
|
|
||||||
<option value="word" selected>word</option>
|
|
||||||
<option value="lemma" >lemma</option>
|
|
||||||
<option value="english-pos">english pos</option>
|
|
||||||
<option value="german-pos">german pos</option>
|
|
||||||
<option value="simple_pos">simple_pos</option>
|
|
||||||
`;
|
|
||||||
this.elements.positionalAttrSelection.innerHTML = originalSelectionList;
|
|
||||||
M.FormSelect.init(this.elements.positionalAttrSelection);
|
|
||||||
}
|
|
||||||
let lastTokenQueryRow = this.elements.tokenQuery.lastElementChild;
|
let lastTokenQueryRow = this.elements.tokenQuery.lastElementChild;
|
||||||
if(lastTokenQueryRow.querySelector('[data-kind-of-token="word"]') || lastTokenQueryRow.querySelector('[data-kind-of-token="lemma"]')) {
|
if(lastTokenQueryRow.querySelector('[data-kind-of-token="word"]') || lastTokenQueryRow.querySelector('[data-kind-of-token="lemma"]')) {
|
||||||
this.appendIgnoreCaseCheckbox(lastTokenQueryRow.querySelector('.token-query-template-content'), this.elements.ignoreCaseCheckbox.checked);
|
this.appendIgnoreCaseCheckbox(lastTokenQueryRow.querySelector('.token-query-template-content'), this.elements.ignoreCaseCheckbox.checked);
|
||||||
}
|
}
|
||||||
this.elements.ignoreCaseCheckbox.checked = false;
|
this.elements.ignoreCaseCheckbox.checked = false;
|
||||||
this.setTokenSelection(selectionDefault, optionDeleteList);
|
this.setTokenSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteTokenQueryRow(deleteButton) {
|
deleteTokenQueryRow(deleteButton) {
|
||||||
@@ -169,7 +145,7 @@ nopaque.corpus_analysis.query_builder.TokenAttributeBuilderFunctions = class Tok
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTokenSelection(selection, optionDeleteList) {
|
setTokenSelection(selection="word", optionDeleteList=['empty-token']) {
|
||||||
optionDeleteList.forEach(option => {
|
optionDeleteList.forEach(option => {
|
||||||
if (this.elements.positionalAttrSelection.querySelector(`option[value=${option}]`) !== null) {
|
if (this.elements.positionalAttrSelection.querySelector(`option[value=${option}]`) !== null) {
|
||||||
this.elements.positionalAttrSelection.querySelector(`option[value=${option}]`).remove();
|
this.elements.positionalAttrSelection.querySelector(`option[value=${option}]`).remove();
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+8
-8
@@ -13,35 +13,35 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div id="manual-modal-introduction">
|
<div id="manual-modal-introduction">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_01_introduction.html.j2" %}
|
{% include "_base/_modals/_manual/_01_introduction.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-registration-and-log-in">
|
<div id="manual-modal-registration-and-log-in">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_02_registration_and_log_in.html.j2" %}
|
{% include "_base/_modals/_manual/_02_registration_and_log_in.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-dashboard">
|
<div id="manual-modal-dashboard">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_03_dashboard.html.j2" %}
|
{% include "_base/_modals/_manual/_03_dashboard.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-services">
|
<div id="manual-modal-services">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_06_services.html.j2" %}
|
{% include "_base/_modals/_manual/_06_services.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-a-closer-look-at-the-corpus-analysis">
|
<div id="manual-modal-a-closer-look-at-the-corpus-analysis">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_07_a_closer_look_at_the_corpus_analysis.html.j2" %}
|
{% include "_base/_modals/_manual/_07_a_closer_look_at_the_corpus_analysis.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-cqp-query-language">
|
<div id="manual-modal-cqp-query-language">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_08_cqp_query_language.html.j2" %}
|
{% include "_base/_modals/_manual/_08_cqp_query_language.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-query-builder">
|
<div id="manual-modal-query-builder">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_09_query_builder.html.j2" %}
|
{% include "_base/_modals/_manual/_09_query_builder.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
<div id="manual-modal-tagsets">
|
<div id="manual-modal-tagsets">
|
||||||
<br>
|
<br>
|
||||||
{% include "main/_manual_modal/_10_tagsets.html.j2" %}
|
{% include "_base/_modals/_manual/_10_tagsets.html.j2" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,5 @@
|
|||||||
|
{% include "_base/_modals/manual.html.j2" %}
|
||||||
|
|
||||||
|
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
||||||
|
{% include "_base/_modals/terms_of_use.html.j2" %}
|
||||||
|
{% endif %}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -16,16 +16,16 @@
|
|||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% include "_styles.html.j2" %}
|
{% include "_base/styles.html.j2" %}
|
||||||
{% endblock styles %}
|
{% endblock styles %}
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
{% include "_navbar.html.j2" %}
|
{% include "_base/navbar.html.j2" %}
|
||||||
{% endblock navbar %}
|
{% endblock navbar %}
|
||||||
|
|
||||||
{% block sidenav %}
|
{% block sidenav %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{% include "_sidenav.html.j2" %}
|
{% include "_base/sidenav.html.j2" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock sidenav %}
|
{% endblock sidenav %}
|
||||||
|
|
||||||
@@ -34,23 +34,17 @@
|
|||||||
{% block page_content %}{% endblock page_content %}
|
{% block page_content %}{% endblock page_content %}
|
||||||
<div id="modals">
|
<div id="modals">
|
||||||
{% block modals %}
|
{% block modals %}
|
||||||
{% include "main/_manual_modal.html.j2" %}
|
{% include "_base/modals.html.j2" %}
|
||||||
{# {% if current_user.is_authenticated %}
|
|
||||||
{% include "_roadmap.html.j2" %}
|
|
||||||
{% endif %} #}
|
|
||||||
{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %}
|
|
||||||
{% include "_terms_of_use_modal.html.j2" %}
|
|
||||||
{% endif %}
|
|
||||||
{% endblock modals %}
|
{% endblock modals %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock main %}
|
{% endblock main %}
|
||||||
|
|
||||||
{% block footer_attribs %} class="page-footer primary-variant-color"{% endblock footer_attribs %}
|
{% block footer_attribs %} class="page-footer primary-variant-color"{% endblock footer_attribs %}
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{% include "_footer.html.j2" %}
|
{% include "_base/footer.html.j2" %}
|
||||||
{% endblock footer %}
|
{% endblock footer %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% include "_scripts.html.j2" %}
|
{% include "_base/scripts.html.j2" %}
|
||||||
{% endblock scripts %}
|
{% endblock scripts %}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{% extends "base.html.j2" %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s12">
|
|
||||||
<h1 id="title">{{ title }}</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col s12 m10">
|
|
||||||
<div class="section scrollspy" id="introduction">
|
|
||||||
{% include "main/manual/_01_introduction.html.j2" %}
|
|
||||||
</div>
|
|
||||||
<div class="section scrollspy" id="registration-and-log-in">
|
|
||||||
{% include "main/manual/_02_registration_and_log_in.html.j2" %}
|
|
||||||
</div>
|
|
||||||
<div class="section scrollspy" id="dashboard">
|
|
||||||
{% include "main/manual/_03_dashboard.html.j2" %}
|
|
||||||
</div>
|
|
||||||
<div class="section scrollspy" id="services">
|
|
||||||
{% include "main/manual/_06_services.html.j2" %}
|
|
||||||
</div>
|
|
||||||
<div class="section scrollspy" id="a-closer-look-at-the-corpus-analysis">
|
|
||||||
{% include "main/manual/_07_a_closer_look_at_the_corpus_analysis.html.j2" %}
|
|
||||||
</div>
|
|
||||||
<div class="section scrollspy" id="cqp-query-language">
|
|
||||||
{% include "main/manual/_08_cqp_query_language.html.j2" %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col m2 hide-on-small-only">
|
|
||||||
<ul class="section table-of-contents" style="position: fixed !important;">
|
|
||||||
<li><a href="#introduction">Introduction</a></li>
|
|
||||||
<li><a href="#registration-and-log-in">Registration and Log in</a></li>
|
|
||||||
<li><a href="#dashboard">Dashboard</a></li>
|
|
||||||
<li><a href="#services">Services</a></li>
|
|
||||||
<li><a href="#a-closer-look-at-the-corpus-analysis">A closer look at the Corpus Analysis</a></li>
|
|
||||||
<li><a href="#cqp-query-language">CQP Query Language</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock page_content %}
|
|
||||||
Reference in new issue
Block a user