mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Clean up
This commit is contained in:
		@@ -277,25 +277,12 @@
 | 
			
		||||
// ###### Defining global variables used in other functions ######
 | 
			
		||||
  var client;  // CorpusAnalysisClient first undefined on DOMContentLoaded defined
 | 
			
		||||
  var collapsibleElements;  // All collapsibleElements on this page
 | 
			
		||||
  var collapsibleElements;  // all collapsibles on site
 | 
			
		||||
  var contextModal;  // Modal to open on inspect for further match context
 | 
			
		||||
  var contextPerItemElement;
 | 
			
		||||
  var contextSentencesElement;
 | 
			
		||||
  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 firstPageElement;  // first page element of resultsList pagination
 | 
			
		||||
  var hitsPerPageInputElement;
 | 
			
		||||
  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 paginationElements;
 | 
			
		||||
  var progress;  // global progress value
 | 
			
		||||
  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 queryResultsExportElement;  // Download button opens download modal
 | 
			
		||||
@@ -307,7 +294,21 @@
 | 
			
		||||
  var resultsList;  // resultsList object
 | 
			
		||||
  var resultsListOptions;  // specifies ResultsList options
 | 
			
		||||
  var textLookupCountElement  // Nr of texts the matches occured in will be shown in this element
 | 
			
		||||
  var xpath;  // xpath to grab first resultsList page pagination element
 | 
			
		||||
 | 
			
		||||
  // ###### Defining local scope variables ######
 | 
			
		||||
  let contextPerItemElement;  // Form Element for display option
 | 
			
		||||
  let contextSentencesElement;  // Form Element for display option in inspect
 | 
			
		||||
  let displayOptionsData;  // Getting form data from display options
 | 
			
		||||
  let displayOptionsFormElement;  // Form holding the display informations
 | 
			
		||||
  let downloadResultsJSONElement;  // button for downloading results as JSON
 | 
			
		||||
  let exportModal;  // Download options modal
 | 
			
		||||
  let firstPageElement;  // first page element of resultsList pagination
 | 
			
		||||
  let hitsPerPageInputElement;
 | 
			
		||||
  let initDisplayElement;  // Element for initialization using initDisplay
 | 
			
		||||
  let initModal;
 | 
			
		||||
  let paginationElements;
 | 
			
		||||
  let queryDisplayElement;  // Element for initialization using queryDisplay
 | 
			
		||||
  let xpath;  // xpath to grab first resultsList page pagination element
 | 
			
		||||
 | 
			
		||||
  // ###### Initialize variables ######
 | 
			
		||||
  client = undefined;
 | 
			
		||||
@@ -330,6 +331,8 @@
 | 
			
		||||
  queryResultsUserFeedbackElement = document.getElementById("query-results-user-feedback");
 | 
			
		||||
  receivedMatchCountElement = document.getElementById("received-match-count");
 | 
			
		||||
  textLookupCountElement = document.getElementById("text-lookup-count");
 | 
			
		||||
  hitsPerPageInputElement = document.getElementById("display-options-form-results_per_page");
 | 
			
		||||
  contextPerItemElement = document.getElementById("display-options-form-result_context");
 | 
			
		||||
 | 
			
		||||
  // ###### js list options and intialization ######
 | 
			
		||||
  displayOptionsData = ResultsList.getDisplayOptions(displayOptionsFormElement);
 | 
			
		||||
@@ -411,20 +414,12 @@
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // live update of hits per page if hits per page value is changed
 | 
			
		||||
    hitsPerPageInputElement = document.getElementById("display-options-form-results_per_page");
 | 
			
		||||
    let changeHitsPerPageBind = results.resultsList.changeHitsPerPage.bind(results.resultsList);
 | 
			
		||||
    hitsPerPageInputElement.onchange = changeHitsPerPageBind;
 | 
			
		||||
 | 
			
		||||
    // live update of lr context per item if context value is changed
 | 
			
		||||
    contextPerItemElement = document.getElementById("display-options-form-result_context");
 | 
			
		||||
    contextPerItemElement.onchange = results.resultsList.changeContext;
 | 
			
		||||
 | 
			
		||||
    // live update of context sentences in inspect modal
 | 
			
		||||
    contextSentencesElement.onchange = (event) => {
 | 
			
		||||
      let sValue = event.target.value;
 | 
			
		||||
      console.log(sValue);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // eventListener if pagination is used to apply new context size to new page
 | 
			
		||||
    // and also activate inspect match if progress is 100
 | 
			
		||||
    for (let element of paginationElements) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user