Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
d5d0ffe7
Commit
d5d0ffe7
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
sort and clean variables
parent
b0104fe6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/templates/corpora/analyse_corpus.html.j2
+41
-34
41 additions, 34 deletions
app/templates/corpora/analyse_corpus.html.j2
with
41 additions
and
34 deletions
app/templates/corpora/analyse_corpus.html.j2
+
41
−
34
View file @
d5d0ffe7
...
@@ -217,36 +217,58 @@
...
@@ -217,36 +217,58 @@
<script src="{{ url_for('static', filename='js/nopaque.callbacks.js') }}">
<script src="{{ url_for('static', filename='js/nopaque.callbacks.js') }}">
</script>
</script>
<script>
<script>
// ###### Defining global variables used in other functions ######
// ###### Defining global variables used in other functions ######
var results; // results object
var client; // CorpusAnalysisClient first undefined on DOMContentLoaded defined
var resultsJSON; // full JSON object holding match results
var collapsibleElements; // All collapsibleElements on this page
var resultsList; // resultsList object
var queryFormElement; // the query form
var collapsibleElements; // all collapsibles on site
var collapsibleElements; // all collapsibles on site
var contextModal; // Modal to open on inspect for further match context
var displayOptionsData; // Getting form data from display options
var displayOptionsFormElement; // Form holding the display informations
var downloadResultsJSONElement; // button for downloading results as JSON
var expertModeSwitchElement; // Expert mode switch Element
var exportModal; // Download options modal
var initDisplay; // CorpusAnalysisDisplay object first undfined on DOMContentLoaded defined
var initDisplayElement; // Element for initialization using initDisplay
var initModal;
var matchCountElement; // Total nr. of matches will be displayed in this element
var progress; // global progress value
var progress; // global progress value
var queryResultsProgressElement; // Div element holding the progress bar
var queryDisplay; // CorpusAnalysisDisplay object first undfined on DOMContentLoaded defined
var queryDisplayElement; // Element for initialization using queryDisplay
var queryFormElement; // the query form
var queryResultsDeterminateElement; // The progress bar for recieved results
var queryResultsDeterminateElement; // The progress bar for recieved results
var queryResultsUserFeedbackElement; // Element showing match count|total etc
var queryResultsExportElement; // Download button opens download modal
var queryResultsExportElement; // Download button opens download modal
var exportModal; // Download options modal
var queryResultsProgressElement; // Div element holding the progress bar
var contextModal; // Modal to open on inspect for further match context
var queryResultsUserFeedbackElement; // Element showing match count|total etc
var initModal;
var receivedMatchCountElement; // Nr. of loaded matches will be displayed in this element
var downloadResultsJSONElement; // button for downloading results as JSON
var results; // results object
var displayOptionsFormElement;
var resultsJSON; // full JSON object holding match results
var resultsList; // resultsList object
var resultsListOptions; // specifies ResultsList options
var textLookupCountElement // Nr of texts the matches occured in will be shown in this element
// ###### Initialize variables ######
// ###### Initialize variables ######
client = undefined;
collapsibleElements = document.querySelector('.collapsible.expandable');
contextModal = document.getElementById("context-modal");
contextModal = document.getElementById("context-modal");
displayOptionsFormElement = document.getElementById("display-options-form");
expertModeSwitchElement = document.getElementById("display-options-form-expert_mode");
exportModal = document.getElementById("query-results-download-modal");
exportModal = document.getElementById("query-results-download-modal");
initDisplay = undefined;
initDisplayElement = document.getElementById("init-display");
matchCountElement = document.getElementById("match-count");
queryDisplay = undefined;
queryDisplayElement = document.getElementById("query-display");
queryFormElement = document.getElementById("query-form");
queryFormElement = document.getElementById("query-form");
queryResultsProgressElement = document.getElementById("query-results-progress");
queryResultsDeterminateElement = document.getElementById("query-results-determinate");
queryResultsDeterminateElement = document.getElementById("query-results-determinate");
queryResultsUserFeedbackElement = document.getElementById("query-results-user-feedback");
queryResultsExportElement = document.getElementById("query-results-export");
queryResultsExportElement = document.getElementById("query-results-export");
displayOptionsFormElement = document.getElementById("display-options-form");
queryResultsProgressElement = document.getElementById("query-results-progress");
queryResultsUserFeedbackElement = document.getElementById("query-results-user-feedback");
receivedMatchCountElement = document.getElementById("received-match-count");
textLookupCountElement = document.getElementById("text-lookup-count");
// js list options and intialization
//
######
js list options and intialization
######
let
displayOptionsData = ResultsList.getDisplayOptions(displayOptionsFormElement);
displayOptionsData = ResultsList.getDisplayOptions(displayOptionsFormElement);
let
resultsListOptions = {page: displayOptionsData["resultsPerPage"],
resultsListOptions = {page: displayOptionsData["resultsPerPage"],
pagination: [{
pagination: [{
name: "paginationTop",
name: "paginationTop",
paginationClass: "paginationTop",
paginationClass: "paginationTop",
...
@@ -260,23 +282,8 @@
...
@@ -260,23 +282,8 @@
valueNames: ["titles", "lc", "c", "rc", {data: ["index"]}],
valueNames: ["titles", "lc", "c", "rc", {data: ["index"]}],
item: `<span></span>`};
item: `<span></span>`};
// ###### Set some css options ######
// get collapsibles to alter options of those
var collapsibleElements = document.querySelector('.collapsible.expandable');
var client = undefined;
var initDisplay = undefined;
var queryDisplay = undefined;
var initDisplayElement = document.getElementById("init-display");
var queryDisplayElement = document.getElementById("query-display");
receivedMatchCountElement = document.getElementById("received-match-count");
matchCountElement = document.getElementById("match-count");
textLookupCountElement = document.getElementById("text-lookup-count");
var expertModeSwitchElement = document.getElementById("display-options-form-expert_mode");
// ###### event on DOMContentLoaded ######
document.addEventListener("DOMContentLoaded", () => {
document.addEventListener("DOMContentLoaded", () => {
//set accordion of collapsibles to false
//set accordion of collapsibles to false
M.Collapsible.init(collapsibleElements, {accordion: false});
M.Collapsible.init(collapsibleElements, {accordion: false});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment