This commit is contained in:
Dennis Eichhorn 2024-01-02 23:34:19 +00:00
parent 11b87fd722
commit ca6031ee45
2 changed files with 16 additions and 11 deletions

View File

@ -350,7 +350,8 @@ export class Form
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-value]'))
);
texts = texts.concat(
texts = texts.concat(
dataOriginElement.hasAttribute('data-tpl-text')
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]'))
@ -484,7 +485,8 @@ export class Form
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-value]'))
);
texts = texts.concat(
texts = texts.concat(
dataOriginElement.hasAttribute('data-tpl-text')
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]'))
@ -553,7 +555,8 @@ export class Form
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-value]'))
);
texts = texts.concat(
texts = texts.concat(
dataOriginElement.hasAttribute('data-tpl-text')
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]'))
@ -648,7 +651,8 @@ export class Form
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-value]'))
);
texts = texts.concat(
texts = texts.concat(
dataOriginElement.hasAttribute('data-tpl-text')
? dataOriginElement
: Array.prototype.slice.call(dataOriginElement.querySelectorAll('[data-tpl-text]'))
@ -948,8 +952,9 @@ export class Form
Form.insertDataIntoForm(self, 'value', externalFormId, values, remoteUrls);
// This prevents overwriting results from setting data by value in the next step
length = texts.length;
length = texts.length;
const length2 = values.length;
for (let i = 0; i < length; ++i) {
const tagName = texts[i].tagName.toLowerCase();
if (tagName === 'select') {

View File

@ -111,15 +111,15 @@ export class GeneralUI
) {
window.open(UriFactory.build(uri), '_blank');
} else if (this.getAttribute('data-redirect') !== null) {
window.location.href = uri.indexOf('://') > 0
window.location.href = UriFactory.build(uri.indexOf('://') > 0
? uri
: jsOMS.rtrim(window.omsApp.request.getRootPath(), '/') + '/' + jsOMS.ltrim(uri, '/');
: jsOMS.rtrim(window.omsApp.request.getRootPath(), '/') + '/' + jsOMS.ltrim(uri, '/'));
} else if (uri !== null) {
// window.location = UriFactory.build(uri);
// @todo : consider to implement the line above again. why was it removed?
window.location.href = uri.indexOf('://') > 0
window.location.href = UriFactory.build(uri.indexOf('://') > 0
? uri
: 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
@ -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 continuous 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 continuous binding without removing binds
window.omsApp.reInit();
const event = new Event('DOMContentLoaded');