mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-21 05:20:36 +00:00
Feature parity with old implementation
This commit is contained in:
@ -123,8 +123,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
'dynamicMode': true});
|
||||
/**
|
||||
* Initializing the results object as a model holding all the data of a query.
|
||||
* Also holds the metadata of one query. After that initialize the ResultsList
|
||||
* object as the View handeling the represnetation of the data.
|
||||
* Also holds the metadata of one query.
|
||||
* After that initialize the ResultsList object as the View handeling the
|
||||
* represnetation of the data for the user.
|
||||
*/
|
||||
let results = new Results();
|
||||
let resultsList = new ResultsList('result-list', ResultsList.options);
|
||||
@ -174,7 +175,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
listenForResults]);
|
||||
client.loadSocketEventListeners();
|
||||
/**
|
||||
* Register resultsList listeners listening to nitification events.
|
||||
* Register resultsList listeners listening to notification events.
|
||||
*/
|
||||
const listenForClientNotification = new ViewEventListener('notify-view',
|
||||
recieveClientNotification);
|
||||
@ -221,7 +222,28 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
'#query-results-download-modal',
|
||||
'#query-results-table',
|
||||
'#display-options-form-expert_mode',
|
||||
'.pagination',
|
||||
]);
|
||||
|
||||
/**
|
||||
* The following listener handles what functions are called when the user
|
||||
* does use the page navigation to navigate to a new page.
|
||||
*/
|
||||
for (let element of resultsList.pagination) {
|
||||
element.addEventListener("click", (event) => {
|
||||
// shows match context according to the user picked value
|
||||
resultsList.changeContext();
|
||||
// activates or deactivates expertMode on new page depending switch value
|
||||
if (resultsList.displayOptionsFormExpertMode.checked) {
|
||||
resultsList.expertModeOn('query-display', results);
|
||||
} else {
|
||||
resultsList.expertModeOff('query-display');
|
||||
}
|
||||
// activates inspect buttons on new page if client is not busy
|
||||
resultsList.activateInspect();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The following event Listener handles the expert mode switch for the list
|
||||
*/
|
||||
|
Reference in New Issue
Block a user