diff --git a/UI/Component/Form.js b/UI/Component/Form.js index bfd4617..2c56455 100755 --- a/UI/Component/Form.js +++ b/UI/Component/Form.js @@ -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') { diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index b6a1ea8..a07b656 100755 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -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');