mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
bug fixes
This commit is contained in:
parent
3b3c6115cd
commit
11b87fd722
|
|
@ -133,7 +133,7 @@ export class Form
|
||||||
|
|
||||||
// don't overwrite existing bind
|
// 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)) {
|
if (Object.prototype.hasOwnProperty.call(this.forms, id)) {
|
||||||
return;
|
return;
|
||||||
} */
|
} */
|
||||||
|
|
@ -532,7 +532,7 @@ export class Form
|
||||||
updateElementNames[i] = updateElementNames[i].trim();
|
updateElementNames[i] = updateElementNames[i].trim();
|
||||||
|
|
||||||
// get the elment to update
|
// 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(
|
updateElements.push(
|
||||||
formElement.querySelector(updateElementNames[i] + '[data-id="' + elementContainer.getAttribute('data-id') + '"]')
|
formElement.querySelector(updateElementNames[i] + '[data-id="' + elementContainer.getAttribute('data-id') + '"]')
|
||||||
);
|
);
|
||||||
|
|
@ -1009,14 +1009,14 @@ export class Form
|
||||||
jsOMS.preventAll(event);
|
jsOMS.preventAll(event);
|
||||||
self.submit(self.forms[id], self.forms[id].getSubmit()[elementIndex]);
|
self.submit(self.forms[id], self.forms[id].getSubmit()[elementIndex]);
|
||||||
} else if (false) { // eslint-disable-line no-constant-condition
|
} 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.
|
// 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
|
// this means popup active highlights filter icon AND different content checkbox also highlights filter
|
||||||
// -> two hiddin checkboxes are necessary (one is already implemented)
|
// -> 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.
|
// 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)
|
// e.g. media renderer based on currently selected element)
|
||||||
|
|
||||||
// remote actions (maybe solvable with callbacks?):
|
// remote actions (maybe solvable with callbacks?):
|
||||||
|
|
@ -1160,7 +1160,7 @@ export class Form
|
||||||
const redirect = form.getFormElement().getAttribute('data-redirect');
|
const redirect = form.getFormElement().getAttribute('data-redirect');
|
||||||
|
|
||||||
request.setData(data);
|
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.setUri(action !== null ? action : form.getAction());
|
||||||
request.setMethod(method !== null ? method : form.getMethod());
|
request.setMethod(method !== null ? method : form.getMethod());
|
||||||
request.setResultCallback(0, function (xhr)
|
request.setResultCallback(0, function (xhr)
|
||||||
|
|
@ -1206,7 +1206,7 @@ export class Form
|
||||||
document.close();
|
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 {
|
} else {
|
||||||
try {
|
try {
|
||||||
const o = JSON.parse(xhr.response)[0];
|
const o = JSON.parse(xhr.response)[0];
|
||||||
|
|
@ -1234,7 +1234,7 @@ export class Form
|
||||||
document.write(html);
|
document.write(html);
|
||||||
document.close();
|
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();
|
window.omsApp.reInit();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ export class Table
|
||||||
|
|
||||||
const baseMenuLine = menu.getElementsByClassName('context-line')[0].cloneNode(true);
|
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) {
|
for (let i = 0; i < length; ++i) {
|
||||||
if (columns[i].firstElementChild.innerText.trim() === '') {
|
if (columns[i].firstElementChild.innerText.trim() === '') {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -486,7 +486,7 @@ export class Table
|
||||||
|
|
||||||
table.appendChild(newRow);
|
table.appendChild(newRow);
|
||||||
|
|
||||||
// @todo: bind buttons if required (e.g. remove, edit button)
|
// @todo bind buttons if required (e.g. remove, edit button)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ export class GeneralUI
|
||||||
|
|
||||||
for (let i = 0; i < length; ++i) {
|
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(
|
const link = UriFactory.buildAbsolute(
|
||||||
e[i].getAttribute('href') !== null ? e[i].getAttribute('href') : e[i].getAttribute('data-href')
|
e[i].getAttribute('href') !== null ? e[i].getAttribute('href') : e[i].getAttribute('data-href')
|
||||||
);
|
);
|
||||||
|
|
@ -86,7 +86,7 @@ export class GeneralUI
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo: implement middle mouse click
|
// @todo implement middle mouse click
|
||||||
e[i].addEventListener('click', function (event) {
|
e[i].addEventListener('click', function (event) {
|
||||||
if ((event.target.parentElement !== this
|
if ((event.target.parentElement !== this
|
||||||
&& event.target.parentElement.getElementsByTagName('input').length > 0)
|
&& event.target.parentElement.getElementsByTagName('input').length > 0)
|
||||||
|
|
@ -122,7 +122,7 @@ export class GeneralUI
|
||||||
: jsOMS.rtrim(window.omsApp.request.getRootPath(), '/') + '/' + jsOMS.ltrim(uri, '/');
|
: 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))
|
fetch(UriFactory.build(uri))
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then((html) => {
|
.then((html) => {
|
||||||
|
|
@ -148,7 +148,7 @@ export class GeneralUI
|
||||||
// document.open();
|
// document.open();
|
||||||
// document.write(html);
|
// document.write(html);
|
||||||
// document.close();
|
// 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();
|
window.omsApp.reInit();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -174,7 +174,7 @@ export class GeneralUI
|
||||||
// document.open();
|
// document.open();
|
||||||
// document.write(html);
|
// document.write(html);
|
||||||
// document.close();
|
// 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();
|
window.omsApp.reInit();
|
||||||
|
|
||||||
const event = new Event('DOMContentLoaded');
|
const event = new Event('DOMContentLoaded');
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ export class RemoteData
|
||||||
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]'))
|
: 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)
|
// insert values into element (populate values)
|
||||||
RemoteData.setRemoteData('text', texts, data[i]);
|
RemoteData.setRemoteData('text', texts, data[i]);
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ export class UIStateManager
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'div':
|
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.scrollLeft = state.x;
|
||||||
element.scrollTop = state.y;
|
element.scrollTop = state.y;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user