Cleanup and documentation.

This commit is contained in:
Stephan Porada
2020-09-23 15:09:45 +02:00
parent ad636d308d
commit 8083382046
12 changed files with 345 additions and 271 deletions

View File

@ -143,7 +143,7 @@ document.addEventListener("DOMContentLoaded", () => {
let corpusId = {{ corpus_id }}
const client = new Client({'corpusId': corpusId,
'socket': nopaque.socket,
'logging': false,
'logging': true,
'dynamicMode': true});
/**
* Initializing the results object as a model holding all the data of a
@ -205,8 +205,8 @@ document.addEventListener("DOMContentLoaded", () => {
*/
const listenForClientNotification = new ViewEventListener('notify-view',
recieveClientNotification);
resultsList.setNotificationListeners([listenForClientNotification]);
resultsList.loadNotificationListeners();
resultsList.setViewEventListeners([listenForClientNotification]);
resultsList.loadViewEventListeners();
// Connect client to server.
client.notifyView('connecting');
client.connect();

View File

@ -160,8 +160,8 @@ document.addEventListener("DOMContentLoaded", () => {
*/
const listenForClientNotification = new ViewEventListener('notify-view',
recieveClientNotification);
resultsList.setNotificationListeners([listenForClientNotification]);
resultsList.loadNotificationListeners();
resultsList.setViewEventListeners([listenForClientNotification]);
resultsList.loadViewEventListeners();
// Get all needed HTMLElements for the following event listeners.
resultsList.getHTMLElements([
'.add-btn',