uawdijnntqw1x1x1
IP : 216.73.216.26
Hostname : server.wtmmart.in
Kernel : Linux server.wtmmart.in 4.18.0-553.45.1.el8_10.x86_64 #1 SMP Wed Mar 19 09:44:46 EDT 2025 x86_64
Disable Function : exec,passthru,shell_exec,system
OS : Linux
PATH:
/
home2
/
wtmwscom
/
public_html
/
css
/
..
/
post
/
scripts
/
OutSystemsUI_010.js
/
/
define("OutSystemsUI.controller$ApplicationStartWeb", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ApplicationStartWeb.CloseMenuOnBodyClickJS", "OutSystemsUI.controller$ECTCall", "OutSystemsUI.controller$DeviceDetection"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ApplicationStartWeb_CloseMenuOnBodyClickJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.applicationStartWeb$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_ApplicationStartWeb_CloseMenuOnBodyClickJS, "CloseMenuOnBodyClick", "ApplicationStartWeb", null, function ($parameters) { }, {}, {}); // Execute Action: DeviceDetection OutSystemsUIController.default.deviceDetection$Action(callContext); // Execute Action: ECTCall OutSystemsUIController.default.eCTCall$Action(callContext); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.applicationStartWeb$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.applicationStartWeb$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ApplicationStartWeb.CloseMenuOnBodyClickJS", [], function () { return function ($actions, $roles, $public) { var isDesktop = document.body.classList.contains('desktop'); var closeOnBodyClick = function() { var menu = document.querySelector('.app-menu-links'); if(menu) { var subItems = menu.querySelectorAll('.submenu'); if(subItems.length > 0) { for(var i = 0; i < subItems.length; i++) { if(subItems[i].classList.contains('open')) { subItems[i].CloseMenu(); } } } } }; // If is Desktop, add eventListener on Body, to close Menu on click if(isDesktop) { document.body.addEventListener('click', closeOnBodyClick); } }; }); define("OutSystemsUI.controller$CarouselDisableSwipe", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$CarouselDisableSwipe.AddClassNoSwipeJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_CarouselDisableSwipe_AddClassNoSwipeJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.carouselDisableSwipe$Action = function (carouselIDIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.CarouselDisableSwipe$vars"))()); vars.value.carouselIDInLocal = carouselIDIn; controller.safeExecuteJSNode(OutSystemsUI_controller_CarouselDisableSwipe_AddClassNoSwipeJS, "AddClassNoSwipe", "CarouselDisableSwipe", { CarouselID: OS.DataConversion.JSNodeParamConverter.to(vars.value.carouselIDInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.CarouselDisableSwipe$vars", [{ name: "CarouselID", attrName: "carouselIDInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.carouselDisableSwipe$Action = function (carouselIDIn) { carouselIDIn = (carouselIDIn === undefined) ? "" : carouselIDIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.carouselDisableSwipe$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(carouselIDIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$CarouselDisableSwipe.AddClassNoSwipeJS", [], function () { return function ($parameters, $actions, $roles, $public) { var elem = document.getElementById($parameters.CarouselID).querySelector('.carousel'); if(elem) { elem.classList.add('no-swipe'); } }; }); define("OutSystemsUI.controller$CarouselGoTo", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$CarouselGoTo.CallGoToActionJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_CarouselGoTo_CallGoToActionJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.carouselGoTo$Action = function (widgetIdIn, targetIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.CarouselGoTo$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; vars.value.targetInLocal = targetIn; controller.safeExecuteJSNode(OutSystemsUI_controller_CarouselGoTo_CallGoToActionJS, "CallGoToAction", "CarouselGoTo", { Target: OS.DataConversion.JSNodeParamConverter.to(vars.value.targetInLocal, OS.Types.Integer), WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.CarouselGoTo$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "Target", attrName: "targetInLocal", mandatory: true, dataType: OS.Types.Integer, defaultValue: function () { return 0; } }]); OutSystemsUIController.default.clientActionProxies.carouselGoTo$Action = function (widgetIdIn, targetIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; targetIn = (targetIn === undefined) ? 0 : targetIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.carouselGoTo$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(targetIn, OS.Types.Integer)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$CarouselGoTo.CallGoToActionJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.WidgetId).querySelector('.carousel-container-content').goto($parameters.Target); }; }); define("OutSystemsUI.controller$CarouselNext", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$CarouselNext.CallNextActionJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_CarouselNext_CallNextActionJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.carouselNext$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.CarouselNext$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_CarouselNext_CallNextActionJS, "CallNextAction", "CarouselNext", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.CarouselNext$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.carouselNext$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.carouselNext$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$CarouselNext.CallNextActionJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.WidgetId).querySelector('.carousel-container-content').next(); }; }); define("OutSystemsUI.controller$CarouselPrevious", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$CarouselPrevious.CallPreviousActionJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_CarouselPrevious_CallPreviousActionJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.carouselPrevious$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.CarouselPrevious$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_CarouselPrevious_CallPreviousActionJS, "CallPreviousAction", "CarouselPrevious", { IdCarousel: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.CarouselPrevious$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.carouselPrevious$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.carouselPrevious$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$CarouselPrevious.CallPreviousActionJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.IdCarousel).querySelector('.carousel-container-content').previous(); }; }); define("OutSystemsUI.controller$CarouselUpdate", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$CarouselUpdate.CallUpdateActionJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_CarouselUpdate_CallUpdateActionJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.carouselUpdate$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.CarouselUpdate$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_CarouselUpdate_CallUpdateActionJS, "CallUpdateAction", "CarouselUpdate", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.CarouselUpdate$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.carouselUpdate$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.carouselUpdate$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$CarouselUpdate.CallUpdateActionJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.WidgetId).querySelector('.carousel-container-content').updateCarousel(); }; }); define("OutSystemsUI.controller$ConfigureOfflineDataSync", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ConfigureOfflineDataSync.ConfigureOfflineDataSyncJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ConfigureOfflineDataSync_ConfigureOfflineDataSyncJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.configureOfflineDataSync$Action = function (syncOnOnlineIn, syncOnResumeIn, retryOnErrorIn, retryIntervalInSecondsIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.ConfigureOfflineDataSync$vars"))()); vars.value.syncOnOnlineInLocal = syncOnOnlineIn; vars.value.syncOnResumeInLocal = syncOnResumeIn; vars.value.retryOnErrorInLocal = retryOnErrorIn; vars.value.retryIntervalInSecondsInLocal = retryIntervalInSecondsIn; controller.safeExecuteJSNode(OutSystemsUI_controller_ConfigureOfflineDataSync_ConfigureOfflineDataSyncJS, "ConfigureOfflineDataSync", "ConfigureOfflineDataSync", { SyncOnResume: OS.DataConversion.JSNodeParamConverter.to(vars.value.syncOnResumeInLocal, OS.Types.Boolean), RetryIntervalInSeconds: OS.DataConversion.JSNodeParamConverter.to(vars.value.retryIntervalInSecondsInLocal, OS.Types.Integer), SyncOnOnline: OS.DataConversion.JSNodeParamConverter.to(vars.value.syncOnOnlineInLocal, OS.Types.Boolean), RetryOnError: OS.DataConversion.JSNodeParamConverter.to(vars.value.retryOnErrorInLocal, OS.Types.Boolean) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.ConfigureOfflineDataSync$vars", [{ name: "SyncOnOnline", attrName: "syncOnOnlineInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "SyncOnResume", attrName: "syncOnResumeInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "RetryOnError", attrName: "retryOnErrorInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "RetryIntervalInSeconds", attrName: "retryIntervalInSecondsInLocal", mandatory: true, dataType: OS.Types.Integer, defaultValue: function () { return 0; } }]); OutSystemsUIController.default.clientActionProxies.configureOfflineDataSync$Action = function (syncOnOnlineIn, syncOnResumeIn, retryOnErrorIn, retryIntervalInSecondsIn) { syncOnOnlineIn = (syncOnOnlineIn === undefined) ? false : syncOnOnlineIn; syncOnResumeIn = (syncOnResumeIn === undefined) ? false : syncOnResumeIn; retryOnErrorIn = (retryOnErrorIn === undefined) ? false : retryOnErrorIn; retryIntervalInSecondsIn = (retryIntervalInSecondsIn === undefined) ? 0 : retryIntervalInSecondsIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.configureOfflineDataSync$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(syncOnOnlineIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(syncOnResumeIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(retryOnErrorIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(retryIntervalInSecondsIn, OS.Types.Integer)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ConfigureOfflineDataSync.ConfigureOfflineDataSyncJS", [], function () { return function ($parameters, $actions, $roles, $public) { window.offlineDataSync.configure( $parameters.SyncOnOnline, $parameters.SyncOnResume, $parameters.RetryOnError, $parameters.RetryIntervalInSeconds); }; }); define("OutSystemsUI.controller$DeviceDetection", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$DeviceDetection.StatusBarOverlayJS", "OutSystemsUI.controller$DeviceDetection.AddClassesJS", "OutSystemsUI.controller$GetBrowser", "OutSystemsUI.controller$GetOS", "OutSystemsUI.controller$GetIsTouch"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_DeviceDetection_StatusBarOverlayJS, OutSystemsUI_controller_DeviceDetection_AddClassesJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.deviceDetection$Action = function (callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.DeviceDetection$vars"))()); var getBrowserVar = new OS.DataTypes.VariableHolder(); var getOSVar = new OS.DataTypes.VariableHolder(); var getIsTouchVar = new OS.DataTypes.VariableHolder(); // If the device has a transparent status bar, applies default paddings to the required elements controller.safeExecuteJSNode(OutSystemsUI_controller_DeviceDetection_StatusBarOverlayJS, "StatusBarOverlay", "DeviceDetection", null, function ($parameters) { }, {}, {}); // Get User Agent // UserAgent = ToLower vars.value.userAgentVar = OS.BuiltinFunctions.toLower(OS.BuiltinFunctions.getUserAgent()); // Execute Action: GetBrowser getBrowserVar.value = OutSystemsUIController.default.getBrowser$Action(vars.value.userAgentVar, callContext); // Execute Action: GetOS getOSVar.value = OutSystemsUIController.default.getOS$Action(vars.value.userAgentVar, callContext); // Execute Action: GetIsTouch getIsTouchVar.value = OutSystemsUIController.default.getIsTouch$Action(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_DeviceDetection_AddClassesJS, "AddClasses", "DeviceDetection", { Browser: OS.DataConversion.JSNodeParamConverter.to(getBrowserVar.value.browserOut, OS.Types.Text), IsTouch: OS.DataConversion.JSNodeParamConverter.to(getIsTouchVar.value.isTouchOut, OS.Types.Boolean), OS: OS.DataConversion.JSNodeParamConverter.to(getOSVar.value.oSOut, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.DeviceDetection$vars", [{ name: "UserAgent", attrName: "userAgentVar", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.deviceDetection$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.deviceDetection$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$DeviceDetection.StatusBarOverlayJS", [], function () { return function ($actions, $roles, $public) { var body = document.querySelector('body'); var statusbarHeight = body.getAttribute('data-status-bar-height'); if(statusbarHeight > 0 ) { var header = document.querySelector('.header'); var appMenu = document.querySelector('.app-menu'); var notification = document.querySelector('.notification'); var sidebar = document.querySelector('.sidebar'); var splitRightClose = document.querySelector('.split-right-close'); var topBarLightbox = document.querySelector('.pswp__top-bar'); var headerRight = document.querySelector('.header-right .search-input'); var loginScreen = document.querySelector('.login-screen'); var splashScreen = document.querySelector('.splash-screen'); if(header) { header.style.paddingTop = statusbarHeight + "px"; } if(appMenu) { appMenu.style.paddingTop = statusbarHeight + "px"; } if(notification) { notification.style.paddingTop = (parseInt(statusbarHeight) + 20) + "px"; } if(sidebar) { sidebar.style.paddingTop = statusbarHeight + "px"; } if(splitRightClose) { splitRightClose.style.top = (parseInt(statusbarHeight) + 6) + "px"; } if(topBarLightbox) { topBarLightbox.style.top = statusbarHeight + "px"; } if(headerRight) { headerRight.style.paddingTop = (parseInt(statusbarHeight) + 5) + "px"; } if(loginScreen) { loginScreen.style.paddingTop = statusbarHeight + "px"; } if(splashScreen) { splashScreen.style.paddingTop = statusbarHeight + "px"; } } }; }); define("OutSystemsUI.controller$DeviceDetection.AddClassesJS", [], function () { return function ($parameters, $actions, $roles, $public) { var body = document.querySelector('body'); if($parameters.Browser !== "") { body.classList.add($parameters.Browser); } if($parameters.OS !== "") { body.classList.add($parameters.OS); } if($parameters.IsTouch) { body.classList.add('is--touch'); } }; }); define("OutSystemsUI.controller$ECTCall", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ECTCall.InitECTJS", "OutSystemsUI.controller$GetECTURL"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ECTCall_InitECTJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.eCTCall$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_ECTCall_InitECTJS, "InitECT", "ECTCall", { URL: OS.DataConversion.JSNodeParamConverter.to(OutSystemsUIController.default.getECTURL$Action(callContext).uRLOut, OS.Types.Text), ModuleName: OS.DataConversion.JSNodeParamConverter.to(OS.BuiltinFunctions.getEntryEspaceName(), OS.Types.Text), CurrentLocale: OS.DataConversion.JSNodeParamConverter.to(OS.BuiltinFunctions.getCurrentLocale(), OS.Types.Text), UserId: OS.DataConversion.JSNodeParamConverter.to(OS.BuiltinFunctions.getUserId(), OS.Types.Integer) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.eCTCall$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.eCTCall$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ECTCall.InitECTJS", [], function () { return function ($parameters, $actions, $roles, $public) { function htmlDecode(input){ var e = document.createElement('textarea'); e.innerHTML = input; // handle case of empty input return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue; } function createHTMLElement(block){ var range = document.createRange(); var node = htmlDecode(block); var documentFragment = range.createContextualFragment(node); // Removes the non existant Theme file if(documentFragment.querySelector('#ect_wtOutFeedbackDiv') !== null && documentFragment.querySelector('#ect_wtOutFeedbackDiv').childNodes[0].childNodes[0].href.includes('Theme')) { documentFragment.querySelector('#ect_wtOutFeedbackDiv').childNodes[0].childNodes[0].remove(); } document.body.appendChild(documentFragment); } var soapRequest = new XMLHttpRequest(); var soapBody = '<?xml version="1.0" encoding="utf-8"?>' + '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:api="http://127.0.0.1/Integrics/Enswitch/API" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">' + '<soapenv:Body>' + '<GetModernECT xmlns="http://www.outsystems.com"> <moduleName>' + $parameters.ModuleName + '</moduleName> <userId>' + $parameters.UserId + '</userId> <locale>' + $parameters.CurrentLocale + '</locale> </GetModernECT>' + '</soapenv:Body>' + '</soapenv:Envelope>'; var timeout = 2000; soapRequest.open('POST', window.location.origin + $parameters.URL, true); soapRequest.setRequestHeader('Content-Type', 'text/xml'); soapRequest.responseType = 'document'; soapRequest.timeout = timeout; soapRequest.onload = function() { if (soapRequest.readyState === 4) { if (soapRequest.status === 200) { createHTMLElement(soapRequest.response.getElementsByTagName('GetModernECTResponse')[0].getElementsByTagName('html')[0].innerHTML); if(document.getElementById('ect_wtFeedbackInput') !== null) { document.getElementById('ect_wtFeedbackInput').setAttribute('onchange', ''); document.getElementById('ect_wtFeedbackInput').setAttribute('onkeyup', ''); } } else { console.error(soapRequest.statusText); } } } soapRequest.send(soapBody); }; }); define("OutSystemsUI.controller$EndOfflineDataSync", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$EndOfflineDataSync.TriggerSyncCompleteEventJS", "OutSystemsUI.controller$EndOfflineDataSync.TriggerSyncErrorEventJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_EndOfflineDataSync_TriggerSyncCompleteEventJS, OutSystemsUI_controller_EndOfflineDataSync_TriggerSyncErrorEventJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.endOfflineDataSync$Action = function (hasErrorIn, errorMessageIn, allowRetryIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.EndOfflineDataSync$vars"))()); vars.value.hasErrorInLocal = hasErrorIn; vars.value.errorMessageInLocal = errorMessageIn; vars.value.allowRetryInLocal = allowRetryIn; if((vars.value.hasErrorInLocal)) { controller.safeExecuteJSNode(OutSystemsUI_controller_EndOfflineDataSync_TriggerSyncErrorEventJS, "TriggerSyncErrorEvent", "EndOfflineDataSync", { ErrorMessage: OS.DataConversion.JSNodeParamConverter.to(vars.value.errorMessageInLocal, OS.Types.Text), AllowRetry: OS.DataConversion.JSNodeParamConverter.to(vars.value.allowRetryInLocal, OS.Types.Boolean) }, function ($parameters) { }, {}, {}); } else { controller.safeExecuteJSNode(OutSystemsUI_controller_EndOfflineDataSync_TriggerSyncCompleteEventJS, "TriggerSyncCompleteEvent", "EndOfflineDataSync", null, function ($parameters) { }, {}, {}); } return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.EndOfflineDataSync$vars", [{ name: "HasError", attrName: "hasErrorInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "ErrorMessage", attrName: "errorMessageInLocal", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "AllowRetry", attrName: "allowRetryInLocal", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.endOfflineDataSync$Action = function (hasErrorIn, errorMessageIn, allowRetryIn) { hasErrorIn = (hasErrorIn === undefined) ? false : hasErrorIn; errorMessageIn = (errorMessageIn === undefined) ? "" : errorMessageIn; allowRetryIn = (allowRetryIn === undefined) ? false : allowRetryIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.endOfflineDataSync$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(hasErrorIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(errorMessageIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(allowRetryIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$EndOfflineDataSync.TriggerSyncCompleteEventJS", [], function () { return function ($actions, $roles, $public) { window.offlineDataSync.triggerSyncCompleteEvent(); }; }); define("OutSystemsUI.controller$EndOfflineDataSync.TriggerSyncErrorEventJS", [], function () { return function ($parameters, $actions, $roles, $public) { window.offlineDataSync.triggerSyncErrorEvent($parameters.ErrorMessage, $parameters.AllowRetry); }; }); define("OutSystemsUI.controller$FixInputs", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$FixInputs.FixInputsJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_FixInputs_FixInputsJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.fixInputs$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_FixInputs_FixInputsJS, "FixInputs", "FixInputs", null, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.fixInputs$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.fixInputs$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$FixInputs.FixInputsJS", [], function () { return function ($actions, $roles, $public) { // apply the iOS inputs fix for webviews osui.FixInputs(); }; }); define("OutSystemsUI.controller$GetBrowser", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.getBrowser$Action = function (userAgentIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetBrowser$vars"))()); vars.value.userAgentInLocal = userAgentIn; var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetBrowser$outVars"))()); // DetectBrowser if(((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "edge", 0, false, false) > -1))) { // Edge // Browser = "edge" outVars.value.browserOut = "edge"; } else { if((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "firefox", 0, false, false) > -1)) { // Firefox // Browser = "firefox" outVars.value.browserOut = "firefox"; } else { if(((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "chrome", 0, false, false) > -1) || (OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "crios", 0, false, false) > -1))) { // Chrome // Browser = "chrome" outVars.value.browserOut = "chrome"; } else { if(((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "safari", 0, false, false) > -1) && (OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "chrome", 0, false, false) <= -1))) { // Safari // Browser = "safari" outVars.value.browserOut = "safari"; } } } } return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetBrowser$vars", [{ name: "UserAgent", attrName: "userAgentInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetBrowser$outVars", [{ name: "Browser", attrName: "browserOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getBrowser$Action = function (userAgentIn) { userAgentIn = (userAgentIn === undefined) ? "" : userAgentIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.getBrowser$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(userAgentIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { Browser: OS.DataConversion.JSNodeParamConverter.to(actionResults.browserOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetDeviceOrientation", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetDeviceOrientation.CheckDeviceJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_GetDeviceOrientation_CheckDeviceJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.getDeviceOrientation$Action = function (callContext) { callContext = controller.callContext(callContext); var checkDeviceJSResult = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetDeviceOrientation$outVars"))()); checkDeviceJSResult.value = controller.safeExecuteJSNode(OutSystemsUI_controller_GetDeviceOrientation_CheckDeviceJS, "CheckDevice", "GetDeviceOrientation", { Orientation: OS.DataConversion.JSNodeParamConverter.to("", OS.Types.Text) }, function ($parameters) { var jsNodeResult = new (controller.constructor.getVariableGroupType("OutSystemsUI.GetDeviceOrientation$checkDeviceJSResult"))(); jsNodeResult.orientationOut = OS.DataConversion.JSNodeParamConverter.from($parameters.Orientation, OS.Types.Text); return jsNodeResult; }, {}, {}); // Orientation = CheckDevice.Orientation outVars.value.orientationOut = checkDeviceJSResult.value.orientationOut; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetDeviceOrientation$checkDeviceJSResult", [{ name: "Orientation", attrName: "orientationOut", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetDeviceOrientation$outVars", [{ name: "Orientation", attrName: "orientationOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getDeviceOrientation$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getDeviceOrientation$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { Orientation: OS.DataConversion.JSNodeParamConverter.to(actionResults.orientationOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetDeviceOrientation.CheckDeviceJS", [], function () { return function ($parameters, $actions, $roles, $public) { var classList = document.body.classList; if(classList.contains("landscape")) { $parameters.Orientation = "landscape"; } else if(classList.contains("portrait")) { $parameters.Orientation = "portrait"; } }; }); define("OutSystemsUI.controller$GetDeviceType", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetDeviceType.CheckDeviceJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_GetDeviceType_CheckDeviceJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.getDeviceType$Action = function (callContext) { callContext = controller.callContext(callContext); var checkDeviceJSResult = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetDeviceType$outVars"))()); checkDeviceJSResult.value = controller.safeExecuteJSNode(OutSystemsUI_controller_GetDeviceType_CheckDeviceJS, "CheckDevice", "GetDeviceType", { Device: OS.DataConversion.JSNodeParamConverter.to("", OS.Types.Text) }, function ($parameters) { var jsNodeResult = new (controller.constructor.getVariableGroupType("OutSystemsUI.GetDeviceType$checkDeviceJSResult"))(); jsNodeResult.deviceOut = OS.DataConversion.JSNodeParamConverter.from($parameters.Device, OS.Types.Text); return jsNodeResult; }, {}, {}); // Device = CheckDevice.Device outVars.value.deviceOut = checkDeviceJSResult.value.deviceOut; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetDeviceType$checkDeviceJSResult", [{ name: "Device", attrName: "deviceOut", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetDeviceType$outVars", [{ name: "Device", attrName: "deviceOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getDeviceType$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getDeviceType$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { Device: OS.DataConversion.JSNodeParamConverter.to(actionResults.deviceOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetDeviceType.CheckDeviceJS", [], function () { return function ($parameters, $actions, $roles, $public) { var classList = document.body.classList; if(classList.contains("phone")) { $parameters.Device = "phone"; } else if(classList.contains("tablet")) { $parameters.Device = "tablet"; } else { $parameters.Device = "desktop"; } }; }); define("OutSystemsUI.controller$GetECTURL", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.getECTURL$Action = function (callContext) { callContext = controller.callContext(callContext); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetECTURL$outVars"))()); // URL // URL = "/ECT_Provider/WS_ECT.asmx" outVars.value.uRLOut = "/ECT_Provider/WS_ECT.asmx"; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetECTURL$outVars", [{ name: "URL", attrName: "uRLOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getECTURL$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getECTURL$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { URL: OS.DataConversion.JSNodeParamConverter.to(actionResults.uRLOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetIsTouch", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetIsTouch.SetIsTouchJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_GetIsTouch_SetIsTouchJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.getIsTouch$Action = function (callContext) { callContext = controller.callContext(callContext); var setIsTouchJSResult = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetIsTouch$outVars"))()); setIsTouchJSResult.value = controller.safeExecuteJSNode(OutSystemsUI_controller_GetIsTouch_SetIsTouchJS, "SetIsTouch", "GetIsTouch", { IsTouch: OS.DataConversion.JSNodeParamConverter.to(false, OS.Types.Boolean) }, function ($parameters) { var jsNodeResult = new (controller.constructor.getVariableGroupType("OutSystemsUI.GetIsTouch$setIsTouchJSResult"))(); jsNodeResult.isTouchOut = OS.DataConversion.JSNodeParamConverter.from($parameters.IsTouch, OS.Types.Boolean); return jsNodeResult; }, {}, {}); // IsTouch = SetIsTouch.IsTouch outVars.value.isTouchOut = setIsTouchJSResult.value.isTouchOut; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetIsTouch$setIsTouchJSResult", [{ name: "IsTouch", attrName: "isTouchOut", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetIsTouch$outVars", [{ name: "IsTouch", attrName: "isTouchOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.getIsTouch$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getIsTouch$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsTouch: OS.DataConversion.JSNodeParamConverter.to(actionResults.isTouchOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$GetIsTouch.SetIsTouchJS", [], function () { return function ($parameters, $actions, $roles, $public) { var body = document.body; var isTouch = false; function detectTouchscreen() { if (window.PointerEvent && ('maxTouchPoints' in navigator)) { // if Pointer Events are supported, just check maxTouchPoints if (navigator.maxTouchPoints > 0) { isTouch = true; } } else { // no Pointer Events... if (window.matchMedia && window.matchMedia("(any-pointer:coarse)").matches) { // check for any-pointer:coarse which mostly means touchscreen isTouch = true; } else if (window.TouchEvent || ('ontouchstart' in window)) { // last resort - check for exposed touch events API / event handler isTouch = true; } } return isTouch; } detectTouchscreen(); $parameters.IsTouch = isTouch; }; }); define("OutSystemsUI.controller$GetNetworkStatus", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetNetworkType"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.getNetworkStatus$Action = function (callContext) { callContext = controller.callContext(callContext); var getNetworkTypeVar = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetNetworkStatus$outVars"))()); // Execute Action: GetNetworkType getNetworkTypeVar.value = OutSystemsUIController.default.getNetworkType$Action(callContext); // IsOnline = GetNetworkType.NetworkType <> "none" and GetNetworkType.NetworkType <> "unknown" outVars.value.isOnlineOut = (((getNetworkTypeVar.value.networkTypeOut) !== ("none")) && ((getNetworkTypeVar.value.networkTypeOut) !== ("unknown"))); return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetNetworkStatus$outVars", [{ name: "IsOnline", attrName: "isOnlineOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.getNetworkStatus$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getNetworkStatus$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsOnline: OS.DataConversion.JSNodeParamConverter.to(actionResults.isOnlineOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$GetNetworkType", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetNetworkType.CheckNetworkTypeJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_GetNetworkType_CheckNetworkTypeJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.getNetworkType$Action = function (callContext) { callContext = controller.callContext(callContext); var checkNetworkTypeJSResult = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetNetworkType$outVars"))()); checkNetworkTypeJSResult.value = controller.safeExecuteJSNode(OutSystemsUI_controller_GetNetworkType_CheckNetworkTypeJS, "CheckNetworkType", "GetNetworkType", { NetworkType: OS.DataConversion.JSNodeParamConverter.to("", OS.Types.Text) }, function ($parameters) { var jsNodeResult = new (controller.constructor.getVariableGroupType("OutSystemsUI.GetNetworkType$checkNetworkTypeJSResult"))(); jsNodeResult.networkTypeOut = OS.DataConversion.JSNodeParamConverter.from($parameters.NetworkType, OS.Types.Text); return jsNodeResult; }, {}, {}); // NetworkType = CheckNetworkType.NetworkType outVars.value.networkTypeOut = checkNetworkTypeJSResult.value.networkTypeOut; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetNetworkType$checkNetworkTypeJSResult", [{ name: "NetworkType", attrName: "networkTypeOut", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetNetworkType$outVars", [{ name: "NetworkType", attrName: "networkTypeOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getNetworkType$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.getNetworkType$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { NetworkType: OS.DataConversion.JSNodeParamConverter.to(actionResults.networkTypeOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetNetworkType.CheckNetworkTypeJS", [], function () { return function ($parameters, $actions, $roles, $public) { if (typeof navigator.connection !== "undefined") { //In a mobile device if(typeof navigator.connection.type !== "undefined"){ $parameters.NetworkType = navigator.connection.type; } else { //In a web browser $parameters.NetworkType = "webbrowser"; //TO-DO: Improve this!!! } } else { //In a web browser $parameters.NetworkType = "webbrowser"; //TO-DO: Improve this!!! } }; }); define("OutSystemsUI.controller$GetOS", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetOS.DetectIphoneXJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_GetOS_DetectIphoneXJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.getOS$Action = function (userAgentIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetOS$vars"))()); vars.value.userAgentInLocal = userAgentIn; var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.GetOS$outVars"))()); // Detect Device if((((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "ipad", 0, false, false) > -1) || (OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "iphone", 0, false, false) > -1)))) { // Ios // OS = "ios" outVars.value.oSOut = "ios"; controller.safeExecuteJSNode(OutSystemsUI_controller_GetOS_DetectIphoneXJS, "DetectIphoneX", "GetOS", null, function ($parameters) { }, {}, {}); } else { if((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "android", 0, false, false) > -1)) { // Android // OS = "android" outVars.value.oSOut = "android"; } else { if((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "windows", 0, false, false) > -1)) { // Windows // OS = "windows" outVars.value.oSOut = "windows"; } else { if((OS.BuiltinFunctions.index(vars.value.userAgentInLocal, "mac", 0, false, false) > -1)) { // OSX // OS = "osx" outVars.value.oSOut = "osx"; } } } } return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetOS$vars", [{ name: "UserAgent", attrName: "userAgentInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.GetOS$outVars", [{ name: "OS", attrName: "oSOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.getOS$Action = function (userAgentIn) { userAgentIn = (userAgentIn === undefined) ? "" : userAgentIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.getOS$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(userAgentIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { OS: OS.DataConversion.JSNodeParamConverter.to(actionResults.oSOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$GetOS.DetectIphoneXJS", [], function () { return function ($actions, $roles, $public) { var body = document.querySelector("body"); // detect iPhoneX function detectIphoneX() { // devices list and their screen sizes var devices = [ {width: 1125, height: 2436, description: "iphone x/xs"}, {width: 828, height: 1792, description: "iphone xr"}, {width: 750, height: 1624, description: "iphone xr scaled"}, {width: 1242, height: 2688, description: "iphone xs max"} ]; // get the device pixel ratio var ratio = window.devicePixelRatio || 1; // get the device screen dimensions var screen = { width : window.screen.width * ratio, height : window.screen.height * ratio }; // check if the screen size matches any of the devices in the list for(var i = 0; i < devices.length; i++) { if(devices[i].width === screen.width && devices[i].height === screen.height) { window.iphoneX = true; } } if(window.iphoneX) { // get orientation and register an event to update it detectOrientation(); window.addEventListener("orientationchange", function() { setTimeout(detectOrientation, 500); }); } } // update orientation function detectOrientation() { // store the notch position value var notchPosition; if("orientation" in window) { // mobile browers if (window.orientation == 90) { notchPosition = "left"; } else if (window.orientation == -90) { notchPosition = "right"; } else { notchPosition = "up"; } } else if ("orientation" in window.screen) { // webkit browsers if( window.screen.orientation.type === "landscape-primary") { notchPosition = "left"; } else if( window.screen.orientation.type === "landscape-secondary") { notchPosition = "right"; } else { notchPosition = "up"; } } else if("mozOrientation" in window.screen) { // firefox browsers if( window.screen.mozOrientation === "landscape-primary") { notchPosition = "left"; } else if( window.screen.mozOrientation === "landscape-secondary") { notchPosition = "right"; } else { notchPosition = "up"; } } window.notch = notchPosition; updateClasses(); } function updateClasses() { // set the iphonex class on the body body.classList.add("iphonex"); // override tablet detection on landscape mode if (window.notch == "left" || window.notch == "right") { body.classList.remove("tablet"); body.classList.add("phone"); } } // detect iPhoneX detectIphoneX(); }; }); define("OutSystemsUI.controller$HideHeader", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$HideHeader.HideOnScrollJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_HideHeader_HideOnScrollJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.hideHeader$Action = function (hideHeaderIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.HideHeader$vars"))()); vars.value.hideHeaderInLocal = hideHeaderIn; if((vars.value.hideHeaderInLocal)) { controller.safeExecuteJSNode(OutSystemsUI_controller_HideHeader_HideOnScrollJS, "HideOnScroll", "HideHeader", null, function ($parameters) { }, {}, {}); } return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.HideHeader$vars", [{ name: "HideHeader", attrName: "hideHeaderInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.hideHeader$Action = function (hideHeaderIn) { hideHeaderIn = (hideHeaderIn === undefined) ? false : hideHeaderIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.hideHeader$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(hideHeaderIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$HideHeader.HideOnScrollJS", [], function () { return function ($actions, $roles, $public) { // window.performance.timing is deprecated but the technology that MDN suggest to use is stil experimental and does not work on IE and Safari. Please visit the following link for context: // https://developer.mozilla.org/en-US/docs/Web/API/Performance/timing var loadTime = window.performance.timing.domContentLoadedEventEnd- window.performance.timing.navigationStart; setTimeout(function(){ var hideOnScroll = new osui.HideOnScroll(); hideOnScroll.init(); }, loadTime); }; }); define("OutSystemsUI.controller$iPhoneXPreview", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$iPhoneXPreview.DetectPreviewInDevicesJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_iPhoneXPreview_DetectPreviewInDevicesJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.iPhoneXPreview$Action = function (callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.iPhoneXPreview$vars"))()); // iPhoneX Preview CSS // PreviewCSS = "/* iPhoneX Preview in Devices */ // //.iphonex .bottom-bar-wrapper { // padding-bottom: 5px; //} // //.iphonex .action-sheet { // padding-bottom: 5px; //} // //.iphonex .screen > .floating-actions .floating-actions-icon { // margin-bottom: 35px; //} // ///* portrait only */ //.iphonex.portrait .header, //.iphonex.portrait .notification { // padding-top: 35px; //} // //.iphonex.portrait .app-menu, //.iphonex.portrait .sidebar { // padding-top: 35px; // padding-bottom: 5px; //} // //.iphonex.portrait .split-right-close { // top: 41px; //} // //.iphonex.portrait .header-right .search-input { // padding-top: 40px; //} // //.iphonex.portrait .header-right .search-input:after { // top: 50px; //} // //.iphonex.portrait .feedback-message { // padding-top: 45px; //} // ///* landscape */ //.iphonex.landscape .app-menu, //.iphonex.landscape .sidebar { // padding-bottom: 5px; //} // //.iphonex.landscape .app-menu-links { // padding-left: 35px; //} // //.iphonex.landscape .header, //.iphonex.landscape .main-content, //.iphonex.landscape .bottom-bar-wrapper { // padding-left: 35px; // padding-right: 35px; //}" vars.value.previewCSSVar = "/* iPhoneX Preview in Devices */\r\n\r\n.iphonex .bottom-bar-wrapper { \r\n padding-bottom: 5px; \r\n}\r\n\r\n.iphonex .action-sheet {\r\n padding-bottom: 5px; \r\n}\r\n\r\n.iphonex .screen > .floating-actions .floating-actions-icon { \r\n margin-bottom: 35px; \r\n}\r\n\r\n/* portrait only */\r\n.iphonex.portrait .header,\r\n.iphonex.portrait .notification {\r\n padding-top: 35px;\r\n}\r\n\r\n.iphonex.portrait .app-menu,\r\n.iphonex.portrait .sidebar {\r\n padding-top: 35px;\r\n padding-bottom: 5px;\r\n}\r\n\r\n.iphonex.portrait .split-right-close {\r\n top: 41px;\r\n}\r\n\r\n.iphonex.portrait .header-right .search-input {\r\n padding-top: 40px;\r\n}\r\n\r\n.iphonex.portrait .header-right .search-input:after {\r\n top: 50px; \r\n}\r\n\r\n.iphonex.portrait .feedback-message {\r\n padding-top: 45px;\r\n}\r\n\r\n/* landscape */\r\n.iphonex.landscape .app-menu,\r\n.iphonex.landscape .sidebar {\r\n padding-bottom: 5px;\r\n}\r\n\r\n.iphonex.landscape .app-menu-links {\r\n padding-left: 35px; \r\n}\r\n\r\n.iphonex.landscape .header,\r\n.iphonex.landscape .main-content,\r\n.iphonex.landscape .bottom-bar-wrapper {\r\n padding-left: 35px;\r\n padding-right: 35px;\r\n}"; // Detects the Preview In Devices and adds support for the iPhoneX if needed controller.safeExecuteJSNode(OutSystemsUI_controller_iPhoneXPreview_DetectPreviewInDevicesJS, "DetectPreviewInDevices", "iPhoneXPreview", { PreviewCSS: OS.DataConversion.JSNodeParamConverter.to(vars.value.previewCSSVar, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.iPhoneXPreview$vars", [{ name: "PreviewCSS", attrName: "previewCSSVar", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.iPhoneXPreview$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.iPhoneXPreview$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$iPhoneXPreview.DetectPreviewInDevicesJS", [], function () { return function ($parameters, $actions, $roles, $public) { var body = document.querySelector('body'); var isIframe; var isPreviewInDevices; // detect Preview in Devices function detectPreviewInDevices() { isIframe = window.self !== window.top; if(isIframe) { isPreviewInDevices = window.top.document.querySelector(".marvel-device") !== null; } if(isPreviewInDevices) { if(window.top.document.querySelector(".marvel-device").classList.contains("iphone-x")) { body.classList.add('ios'); body.classList.add('iphonex'); addIphoneXPreview(); } } } function addIphoneXPreview() { var stylesEl = document.getElementById("preview-css"); if (stylesEl === null) { var css = $parameters.PreviewCSS; var style = document.createElement('style'); style.type = 'text/css'; style.id = "preview-css"; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } document.body.appendChild(style); } } detectPreviewInDevices(); }; }); define("OutSystemsUI.controller$IsDesktop", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetDeviceType"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.isDesktop$Action = function (callContext) { callContext = controller.callContext(callContext); var getDeviceTypeVar = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.IsDesktop$outVars"))()); // Execute Action: GetDeviceType getDeviceTypeVar.value = OutSystemsUIController.default.getDeviceType$Action(callContext); // IsDesktop = GetDeviceType.Device = "desktop" outVars.value.isDesktopOut = (getDeviceTypeVar.value.deviceOut === "desktop"); return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.IsDesktop$outVars", [{ name: "IsDesktop", attrName: "isDesktopOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.isDesktop$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.isDesktop$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsDesktop: OS.DataConversion.JSNodeParamConverter.to(actionResults.isDesktopOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$IsPhone", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetDeviceType"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.isPhone$Action = function (callContext) { callContext = controller.callContext(callContext); var getDeviceTypeVar = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.IsPhone$outVars"))()); // Execute Action: GetDeviceType getDeviceTypeVar.value = OutSystemsUIController.default.getDeviceType$Action(callContext); // IsPhone = GetDeviceType.Device = "phone" outVars.value.isPhoneOut = (getDeviceTypeVar.value.deviceOut === "phone"); return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.IsPhone$outVars", [{ name: "IsPhone", attrName: "isPhoneOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.isPhone$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.isPhone$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsPhone: OS.DataConversion.JSNodeParamConverter.to(actionResults.isPhoneOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$IsTablet", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$GetDeviceType"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.isTablet$Action = function (callContext) { callContext = controller.callContext(callContext); var getDeviceTypeVar = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.IsTablet$outVars"))()); // Execute Action: GetDeviceType getDeviceTypeVar.value = OutSystemsUIController.default.getDeviceType$Action(callContext); // IsTablet = GetDeviceType.Device = "tablet" outVars.value.isTabletOut = (getDeviceTypeVar.value.deviceOut === "tablet"); return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.IsTablet$outVars", [{ name: "IsTablet", attrName: "isTabletOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.isTablet$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.isTablet$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsTablet: OS.DataConversion.JSNodeParamConverter.to(actionResults.isTabletOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$IsWebApp", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$IsWebApp.CheckOSUIJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_IsWebApp_CheckOSUIJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.isWebApp$Action = function (callContext) { callContext = controller.callContext(callContext); var checkOSUIJSResult = new OS.DataTypes.VariableHolder(); var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.IsWebApp$outVars"))()); checkOSUIJSResult.value = controller.safeExecuteJSNode(OutSystemsUI_controller_IsWebApp_CheckOSUIJS, "CheckOSUI", "IsWebApp", { IsWebApp: OS.DataConversion.JSNodeParamConverter.to(false, OS.Types.Boolean) }, function ($parameters) { var jsNodeResult = new (controller.constructor.getVariableGroupType("OutSystemsUI.IsWebApp$checkOSUIJSResult"))(); jsNodeResult.isWebAppOut = OS.DataConversion.JSNodeParamConverter.from($parameters.IsWebApp, OS.Types.Boolean); return jsNodeResult; }, {}, {}); // IsWebApp = CheckOSUI.IsWebApp outVars.value.isWebAppOut = checkOSUIJSResult.value.isWebAppOut; return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.IsWebApp$checkOSUIJSResult", [{ name: "IsWebApp", attrName: "isWebAppOut", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.IsWebApp$outVars", [{ name: "IsWebApp", attrName: "isWebAppOut", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.isWebApp$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.isWebApp$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { IsWebApp: OS.DataConversion.JSNodeParamConverter.to(actionResults.isWebAppOut, OS.Types.Boolean) }; }); }; }); define("OutSystemsUI.controller$IsWebApp.CheckOSUIJS", [], function () { return function ($parameters, $actions, $roles, $public) { var isWebApp = document.querySelector('.active-screen .layout.layout-top') || document.querySelector('.active-screen .layout.layout-side'); if(isWebApp) { $parameters.IsWebApp = true; } }; }); define("OutSystemsUI.controller$LayoutReadyMobile", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$iPhoneXPreview", "OutSystemsUI.controller$FixInputs", "OutSystemsUI.controller$DeviceDetection", "OutSystemsUI.controller$HideHeader"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.layoutReadyMobile$Action = function (hideHeaderOnScrollIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.LayoutReadyMobile$vars"))()); vars.value.hideHeaderOnScrollInLocal = hideHeaderOnScrollIn; // Execute Action: DeviceDetection OutSystemsUIController.default.deviceDetection$Action(callContext); // Execute Action: iPhoneXPreview OutSystemsUIController.default.iPhoneXPreview$Action(callContext); // Execute Action: HideHeader OutSystemsUIController.default.hideHeader$Action(vars.value.hideHeaderOnScrollInLocal, callContext); // Execute Action: FixInputs OutSystemsUIController.default.fixInputs$Action(callContext); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.LayoutReadyMobile$vars", [{ name: "HideHeaderOnScroll", attrName: "hideHeaderOnScrollInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.layoutReadyMobile$Action = function (hideHeaderOnScrollIn) { hideHeaderOnScrollIn = (hideHeaderOnScrollIn === undefined) ? false : hideHeaderOnScrollIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.layoutReadyMobile$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(hideHeaderOnScrollIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$LayoutReadyWeb", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$LayoutReadyWeb.RunOnStartJS", "OutSystemsUI.controller$FixInputs", "OutSystemsUI.controller$ApplicationStartWeb"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_LayoutReadyWeb_RunOnStartJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.layoutReadyWeb$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_LayoutReadyWeb_RunOnStartJS, "RunOnStart", "LayoutReadyWeb", null, function ($parameters) { }, { ApplicationStartWeb: OutSystemsUIController.default.clientActionProxies.applicationStartWeb$Action }, {}); // Execute Action: FixInputs OutSystemsUIController.default.fixInputs$Action(callContext); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.layoutReadyWeb$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.layoutReadyWeb$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$LayoutReadyWeb.RunOnStartJS", [], function () { return function ($actions, $roles, $public) { // Runs the ApplicationStart action once and flags on a window variable if(window.applicationStarted === undefined) { $actions.ApplicationStartWeb(); window.applicationStarted = true; } }; }); define("OutSystemsUI.controller$ListItemHint", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ListItemHint.ListItemAnimateJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ListItemHint_ListItemAnimateJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.listItemHint$Action = function (listIdIn, hasLeftActionIn, hasRightActionIn, animationTimeIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.ListItemHint$vars"))()); vars.value.listIdInLocal = listIdIn; vars.value.hasLeftActionInLocal = hasLeftActionIn; vars.value.hasRightActionInLocal = hasRightActionIn; vars.value.animationTimeInLocal = animationTimeIn; controller.safeExecuteJSNode(OutSystemsUI_controller_ListItemHint_ListItemAnimateJS, "ListItemAnimate", "ListItemHint", { AnimationTime: OS.DataConversion.JSNodeParamConverter.to(vars.value.animationTimeInLocal, OS.Types.Decimal), ListId: OS.DataConversion.JSNodeParamConverter.to(vars.value.listIdInLocal, OS.Types.Text), HasRightAction: OS.DataConversion.JSNodeParamConverter.to(vars.value.hasRightActionInLocal, OS.Types.Boolean), HasLeftAction: OS.DataConversion.JSNodeParamConverter.to(vars.value.hasLeftActionInLocal, OS.Types.Boolean) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.ListItemHint$vars", [{ name: "ListId", attrName: "listIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "HasLeftAction", attrName: "hasLeftActionInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "HasRightAction", attrName: "hasRightActionInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }, { name: "AnimationTime", attrName: "animationTimeInLocal", mandatory: true, dataType: OS.Types.Decimal, defaultValue: function () { return OS.DataTypes.Decimal.defaultValue; } }]); OutSystemsUIController.default.clientActionProxies.listItemHint$Action = function (listIdIn, hasLeftActionIn, hasRightActionIn, animationTimeIn) { listIdIn = (listIdIn === undefined) ? "" : listIdIn; hasLeftActionIn = (hasLeftActionIn === undefined) ? false : hasLeftActionIn; hasRightActionIn = (hasRightActionIn === undefined) ? false : hasRightActionIn; animationTimeIn = (animationTimeIn === undefined) ? OS.DataTypes.Decimal.defaultValue : animationTimeIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.listItemHint$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(listIdIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(hasLeftActionIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(hasRightActionIn, OS.Types.Boolean), OS.DataConversion.JSNodeParamConverter.from(animationTimeIn, OS.Types.Decimal)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ListItemHint.ListItemAnimateJS", [], function () { return function ($parameters, $actions, $roles, $public) { var timeoutVar; var timeAnimation = $parameters.AnimationTime / 6; var waitListRender = function() { listEl = document.querySelector('#' + $parameters.ListId); if(!listEl.classList.contains('list-loading')) { listAnimateItems(); clearTimeout(timeoutVar); } else { timeoutVar = setTimeout(waitListRender, 50); } }; var listAnimateItems = function() { setTimeout(function(){ listElement = document.getElementById($parameters.ListId).childNodes[1]; listItemContentLeft = listElement.querySelector('.active-screen .list-item-left-actions'); listItemContentRight = listElement.querySelector('.active-screen .list-item-right-actions'); listElement.style.pointerEvents = 'none'; if($parameters.HasLeftAction && $parameters.HasRightAction || $parameters.HasLeftAction) { listItemContentLeft.classList.add('has-content-animation'); listItemContentLeft.setAttribute('style', 'width:75px; transition: all ' + timeAnimation + 'ms !important;'); setTimeout(function(){ listItemContentLeft.style.width = ''; listItemContentLeft.addEventListener("transitionend", function(event) { listItemContentLeft.classList.remove('has-content-animation'); listItemContentLeft.removeAttribute('style'); listElement.style.pointerEvents = ''; }, false); },timeAnimation * 3); } else if($parameters.HasRightAction) { listItemContentRight.classList.add('has-content-animation-right'); listItemContentRight.setAttribute('style', 'width:75px; transition: all ' + timeAnimation + 'ms !important; height: ' + listElement.offsetHeight + 'px;'); setTimeout(function(){ listItemContentRight.style.width = ''; listItemContentRight.addEventListener("transitionend", function(event) { listItemContentRight.classList.remove('has-content-animation-right'); listItemContentRight.removeAttribute('style'); listElement.style.pointerEvents = ''; }, false); }, timeAnimation * 3); } },timeAnimation); // waiting for screen transition ends }; waitListRender(); }; }); define("OutSystemsUI.controller$MenuHide", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$MenuHide.ToggleLayoutClassJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_MenuHide_ToggleLayoutClassJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.menuHide$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_MenuHide_ToggleLayoutClassJS, "ToggleLayoutClass", "MenuHide", null, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.menuHide$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.menuHide$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$MenuHide.ToggleLayoutClassJS", [], function () { return function ($actions, $roles, $public) { var menu = document.querySelector('.menu'); var appMenu = document.querySelector('.app-menu-container'); var menuOverlay = document.querySelector('.menu-background'); menu.classList.remove('menu--visible'); if(menuOverlay) { menuOverlay.style.opacity = ""; } appMenu.style.transform = ""; appMenu.style.webkitTransform = ""; function OnTransitionEnd() { menu.classList.remove('menu--animatable'); menu.removeEventListener("transitionend", OnTransitionEnd); } menu.addEventListener("transitionend", OnTransitionEnd, false); }; }); define("OutSystemsUI.controller$MenuShow", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$MenuShow.ToggleLayoutClassJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_MenuShow_ToggleLayoutClassJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.menuShow$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_MenuShow_ToggleLayoutClassJS, "ToggleLayoutClass", "MenuShow", null, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.menuShow$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.menuShow$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$MenuShow.ToggleLayoutClassJS", [], function () { return function ($actions, $roles, $public) { var myMenu = document.querySelector(".menu"); myMenu.classList.add('menu--visible'); myMenu.classList.add('menu--animatable'); }; }); define("OutSystemsUI.controller$MoveElement", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$MoveElement.MoveElementJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_MoveElement_MoveElementJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.moveElement$Action = function (elementIn, targetIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.MoveElement$vars"))()); vars.value.elementInLocal = elementIn; vars.value.targetInLocal = targetIn; controller.safeExecuteJSNode(OutSystemsUI_controller_MoveElement_MoveElementJS, "MoveElement", "MoveElement", { Target: OS.DataConversion.JSNodeParamConverter.to(vars.value.targetInLocal, OS.Types.Object), Element: OS.DataConversion.JSNodeParamConverter.to(vars.value.elementInLocal, OS.Types.Object) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.MoveElement$vars", [{ name: "Element", attrName: "elementInLocal", mandatory: true, dataType: OS.Types.Object, defaultValue: function () { return null; } }, { name: "Target", attrName: "targetInLocal", mandatory: true, dataType: OS.Types.Object, defaultValue: function () { return null; } }]); OutSystemsUIController.default.clientActionProxies.moveElement$Action = function (elementIn, targetIn) { elementIn = (elementIn === undefined) ? null : elementIn; targetIn = (targetIn === undefined) ? null : targetIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.moveElement$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(elementIn, OS.Types.Object), OS.DataConversion.JSNodeParamConverter.from(targetIn, OS.Types.Object)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$MoveElement.MoveElementJS", [], function () { return function ($parameters, $actions, $roles, $public) { if($parameters.Target && $parameters.Element) { var screenEl = document.getElementById($parameters.Element); var element = document.querySelector($parameters.Target); if(screenEl && element) { element.appendChild(screenEl); } } }; }); define("OutSystemsUI.controller$SetActiveElement", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SetActiveElement.SetActiveElementJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SetActiveElement_SetActiveElementJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.setActiveElement$Action = function (widgetIdIn, isActiveIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SetActiveElement$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; vars.value.isActiveInLocal = isActiveIn; controller.safeExecuteJSNode(OutSystemsUI_controller_SetActiveElement_SetActiveElementJS, "SetActiveElement", "SetActiveElement", { IsActive: OS.DataConversion.JSNodeParamConverter.to(vars.value.isActiveInLocal, OS.Types.Boolean), ID: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SetActiveElement$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "IsActive", attrName: "isActiveInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.setActiveElement$Action = function (widgetIdIn, isActiveIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; isActiveIn = (isActiveIn === undefined) ? false : isActiveIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.setActiveElement$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(isActiveIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SetActiveElement.SetActiveElementJS", [], function () { return function ($parameters, $actions, $roles, $public) { var elem = document.getElementById($parameters.ID); if($parameters.IsActive) { elem.classList.add('active-element'); } else { elem.classList.remove('active-element'); } }; }); define("OutSystemsUI.controller$SetActiveMenuItems", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SetActiveMenuItems.SetActiveJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SetActiveMenuItems_SetActiveJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.setActiveMenuItems$Action = function (activeItemIn, activeSubItemIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SetActiveMenuItems$vars"))()); vars.value.activeItemInLocal = activeItemIn; vars.value.activeSubItemInLocal = activeSubItemIn; controller.safeExecuteJSNode(OutSystemsUI_controller_SetActiveMenuItems_SetActiveJS, "SetActive", "SetActiveMenuItems", { ActiveItem: OS.DataConversion.JSNodeParamConverter.to(vars.value.activeItemInLocal, OS.Types.Integer), ActiveSubItem: OS.DataConversion.JSNodeParamConverter.to(vars.value.activeSubItemInLocal, OS.Types.Integer) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SetActiveMenuItems$vars", [{ name: "ActiveItem", attrName: "activeItemInLocal", mandatory: false, dataType: OS.Types.Integer, defaultValue: function () { return -1; } }, { name: "ActiveSubItem", attrName: "activeSubItemInLocal", mandatory: false, dataType: OS.Types.Integer, defaultValue: function () { return -1; } }]); OutSystemsUIController.default.clientActionProxies.setActiveMenuItems$Action = function (activeItemIn, activeSubItemIn) { activeItemIn = (activeItemIn === undefined) ? -1 : activeItemIn; activeSubItemIn = (activeSubItemIn === undefined) ? -1 : activeSubItemIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.setActiveMenuItems$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(activeItemIn, OS.Types.Integer), OS.DataConversion.JSNodeParamConverter.from(activeSubItemIn, OS.Types.Integer)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SetActiveMenuItems.SetActiveJS", [], function () { return function ($parameters, $actions, $roles, $public) { var appMenuLinks = document.querySelector('.app-menu-links'); if(appMenuLinks) { var activeLinkBlock = appMenuLinks.children[$parameters.ActiveItem]; if(activeLinkBlock) { activeLinkBlock.classList.add("active"); var activeSubMenu = activeLinkBlock.querySelector('.submenu'); if(activeSubMenu) { activeSubMenu.classList.add("active"); var activeSubMenuItem = activeSubMenu.querySelector('.submenu-items').children[$parameters.ActiveSubItem]; if(activeSubMenuItem) { activeSubMenuItem.classList.add("active"); } } } } }; }); define("OutSystemsUI.controller$SetDeviceBreakpoints", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SetDeviceBreakpoints.SetDeviceOnResizeJS", "OutSystemsUI.model$DeviceConfigurationRec"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SetDeviceBreakpoints_SetDeviceOnResizeJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.setDeviceBreakpoints$Action = function (deviceConfigurationIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SetDeviceBreakpoints$vars"))()); vars.value.deviceConfigurationInLocal = deviceConfigurationIn.clone(); controller.safeExecuteJSNode(OutSystemsUI_controller_SetDeviceBreakpoints_SetDeviceOnResizeJS, "SetDeviceOnResize", "SetDeviceBreakpoints", { Phone: OS.DataConversion.JSNodeParamConverter.to(vars.value.deviceConfigurationInLocal.phoneWidthAttr, OS.Types.Integer), Tablet: OS.DataConversion.JSNodeParamConverter.to(vars.value.deviceConfigurationInLocal.tabletWidthAttr, OS.Types.Integer) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SetDeviceBreakpoints$vars", [{ name: "DeviceConfiguration", attrName: "deviceConfigurationInLocal", mandatory: true, dataType: OS.Types.Record, defaultValue: function () { return new OutSystemsUIModel.DeviceConfigurationRec(); }, complexType: OutSystemsUIModel.DeviceConfigurationRec }]); OutSystemsUIController.default.clientActionProxies.setDeviceBreakpoints$Action = function (deviceConfigurationIn) { deviceConfigurationIn = (deviceConfigurationIn === undefined) ? new OutSystemsUIModel.DeviceConfigurationRec() : deviceConfigurationIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.setDeviceBreakpoints$Action.bind(controller, deviceConfigurationIn), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SetDeviceBreakpoints.SetDeviceOnResizeJS", [], function () { return function ($parameters, $actions, $roles, $public) { $public.View.registerDeviceClassGetter(function() { var deviceList; var userValues; var device; var body = document.body; var isLandscape = body.classList.contains("landscape"); var windowWidth = window.innerWidth || document.documentElement.clientWidth; var windowHeight = window.innerHeight || document.documentElement.clientHeight; userValues = { phone: $parameters.Phone, tablet: $parameters.Tablet, }; var phoneMax = userValues.phone ? userValues.phone : 700; var tabletMax = userValues.tablet ? userValues.tablet : 1024; var desktopMax = 1366; deviceList = ["phone", "tablet","desktop"]; switch(true) { case (windowWidth < phoneMax || (!isLandscape && windowHeight < phoneMax)): device = 0; break; case ((windowWidth >= phoneMax && windowWidth <= tabletMax) || (windowHeight >= phoneMax && windowHeight <= tabletMax && isLandscape)): device = 1; break; case (windowWidth > tabletMax ||(windowHeight > tabletMax && windowHeight < desktopMax && isLandscape)): device = 2; break; } var orient = windowWidth > windowHeight ? "landscape" : "portrait"; return [orient, deviceList[device]]; }); }; }); define("OutSystemsUI.controller$SetMenuIcon", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SetMenuIcon.FindMenuLinksJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SetMenuIcon_FindMenuLinksJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.setMenuIcon$Action = function (menuActionIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SetMenuIcon$vars"))()); vars.value.menuActionInLocal = menuActionIn; // Auto? if(((vars.value.menuActionInLocal === OutSystemsUIModel.staticEntities.menuAction.auto))) { controller.safeExecuteJSNode(OutSystemsUI_controller_SetMenuIcon_FindMenuLinksJS, "FindMenuLinks", "SetMenuIcon", null, function ($parameters) { }, {}, {}); } return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SetMenuIcon$vars", [{ name: "MenuAction", attrName: "menuActionInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.setMenuIcon$Action = function (menuActionIn) { menuActionIn = (menuActionIn === undefined) ? "" : menuActionIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.setMenuIcon$Action.bind(controller, menuActionIn), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SetMenuIcon.FindMenuLinksJS", [], function () { return function ($actions, $roles, $public) { var appMenu = Array.prototype.slice.call(document.querySelectorAll(".bottom-bar a")), bottomBar = Array.prototype.slice.call(document.querySelectorAll(".app-menu a")) var links = appMenu.concat(bottomBar); var showMenu = false; for (var i = 0; i < links.length; i++) { /* removing platform timestamps */ var timestampIndex = window.location.href.indexOf("_ts")-1; var currentPage = timestampIndex > 0 ? window.location.href.substring(0, timestampIndex) : window.location.href; if(links[i].attributes["href"]) { if (currentPage.indexOf(links[i].attributes["href"].value) >= 0 || currentPage[currentPage.length-1] === "/") { showMenu = (window.history ? window.history.length > 0 : true); } } } if(showMenu) { document.querySelector(".app-menu-icon").classList.remove('back'); } else { document.querySelector(".app-menu-icon").classList.add('back'); } }; }); define("OutSystemsUI.controller$SetSelectedTableRow", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SetSelectedTableRow.SetSelectedRowJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SetSelectedTableRow_SetSelectedRowJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.setSelectedTableRow$Action = function (tableIdIn, rowNumberIn, isSelectedIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SetSelectedTableRow$vars"))()); vars.value.tableIdInLocal = tableIdIn; vars.value.rowNumberInLocal = rowNumberIn; vars.value.isSelectedInLocal = isSelectedIn; controller.safeExecuteJSNode(OutSystemsUI_controller_SetSelectedTableRow_SetSelectedRowJS, "SetSelectedRow", "SetSelectedTableRow", { Value: OS.DataConversion.JSNodeParamConverter.to(vars.value.isSelectedInLocal, OS.Types.Boolean), RowNumber: OS.DataConversion.JSNodeParamConverter.to(vars.value.rowNumberInLocal, OS.Types.Integer), WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.tableIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SetSelectedTableRow$vars", [{ name: "TableId", attrName: "tableIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "RowNumber", attrName: "rowNumberInLocal", mandatory: true, dataType: OS.Types.Integer, defaultValue: function () { return 0; } }, { name: "IsSelected", attrName: "isSelectedInLocal", mandatory: true, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.setSelectedTableRow$Action = function (tableIdIn, rowNumberIn, isSelectedIn) { tableIdIn = (tableIdIn === undefined) ? "" : tableIdIn; rowNumberIn = (rowNumberIn === undefined) ? 0 : rowNumberIn; isSelectedIn = (isSelectedIn === undefined) ? false : isSelectedIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.setSelectedTableRow$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(tableIdIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(rowNumberIn, OS.Types.Integer), OS.DataConversion.JSNodeParamConverter.from(isSelectedIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SetSelectedTableRow.SetSelectedRowJS", [], function () { return function ($parameters, $actions, $roles, $public) { var table = document.getElementById($parameters.WidgetId); var tableRow = table.querySelectorAll('.table-row'); if(tableRow[$parameters.RowNumber]) { if($parameters.Value) { tableRow[$parameters.RowNumber].classList.add('table-row-selected'); } else { tableRow[$parameters.RowNumber].classList.remove('table-row-selected'); } } }; }); define("OutSystemsUI.controller$ShowPassword", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ShowPassword.ShowPasswordJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ShowPassword_ShowPasswordJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.showPassword$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_ShowPassword_ShowPasswordJS, "ShowPassword", "ShowPassword", null, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.showPassword$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.showPassword$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ShowPassword.ShowPasswordJS", [], function () { return function ($actions, $roles, $public) { var inputPassword = document.querySelector('.login-password'); var typeInputPassword = inputPassword.type; if(typeInputPassword === 'password') { inputPassword.setAttribute('type', 'text'); } else { inputPassword.setAttribute('type', 'password'); } }; }); define("OutSystemsUI.controller$SidebarToggle", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$SidebarToggle.ToggleSidebarJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_SidebarToggle_ToggleSidebarJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.sidebarToggle$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.SidebarToggle$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_SidebarToggle_ToggleSidebarJS, "ToggleSidebar", "SidebarToggle", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.SidebarToggle$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.sidebarToggle$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.sidebarToggle$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$SidebarToggle.ToggleSidebarJS", [], function () { return function ($parameters, $actions, $roles, $public) { // toggle Sidebar var el; var isOpen; if($parameters.WidgetId !== "") { el = document.querySelector("#" + $parameters.WidgetId + " .sidebar"); } if(el !== null) { isOpen = el.classList.contains("sidebar-open"); if(isOpen) { el.classList.remove("sidebar-open"); } else { el.classList.add("sidebar-open"); } } }; }); define("OutSystemsUI.controller$StackedCardsSwipeLeft", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$StackedCardsSwipeLeft.SwipeLeftJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_StackedCardsSwipeLeft_SwipeLeftJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.stackedCardsSwipeLeft$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.StackedCardsSwipeLeft$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_StackedCardsSwipeLeft_SwipeLeftJS, "SwipeLeft", "StackedCardsSwipeLeft", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.StackedCardsSwipeLeft$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.stackedCardsSwipeLeft$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.stackedCardsSwipeLeft$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$StackedCardsSwipeLeft.SwipeLeftJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element; var swipeActionInterval = setInterval(function(){ element = document.getElementById($parameters.WidgetId); if( element !== null) { element.querySelector('.stackedcards-container').leftAction(); clearInterval(swipeActionInterval); } }, 100) }; }); define("OutSystemsUI.controller$StackedCardsSwipeRight", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$StackedCardsSwipeRight.SwipeRightJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_StackedCardsSwipeRight_SwipeRightJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.stackedCardsSwipeRight$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.StackedCardsSwipeRight$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_StackedCardsSwipeRight_SwipeRightJS, "SwipeRight", "StackedCardsSwipeRight", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.StackedCardsSwipeRight$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.stackedCardsSwipeRight$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.stackedCardsSwipeRight$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$StackedCardsSwipeRight.SwipeRightJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element; var swipeActionInterval = setInterval(function(){ element = document.getElementById($parameters.WidgetId); if( element !== null) { element.querySelector('.stackedcards-container').rightAction(); clearInterval(swipeActionInterval); } }, 100) }; }); define("OutSystemsUI.controller$StackedCardsSwipeTop", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$StackedCardsSwipeTop.SwipeTopJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_StackedCardsSwipeTop_SwipeTopJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.stackedCardsSwipeTop$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.StackedCardsSwipeTop$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_StackedCardsSwipeTop_SwipeTopJS, "SwipeTop", "StackedCardsSwipeTop", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.StackedCardsSwipeTop$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.stackedCardsSwipeTop$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.stackedCardsSwipeTop$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$StackedCardsSwipeTop.SwipeTopJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element; var swipeActionInterval = setInterval(function(){ element = document.getElementById($parameters.WidgetId); if( element !== null) { element.querySelector('.stackedcards-container').topAction(); clearInterval(swipeActionInterval); } }, 100) }; }); define("OutSystemsUI.controller$StackedCardsUpdate", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$StackedCardsUpdate.UpdateUiJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_StackedCardsUpdate_UpdateUiJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.stackedCardsUpdate$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.StackedCardsUpdate$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_StackedCardsUpdate_UpdateUiJS, "UpdateUi", "StackedCardsUpdate", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.StackedCardsUpdate$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.stackedCardsUpdate$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.stackedCardsUpdate$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$StackedCardsUpdate.UpdateUiJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.WidgetId).querySelector('.stackedcards-container').updateUi(); }; }); define("OutSystemsUI.controller$StartOfflineDataSync", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$StartOfflineDataSync.CallBlockHandlerJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_StartOfflineDataSync_CallBlockHandlerJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.startOfflineDataSync$Action = function (syncUnitIn, discardPendingSyncUnitsIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.StartOfflineDataSync$vars"))()); vars.value.syncUnitInLocal = syncUnitIn; vars.value.discardPendingSyncUnitsInLocal = discardPendingSyncUnitsIn; controller.safeExecuteJSNode(OutSystemsUI_controller_StartOfflineDataSync_CallBlockHandlerJS, "CallBlockHandler", "StartOfflineDataSync", { SyncUnit: OS.DataConversion.JSNodeParamConverter.to(vars.value.syncUnitInLocal, OS.Types.Text), DiscardPendingUnits: OS.DataConversion.JSNodeParamConverter.to(vars.value.discardPendingSyncUnitsInLocal, OS.Types.Boolean) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.StartOfflineDataSync$vars", [{ name: "SyncUnit", attrName: "syncUnitInLocal", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "DiscardPendingSyncUnits", attrName: "discardPendingSyncUnitsInLocal", mandatory: false, dataType: OS.Types.Boolean, defaultValue: function () { return false; } }]); OutSystemsUIController.default.clientActionProxies.startOfflineDataSync$Action = function (syncUnitIn, discardPendingSyncUnitsIn) { syncUnitIn = (syncUnitIn === undefined) ? "" : syncUnitIn; discardPendingSyncUnitsIn = (discardPendingSyncUnitsIn === undefined) ? false : discardPendingSyncUnitsIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.startOfflineDataSync$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(syncUnitIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(discardPendingSyncUnitsIn, OS.Types.Boolean)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$StartOfflineDataSync.CallBlockHandlerJS", [], function () { return function ($parameters, $actions, $roles, $public) { if (window.offlineDataSync) { window.offlineDataSync.sync($parameters.SyncUnit, $parameters.DiscardPendingUnits); } }; }); define("OutSystemsUI.controller$TabsDisableSwipe", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$TabsDisableSwipe.AddClassNoSwipeJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_TabsDisableSwipe_AddClassNoSwipeJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.tabsDisableSwipe$Action = function (tabIDIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.TabsDisableSwipe$vars"))()); vars.value.tabIDInLocal = tabIDIn; controller.safeExecuteJSNode(OutSystemsUI_controller_TabsDisableSwipe_AddClassNoSwipeJS, "AddClassNoSwipe", "TabsDisableSwipe", { TabID: OS.DataConversion.JSNodeParamConverter.to(vars.value.tabIDInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.TabsDisableSwipe$vars", [{ name: "TabID", attrName: "tabIDInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.tabsDisableSwipe$Action = function (tabIDIn) { tabIDIn = (tabIDIn === undefined) ? "" : tabIDIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.tabsDisableSwipe$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(tabIDIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$TabsDisableSwipe.AddClassNoSwipeJS", [], function () { return function ($parameters, $actions, $roles, $public) { var elem = document.getElementById($parameters.TabID).querySelector('.tabs'); if(elem) { elem.classList.add('no-swipe'); } }; }); define("OutSystemsUI.controller$TabsGoTo", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$TabsGoTo.ChangeTabJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_TabsGoTo_ChangeTabJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.tabsGoTo$Action = function (widgetIdIn, tabNumberIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.TabsGoTo$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; vars.value.tabNumberInLocal = tabNumberIn; controller.safeExecuteJSNode(OutSystemsUI_controller_TabsGoTo_ChangeTabJS, "ChangeTab", "TabsGoTo", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text), TabNumber: OS.DataConversion.JSNodeParamConverter.to(vars.value.tabNumberInLocal, OS.Types.Integer) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.TabsGoTo$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "TabNumber", attrName: "tabNumberInLocal", mandatory: true, dataType: OS.Types.Integer, defaultValue: function () { return 0; } }]); OutSystemsUIController.default.clientActionProxies.tabsGoTo$Action = function (widgetIdIn, tabNumberIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; tabNumberIn = (tabNumberIn === undefined) ? 0 : tabNumberIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.tabsGoTo$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(tabNumberIn, OS.Types.Integer)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$TabsGoTo.ChangeTabJS", [], function () { return function ($parameters, $actions, $roles, $public) { var element = document.getElementById($parameters.WidgetId); var countTabs = element.querySelectorAll(".tabs-header-tab").length -1; var tabsElement = element.querySelectorAll(".tabs-header-tab"); var countEmptyTabs = element.querySelectorAll(".tabs-header-tab.ph"); var isEmpty = 0; for(i = 0; i < tabsElement.length; i++) { if(countEmptyTabs[i].childNodes.length === 0) { isEmpty = isEmpty + 1; } } if(($parameters.TabNumber + 1) <= countTabs) { element.changeTab($parameters.TabNumber); } else { element.changeTab(countTabs - isEmpty); } }; }); define("OutSystemsUI.controller$TextEllipsis", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController) { var OS = OutSystems.Internal; OutSystemsUIController.default.textEllipsis$Action = function (textIn, numberOfCharsIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.TextEllipsis$vars"))()); vars.value.textInLocal = textIn; vars.value.numberOfCharsInLocal = numberOfCharsIn; var outVars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.TextEllipsis$outVars"))()); // Out = If + If outVars.value.outOut = ((((OS.BuiltinFunctions.length(vars.value.textInLocal) > vars.value.numberOfCharsInLocal)) ? (OS.BuiltinFunctions.substr(vars.value.textInLocal, 0, vars.value.numberOfCharsInLocal)) : (vars.value.textInLocal)) + (((OS.BuiltinFunctions.length(vars.value.textInLocal) > vars.value.numberOfCharsInLocal)) ? ("...") : (""))); return outVars.value; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.TextEllipsis$vars", [{ name: "Text", attrName: "textInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }, { name: "NumberOfChars", attrName: "numberOfCharsInLocal", mandatory: true, dataType: OS.Types.Integer, defaultValue: function () { return 0; } }]); OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.TextEllipsis$outVars", [{ name: "Out", attrName: "outOut", mandatory: false, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.textEllipsis$Action = function (textIn, numberOfCharsIn) { textIn = (textIn === undefined) ? "" : textIn; numberOfCharsIn = (numberOfCharsIn === undefined) ? 0 : numberOfCharsIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.textEllipsis$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(textIn, OS.Types.Text), OS.DataConversion.JSNodeParamConverter.from(numberOfCharsIn, OS.Types.Integer)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return { Out: OS.DataConversion.JSNodeParamConverter.to(actionResults.outOut, OS.Types.Text) }; }); }; }); define("OutSystemsUI.controller$ToggleSideMenu", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$ToggleSideMenu.ToggleSideMenuJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_ToggleSideMenu_ToggleSideMenuJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.toggleSideMenu$Action = function (callContext) { callContext = controller.callContext(callContext); controller.safeExecuteJSNode(OutSystemsUI_controller_ToggleSideMenu_ToggleSideMenuJS, "ToggleSideMenu", "ToggleSideMenu", null, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.clientActionProxies.toggleSideMenu$Action = function () { return controller.executeActionInsideJSNode(OutSystemsUIController.default.toggleSideMenu$Action.bind(controller), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$ToggleSideMenu.ToggleSideMenuJS", [], function () { return function ($actions, $roles, $public) { var layout = document.querySelector('.layout'); if(layout.classList.contains('menu-visible')) { layout.classList.remove('menu-visible'); } else { layout.classList.add('menu-visible'); } }; }); define("OutSystemsUI.controller$VideoPause", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$VideoPause.PauseVideoJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_VideoPause_PauseVideoJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.videoPause$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.VideoPause$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_VideoPause_PauseVideoJS, "PauseVideo", "VideoPause", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.VideoPause$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.videoPause$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.videoPause$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$VideoPause.PauseVideoJS", [], function () { return function ($parameters, $actions, $roles, $public) { var videoWidget = document.getElementById($parameters.WidgetId); var videoTag = videoWidget.querySelector('video'); videoTag.pause(); }; }); define("OutSystemsUI.controller$VideoPlay", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model", "OutSystemsUI.controller", "OutSystemsUI.controller$VideoPlay.PlayVideoJS"], function (exports, OutSystems, OutSystemsUIModel, OutSystemsUIController, OutSystemsUI_controller_VideoPlay_PlayVideoJS) { var OS = OutSystems.Internal; OutSystemsUIController.default.videoPlay$Action = function (widgetIdIn, callContext) { callContext = controller.callContext(callContext); var vars = new OS.DataTypes.VariableHolder(new (controller.constructor.getVariableGroupType("OutSystemsUI.VideoPlay$vars"))()); vars.value.widgetIdInLocal = widgetIdIn; controller.safeExecuteJSNode(OutSystemsUI_controller_VideoPlay_PlayVideoJS, "PlayVideo", "VideoPlay", { WidgetId: OS.DataConversion.JSNodeParamConverter.to(vars.value.widgetIdInLocal, OS.Types.Text) }, function ($parameters) { }, {}, {}); return ; }; var controller = OutSystemsUIController.default; OutSystemsUIController.default.constructor.registerVariableGroupType("OutSystemsUI.VideoPlay$vars", [{ name: "WidgetId", attrName: "widgetIdInLocal", mandatory: true, dataType: OS.Types.Text, defaultValue: function () { return ""; } }]); OutSystemsUIController.default.clientActionProxies.videoPlay$Action = function (widgetIdIn) { widgetIdIn = (widgetIdIn === undefined) ? "" : widgetIdIn; return controller.executeActionInsideJSNode(OutSystemsUIController.default.videoPlay$Action.bind(controller, OS.DataConversion.JSNodeParamConverter.from(widgetIdIn, OS.Types.Text)), OS.Controller.BaseViewController.activeScreen ? OS.Controller.BaseViewController.activeScreen.callContext() : undefined, function (actionResults) { return {}; }); }; }); define("OutSystemsUI.controller$VideoPlay.PlayVideoJS", [], function () { return function ($parameters, $actions, $roles, $public) { var videoWidget = document.getElementById($parameters.WidgetId); var videoTag = videoWidget.querySelector('video'); videoTag.play(); }; }); define("OutSystemsUI.controller", ["exports", "OutSystems/ClientRuntime/Main", "OutSystemsUI.model"], function (exports, OutSystems, OutSystemsUIModel) { var OS = OutSystems.Internal; var OutSystemsUIController = exports; var Controller = (function (_super) { __extends(Controller, _super); function Controller() { _super.apply(this, arguments); } Controller.prototype.clientActionProxies = {}; Controller.prototype.roles = {}; Controller.prototype.defaultTimeout = 10; Controller.prototype.getDefaultTimeout = function () { return OutSystemsUIController.default.defaultTimeout; }; return Controller; })(OS.Controller.BaseModuleController); OutSystemsUIController.default = new Controller(); });
/home2/wtmwscom/public_html/css/../post/scripts/OutSystemsUI_010.js