From 11b87fd7223a90ef1f9b0d7bd58f12231fe1ac01 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 8 Dec 2023 21:52:34 +0000 Subject: [PATCH] bug fixes --- UI/Component/Form.js | 14 +++++++------- UI/Component/Table.js | 4 ++-- UI/GeneralUI.js | 10 +++++----- UI/RemoteData.js | 2 +- UI/UIStateManager.js | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/UI/Component/Form.js b/UI/Component/Form.js index 37a4f09..bfd4617 100755 --- a/UI/Component/Form.js +++ b/UI/Component/Form.js @@ -133,7 +133,7 @@ export class Form // don't overwrite existing bind /* - @todo: removed because sometimes it is already bound but bound in a wrong way (e.g. no success is defined) + @todo removed because sometimes it is already bound but bound in a wrong way (e.g. no success is defined) if (Object.prototype.hasOwnProperty.call(this.forms, id)) { return; } */ @@ -532,7 +532,7 @@ export class Form updateElementNames[i] = updateElementNames[i].trim(); // get the elment to update - // @todo: maybe stupid, because same as elementContainer. however this is more general? anyway, one can be replaced + // @todo maybe stupid, because same as elementContainer. however this is more general? anyway, one can be replaced updateElements.push( formElement.querySelector(updateElementNames[i] + '[data-id="' + elementContainer.getAttribute('data-id') + '"]') ); @@ -1009,14 +1009,14 @@ export class Form jsOMS.preventAll(event); self.submit(self.forms[id], self.forms[id].getSubmit()[elementIndex]); } else if (false) { // eslint-disable-line no-constant-condition - // @todo: if table head input field in popups changes -> check if input empty -> deactivate -> checkbox : else activate checkbox + // @todo if table head input field in popups changes -> check if input empty -> deactivate -> checkbox : else activate checkbox // careful: the same checkbox is used for showing the filter popup. maybe create a separate checkbox, which only handles the highlighting if filter is defined. // this means popup active highlights filter icon AND different content checkbox also highlights filter // -> two hiddin checkboxes are necessary (one is already implemented) // Consider: It might make sense to do this in the Table.js??? Kinda depends on additional functionality together with the form probably. } - // @todo: if input change check if iframe needs to be reloaded (if there is a iframe that is attached/part of the form + // @todo if input change check if iframe needs to be reloaded (if there is a iframe that is attached/part of the form // e.g. media renderer based on currently selected element) // remote actions (maybe solvable with callbacks?): @@ -1160,7 +1160,7 @@ export class Form const redirect = form.getFormElement().getAttribute('data-redirect'); request.setData(data); - request.setType(RequestType.FORM_DATA); // @todo: consider to allow different request type + request.setType(RequestType.FORM_DATA); // @todo consider to allow different request type request.setUri(action !== null ? action : form.getAction()); request.setMethod(method !== null ? method : form.getMethod()); request.setResultCallback(0, function (xhr) @@ -1206,7 +1206,7 @@ export class Form document.close(); */ - window.omsApp.reInit(); // @todo: fix memory leak which most likely exists because of continous binding without removing binds + window.omsApp.reInit(); // @todo fix memory leak which most likely exists because of continous binding without removing binds } else { try { const o = JSON.parse(xhr.response)[0]; @@ -1234,7 +1234,7 @@ export class Form document.write(html); document.close(); */ - // @todo: fix memory leak which most likely exists because of continous binding without removing binds + // @todo fix memory leak which most likely exists because of continous binding without removing binds window.omsApp.reInit(); }) .catch((error) => { diff --git a/UI/Component/Table.js b/UI/Component/Table.js index 09b9a89..b2a7c16 100755 --- a/UI/Component/Table.js +++ b/UI/Component/Table.js @@ -217,7 +217,7 @@ export class Table const baseMenuLine = menu.getElementsByClassName('context-line')[0].cloneNode(true); - // @todo: simplify by doing it for the whole header? event bubbling + // @todo simplify by doing it for the whole header? event bubbling for (let i = 0; i < length; ++i) { if (columns[i].firstElementChild.innerText.trim() === '') { continue; @@ -486,7 +486,7 @@ export class Table table.appendChild(newRow); - // @todo: bind buttons if required (e.g. remove, edit button) + // @todo bind buttons if required (e.g. remove, edit button) } }; }; diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index 850c115..b6a1ea8 100755 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -72,7 +72,7 @@ export class GeneralUI for (let i = 0; i < length; ++i) { /* - @todo: bad solution, probably needs to be more navigation specific + @todo bad solution, probably needs to be more navigation specific const link = UriFactory.buildAbsolute( e[i].getAttribute('href') !== null ? e[i].getAttribute('href') : e[i].getAttribute('data-href') ); @@ -86,7 +86,7 @@ export class GeneralUI continue; } - // @todo: implement middle mouse click + // @todo implement middle mouse click e[i].addEventListener('click', function (event) { if ((event.target.parentElement !== this && event.target.parentElement.getElementsByTagName('input').length > 0) @@ -122,7 +122,7 @@ export class GeneralUI : jsOMS.rtrim(window.omsApp.request.getRootPath(), '/') + '/' + jsOMS.ltrim(uri, '/'); /* - @todo: Commented out until ObserverMutation is implemented + @todo Commented out until ObserverMutation is implemented fetch(UriFactory.build(uri)) .then(response => response.text()) .then((html) => { @@ -148,7 +148,7 @@ export class GeneralUI // document.open(); // document.write(html); // document.close(); - // @todo: fix memory leak which most likely exists because of continous binding without removing binds + // @todo fix memory leak which most likely exists because of continous binding without removing binds window.omsApp.reInit(); } }; @@ -174,7 +174,7 @@ export class GeneralUI // document.open(); // document.write(html); // document.close(); - // @todo: fix memory leak which most likely exists because of continous binding without removing binds + // @todo fix memory leak which most likely exists because of continous binding without removing binds window.omsApp.reInit(); const event = new Event('DOMContentLoaded'); diff --git a/UI/RemoteData.js b/UI/RemoteData.js index 808bf59..9c52288 100755 --- a/UI/RemoteData.js +++ b/UI/RemoteData.js @@ -145,7 +145,7 @@ export class RemoteData : Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]')) ); - // @todo: don't just overwrite data, check if data is different + // @todo don't just overwrite data, check if data is different // insert values into element (populate values) RemoteData.setRemoteData('text', texts, data[i]); diff --git a/UI/UIStateManager.js b/UI/UIStateManager.js index ef3bc5f..c8c6235 100755 --- a/UI/UIStateManager.js +++ b/UI/UIStateManager.js @@ -83,7 +83,7 @@ export class UIStateManager break; case 'div': - // @todo: this is not working, WHY? state is correct, but element.scrollTop is just ignored?! + // @todo this is not working, WHY? state is correct, but element.scrollTop is just ignored?! element.scrollLeft = state.x; element.scrollTop = state.y;