mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 12:22:47 +00:00 
			
		
		
		
	Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
		@@ -143,7 +143,7 @@
 | 
				
			|||||||
        <span class="card-title">Fetching your results!</span>
 | 
					        <span class="card-title">Fetching your results!</span>
 | 
				
			||||||
        <div>
 | 
					        <div>
 | 
				
			||||||
          <div class="progress">
 | 
					          <div class="progress">
 | 
				
			||||||
            <div class="indeterminate"></div>
 | 
					            <div class="indeterminate" id="getting-query-results-bar"></div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@@ -330,21 +330,21 @@
 | 
				
			|||||||
  // event triggered on context select change and also if pagination is clicked
 | 
					  // event triggered on context select change and also if pagination is clicked
 | 
				
			||||||
  function changeContext(event) {
 | 
					  function changeContext(event) {
 | 
				
			||||||
    // newValue = event.target.value;  // cannot use this anymore due to reuse of this function in the above paginationElements eventListener
 | 
					    // newValue = event.target.value;  // cannot use this anymore due to reuse of this function in the above paginationElements eventListener
 | 
				
			||||||
    console.log(event);
 | 
					    console.log("Event", event);
 | 
				
			||||||
 | 
					    try {
 | 
				
			||||||
        if (event.type === "change") {
 | 
					        if (event.type === "change") {
 | 
				
			||||||
            nopaque.toast("Updated context per match!");
 | 
					            nopaque.toast("Updated context per match!");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    } catch (e) {
 | 
				
			||||||
 | 
					        console.log(e);
 | 
				
			||||||
 | 
					    } finally {
 | 
				
			||||||
        var contextPerItemElement = document.getElementById("context");
 | 
					        var contextPerItemElement = document.getElementById("context");
 | 
				
			||||||
        newValue = contextPerItemElement.value;
 | 
					        newValue = contextPerItemElement.value;
 | 
				
			||||||
        console.log(newValue);
 | 
					        console.log(newValue);
 | 
				
			||||||
        var lc = document.getElementsByClassName("left-context");
 | 
					        var lc = document.getElementsByClassName("left-context");
 | 
				
			||||||
        var rc = document.getElementsByClassName("right-context");
 | 
					        var rc = document.getElementsByClassName("right-context");
 | 
				
			||||||
    // console.log("LC", lc);
 | 
					 | 
				
			||||||
    // console.log("RC", rc);
 | 
					 | 
				
			||||||
        for (let element of lc) {
 | 
					        for (let element of lc) {
 | 
				
			||||||
      // console.log(element.childNodes);
 | 
					 | 
				
			||||||
          array = Array.from(element.childNodes);
 | 
					          array = Array.from(element.childNodes);
 | 
				
			||||||
      // console.log(array);
 | 
					 | 
				
			||||||
          for (let element of array.slice(newValue)) {
 | 
					          for (let element of array.slice(newValue)) {
 | 
				
			||||||
            element.classList.add("hide");
 | 
					            element.classList.add("hide");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@@ -353,9 +353,7 @@
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        for (let element of rc) {
 | 
					        for (let element of rc) {
 | 
				
			||||||
      // console.log(element.childNodes);
 | 
					 | 
				
			||||||
          array = Array.from(element.childNodes);
 | 
					          array = Array.from(element.childNodes);
 | 
				
			||||||
      // console.log(array);
 | 
					 | 
				
			||||||
          for (let element of array.slice(newValue)) {
 | 
					          for (let element of array.slice(newValue)) {
 | 
				
			||||||
            element.classList.add("hide");
 | 
					            element.classList.add("hide");
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@@ -364,6 +362,7 @@
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // socket.on triggered when result chunks are recieved
 | 
					  // socket.on triggered when result chunks are recieved
 | 
				
			||||||
  nopaque.socket.on("corpus_analysis_query", function(response) {
 | 
					  nopaque.socket.on("corpus_analysis_query", function(response) {
 | 
				
			||||||
@@ -425,7 +424,7 @@
 | 
				
			|||||||
        item.elm = resultList.createResultRowElement(item, chunk);
 | 
					        item.elm = resultList.createResultRowElement(item, chunk);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      resultList.update();
 | 
					      resultList.update();
 | 
				
			||||||
      changeContext();  // sets lr context to current/default value
 | 
					      changeContext(); // sets lr context on first result load
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    result["loaded_match_count"] += Object.keys(chunk["matches"]).length;
 | 
					    result["loaded_match_count"] += Object.keys(chunk["matches"]).length;
 | 
				
			||||||
    console.log("After current match count", result["loaded_match_count"]);
 | 
					    console.log("After current match count", result["loaded_match_count"]);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user