{"version":3,"sources":["logicjs.js","logicjs.accordions.js","table.js","rt-tab-list.js","more-text.js","repeater-accordions.js","popup-note.js","popout-feature.js","mobile-nav.js","fix-scroll.js","sid.js","common.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"verso.js","sourcesContent":["/*** Welcome to logicjs ***\r\n As this is the only required file, keep it clean by only including neccessary functions.\r\n Create a new file for new features e.g logicjs.exampleFeature = function(){}. From here create your prototype functions.\r\n*/\r\n\r\nif (typeof (logicjs) === \"undefined\") var logicjs = {};\r\n\r\n/*** Touch screen device check ***\r\n returns true if is touchscreen device\r\n*/\r\n\r\nlogicjs.isTouchDevice = function () {\r\n return 'ontouchstart' in window // works on most browsers \r\n ||\r\n navigator.maxTouchPoints; // works on IE10/11 and Surface\r\n};\r\n\r\n/*** Browser Check ***\r\n Returns browser associated values (eg -webkit-)\r\n*/\r\n\r\nlogicjs.browserKit = function () {\r\n var styles = window.getComputedStyle(document.documentElement, ''),\r\n pre = (Array.prototype.slice\r\n .call(styles)\r\n .join('')\r\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\r\n )[1],\r\n dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1];\r\n return {\r\n dom: dom,\r\n lowercase: pre,\r\n css: '-' + pre + '-',\r\n js: pre[0].toUpperCase() + pre.substr(1)\r\n };\r\n};\r\n\r\n/*** Cookie script ***\r\n set cookie - sets cookie values passed in: \"cookie-name\" : string, \"cookie value\" : string, 500 : number\r\n get cookie - returns cookie value\r\n*/\r\n\r\nlogicjs.setCookie = function (cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\r\n var expires = \"expires=\" + d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}\r\n\r\nlogicjs.getCookie = function (cname) {\r\n var name = cname + \"=\",\r\n ca = document.cookie.split(';');\r\n for (var i = 0; i < ca.length; i++) {\r\n var c = ca[i];\r\n while (c.charAt(0) == ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) == 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return \"\";\r\n}","/*\r\n accordions\r\n Version: 1.2 (verso)\r\n Author: Rory Saxby & Jake Upshall\r\n Dependencies: jQuery\r\n\r\n EXAMPLE:\r\n\r\n *** Initialise ***\r\n\r\n var generalAccordions = new logicjs.accordions({\r\n container: \".page-accordions\",\r\n accordionsClass: \".general-accordion\",\r\n accordionCtrlTarget: \".toggle-ctrl\",\r\n hiddenClass: \"hidden\",\r\n accordionView: \".accordion-view\",\r\n loadingClass: \"loading\"\r\n });\r\n\r\n *** Markup ***\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n */\r\n\r\nif (typeof (logicjs) === \"undefined\") var logicjs = {};\r\n\r\nlogicjs.accordions = function (opts) {\r\n this.container = $(opts.container);\r\n this.accordionsClass = opts.accordionsClass;\r\n this.accordionsPathClass = opts.accordionsPathClass != null ? opts.accordionsPathClass : \" > \";\r\n this.accordions = this.container.find(this.accordionsPathClass + this.accordionsClass);\r\n this.accordionCtrlTarget = opts.accordionCtrlTarget;\r\n this.accordionCtrlTargets = this.container.find(opts.accordionCtrlTarget);\r\n this.accordionClickCallback = opts.accordionClickCallback != null ? opts.accordionClickCallback : false;\r\n this.hiddenClass = opts.hiddenClass != null ? opts.hiddenClass : \"inactive\";\r\n this.loadActiveClass = opts.loadActiveClass != null ? opts.loadActiveClass : \"initially-opened\";\r\n this.onLoadActiveCheckCallback = opts.onLoadActiveCheckCallback != null ? opts.onLoadActiveCheckCallback : false;\r\n this.accordionView = opts.accordionView;\r\n this.parentAccordionView = opts.parentAccordionView != null ? opts.parentAccordionView : null;\r\n this.loadingClass = opts.loadingClass != null ? opts.loadingClass : \"loading\";\r\n this.storeOpenCookie = opts.storeOpenCookie != null ? opts.storeOpenCookie : false; // {name:\"\", value:\"\", expires} || false;\r\n this.toggleAccordions = opts.toggleAccordions != null ? opts.toggleAccordions : false;\r\n this.toggleCallback = opts.toggleCallback != null ? opts.toggleCallback : false;\r\n this.setAccordionHeights = opts.setAccordionHeights != null ? opts.setAccordionHeights : true;\r\n this.disableAccordionClick = opts.disableAccordionClick != null ? opts.disableAccordionClick : false;\r\n this.loadHidden = opts.loadAccordionsHidden != null ? opts.loadAccordionsHidden : true;\r\n this.scrollToView = opts.scrollToView ? opts.scrollToView : false;\r\n this.scrollUnderClassList = opts.scrollUnderClassList ? opts.scrollUnderClassList : [];\r\n this.scrollTransitionDelay = opts.scrollTransitionDelay ? opts.scrollTransitionDelay : 200;\r\n this.scrollTime = opts.scrollTime ? opts.scrollTime : 200;\r\n\r\n this.setupAccordions();\r\n};\r\n\r\nlogicjs.accordions.prototype.setupAccordions = function () {\r\n if (this.storeOpenCookie) this.getStoredCookie();\r\n this.container.addClass(this.loadingClass);\r\n this.bindAccordions();\r\n if (this.loadHidden) this.hideAll(this.disableCookieUpdate);\r\n this.container.removeClass(this.loadingClass);\r\n};\r\n\r\nlogicjs.accordions.prototype.bindAccordions = function () {\r\n $(this.accordionCtrlTargets).off('click').on('click', function (e) {\r\n e.preventDefault();\r\n if (!this.disableAccordionClick) this.setActiveAccordion($(e.target).closest(this.accordionsClass));\r\n }.bind(this));\r\n};\r\n\r\nlogicjs.accordions.prototype.setActiveAccordion = function (selected, disableCookieUpdate) {\r\n var expanded = false;\r\n if (selected.hasClass(this.hiddenClass)) {\r\n if (this.scrollToView) this.navigateToView(selected);\r\n if (this.toggleAccordions) this.hideAll(disableCookieUpdate);\r\n this.openSelectedView(selected);\r\n selected.removeClass(this.hiddenClass);\r\n expanded = true;\r\n } else {\r\n selected.addClass(this.hiddenClass);\r\n this.hideSelectedView(selected);\r\n }\r\n\r\n if (this.storeOpenCookie && !disableCookieUpdate) {\r\n this.updateStoredCookie(selected, expanded);\r\n this.updateCookie();\r\n }\r\n\r\n if (this.toggleCallback) this.toggleCallback();\r\n};\r\n\r\nlogicjs.accordions.prototype.updateCookie = function () {\r\n var value = JSON.stringify(this.storedCookie);\r\n logicjs.setCookie(this.storeOpenCookie.name, value, 7);\r\n};\r\n\r\nlogicjs.accordions.prototype.updateStoredCookie = function (accordion, expanded) {\r\n var name = accordion.find(this.accordionCtrlTarget).first().attr(this.storeOpenCookie.attr);\r\n if (expanded) {\r\n if (this.storedCookie.length > 0) {\r\n for (var i = 0; i < this.storedCookie.length; i++) {\r\n if (this.storedCookie[i] === name) return;\r\n }\r\n }\r\n this.storedCookie.push(name);\r\n return;\r\n }\r\n if (this.storedCookie.length == 0) return;\r\n for (var i = 0; i < this.storedCookie.length; i++) {\r\n if (this.storedCookie[i] === name) {\r\n this.storedCookie.splice(i, 1);\r\n return;\r\n }\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.openSelectedView = function (selected) {\r\n if (this.setAccordionHeights) {\r\n var view = selected.find(this.accordionView).first(),\r\n height = view[0].scrollHeight * 1.2;\r\n\r\n view[0].style.maxHeight = height + \"px\";\r\n this.setParentView(view, height);\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.setSelectedView = function (view, height) {\r\n view[0].style.maxHeight = height + \"px\";\r\n};\r\n\r\nlogicjs.accordions.prototype.setParentView = function (view, height) {\r\n if (this.parentAccordionView !== null) {\r\n var parentView = $(view).parents(this.parentAccordionView).first();\r\n parentView[0].style.maxHeight = parentView[0].scrollHeight + height + \"px\";\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.hideAll = function (disableCookieUpdate) {\r\n for (var i = 0; i < this.accordions.length; i++) {\r\n var selected = $(this.accordions[i]);\r\n\r\n if (this.storeOpenCookie && !disableCookieUpdate) this.updateStoredCookie(selected, false);\r\n\r\n if (!selected.hasClass(this.loadActiveClass)) {\r\n this.hideSelectedView(selected);\r\n } else {\r\n selected.removeClass(this.loadActiveClass);\r\n\r\n var view = selected.find(this.accordionView),\r\n height = view[0].scrollHeight * 3;\r\n\r\n this.setSelectedView(view, height);\r\n }\r\n\r\n }\r\n this.updateCookie();\r\n};\r\n\r\nlogicjs.accordions.prototype.hideSelectedView = function (selected) {\r\n selected.addClass(this.hiddenClass);\r\n if (this.setAccordionHeights) selected.find(this.accordionView)[0].style.maxHeight = 0;\r\n};\r\n\r\nlogicjs.accordions.prototype.removeAllSetHeights = function () {\r\n for (var i = 0; i < this.accordions.length; i++) {\r\n var view = $(this.accordions[i]).find(this.accordionView).first();\r\n view.attr('style', '');\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.unset = function () {\r\n for (var i = 0; i < this.accordions.length; i++) {\r\n $(this.accordions[i]).find(this.accordionCtrlTarget).first().unbind('click');\r\n $(this.accordions[i]).removeClass(this.hiddenClass);\r\n $(this.accordions[i]).find(this.accordionView)[0].style = \"\";\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.getStoredCookie = function () {\r\n var value = logicjs.getCookie(this.storeOpenCookie.name);\r\n this.storedCookie = [];\r\n if (value !== \"\") this.storedCookie = JSON.parse(value);\r\n};\r\n\r\nlogicjs.accordions.prototype.navigateToView = function (selected) {\r\n var _ = this;\r\n\r\n if (this.toggleAccordions) {\r\n\r\n for (var i = 0; i < this.accordions.length; i++) {\r\n\r\n if (!$(this.accordions[i]).hasClass(this.hiddenClass)) {\r\n\r\n this.activeAccordion = $(this.accordions[i]);\r\n\r\n setTimeout(function () {\r\n //_.activeAccordion.off(\"transitionend\").on(\"transitionend\", function () {\r\n _.animateToView(selected);\r\n //});\r\n }, this.scrollTransitionDelay);\r\n }\r\n //else {\r\n // $(this.accordions[i]).unbind(\"transitionend\");\r\n //}\r\n }\r\n }\r\n};\r\n\r\nlogicjs.accordions.prototype.animateToView = function (selected) {\r\n var fixedElementsVal = 0;\r\n\r\n if (this.scrollUnderClassList) {\r\n var item = [];\r\n var array = this.scrollUnderClassList;\r\n\r\n for (item of array) {\r\n if ($(\".\" + item).length > 0) {\r\n fixedElementsVal += $(\".\" + item).height();\r\n }\r\n }\r\n }\r\n\r\n $('html, body').animate({\r\n scrollTop: selected.offset().top - fixedElementsVal\r\n }, this.scrollTime);\r\n};\r\n\r\n/* Functions for external use */\r\n\r\nlogicjs.accordions.prototype.changeOpt = function (opt, value) {\r\n this[opt] = value;\r\n\r\n switch (opt) {\r\n case \"toggleAccordions\":\r\n if (value) {\r\n this.hideAll();\r\n }\r\n break;\r\n case \"setAccordionHeights\":\r\n if (value) {\r\n this.hideAll();\r\n } else {\r\n this.removeAllSetHeights();\r\n }\r\n break;\r\n }\r\n};","var stickyTable = {};\r\n\r\nstickyTable.targetTables = function () {\r\n for (var i = 0; i < stickyTable.containers.length; i++) {\r\n stickyTable.identifyTable($(stickyTable.containers[i]).find(stickyTable.tableClass));\r\n }\r\n};\r\n\r\nstickyTable.identifyTable = function (ele) {\r\n if (ele.hasClass(stickyTable.invertedTableVariationClassName)) {\r\n stickyTable.initInvertedTable(ele);\r\n } else {\r\n stickyTable.initTable(ele);\r\n }\r\n};\r\n\r\n// Inverted Table Fns\r\n\r\nstickyTable.invGetHeaderHeights = function (ele) {\r\n var cells = ele.find(stickyTable.headClass + \" \" + stickyTable.cellClass),\r\n array = [];\r\n\r\n for (var i = 0; i < cells.length; i++) {\r\n array.push($(cells[i]).outerHeight());\r\n }\r\n\r\n return array;\r\n};\r\n\r\nstickyTable.invGetRowCellHeights = function (ele) {\r\n var body = ele.find(stickyTable.bodyClass),\r\n rows = body.find(stickyTable.rowClass),\r\n arrays = {};\r\n\r\n for (var i = 0; i < rows.length; i++) {\r\n arrays[i] = [];\r\n\r\n var cells = $(rows[i]).find(stickyTable.cellClass);\r\n\r\n for (var j = 0; j < cells.length; j++) {\r\n arrays[i].push($(cells[j]).outerHeight());\r\n }\r\n }\r\n\r\n return arrays;\r\n};\r\n\r\nstickyTable.invCompareHeights = function (headerHeights, rowHeights) {\r\n\r\n var array = [];\r\n\r\n for (var i = 0; i < headerHeights.length; i++) {\r\n var compareHeight = headerHeights[i],\r\n j;\r\n\r\n for (j in rowHeights) {\r\n\r\n if (rowHeights[j][i] > compareHeight) {\r\n compareHeight = rowHeights[j][i];\r\n }\r\n }\r\n\r\n array.push(compareHeight);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nstickyTable.initInvertedTable = function (ele) {\r\n\r\n var headerHeights = stickyTable.invGetHeaderHeights(ele),\r\n rowHeights = stickyTable.invGetRowCellHeights(ele),\r\n selectedHeights = stickyTable.invCompareHeights(headerHeights, rowHeights);\r\n\r\n stickyTable.assignInvertedHeights(ele, selectedHeights);\r\n};\r\n\r\n\r\nstickyTable.assignInvertedHeights = function (ele, heights) {\r\n\r\n var rows = ele.find(stickyTable.rowClass);\r\n\r\n for (var i = 0; i < rows.length; i++) {\r\n var cells = $(rows[i]).find(stickyTable.cellClass);\r\n\r\n for (var j = 0; j < cells.length; j++) {\r\n $(cells[j]).css({\r\n 'min-height': heights[j]\r\n });\r\n }\r\n }\r\n};\r\n\r\n// Default Table Fns\r\n\r\nstickyTable.initTable = function (ele) {\r\n var rows = ele.find(stickyTable.rowClass);\r\n\r\n for (var i = 0; i < rows.length; i++) {\r\n var row = $(rows[i]),\r\n cells = row.find(stickyTable.cellClass);\r\n\r\n stickyTable.assignNormalHeight(row, cells);\r\n }\r\n};\r\n\r\nstickyTable.calcRowHeight = function (cells) {\r\n var cellHeight,\r\n maxCellHeight,\r\n val = [];\r\n\r\n for (var i = 0; i < cells.length; i++) {\r\n var cell = $(cells[i]);\r\n cellHeight = cell.innerHeight();\r\n val.push(cellHeight);\r\n }\r\n\r\n maxCellHeight = Math.max.apply(null, val);\r\n\r\n return maxCellHeight;\r\n};\r\n\r\nstickyTable.calcCellHeight = function (cells) {\r\n var row = cells.parent(stickyTable.rowClass),\r\n rowHeight = row.innerHeight();\r\n\r\n return rowHeight;\r\n};\r\n\r\nstickyTable.assignNormalHeight = function (row, cells) {\r\n row.css({\r\n \"height\": stickyTable.calcRowHeight(cells) + \"px\"\r\n });\r\n\r\n var stickyCells = row.find(stickyTable.cellStickyVariationClass);\r\n\r\n if (stickyCells) {\r\n\r\n stickyCells.css({\r\n \"height\": stickyTable.calcCellHeight(cells) + \"px\"\r\n });\r\n }\r\n};\r\n\r\n// End default table Fns\r\n\r\nstickyTable.targetContainers = function () {\r\n if (stickyTable.containers.length > 0) {\r\n stickyTable.targetTables();\r\n }\r\n};\r\n\r\nstickyTable.unsetHeights = function () {\r\n var rows = stickyTable.containers.find(stickyTable.rowClass),\r\n cells = stickyTable.containers.find(stickyTable.cellClass);\r\n\r\n for (var i = 0; i < rows.length; i++) {\r\n $(rows[i]).css({\r\n 'height': ''\r\n });\r\n }\r\n\r\n for (var j = 0; j < cells.length; j++) {\r\n $(cells[j]).css({\r\n 'height': '',\r\n 'min-height': ''\r\n });\r\n }\r\n};\r\n\r\nstickyTable.widthCheck = function () {\r\n\r\n if (window.matchMedia) {\r\n if (window.matchMedia(\"(min-width: 1024px)\").matches) {\r\n stickyTable.targetContainers();\r\n stickyTable.heightsActive = true;\r\n } else {\r\n if (stickyTable.heightsActive) {\r\n stickyTable.unsetHeights();\r\n stickyTable.heightsActive = false;\r\n }\r\n }\r\n }\r\n};\r\n\r\nstickyTable.bindListeners = function () {\r\n window.addEventListener('resize', stickyTable.widthCheck);\r\n};\r\n\r\nstickyTable.init = function () {\r\n stickyTable.containersClass = \".c-table-form-container\";\r\n stickyTable.tableClass = \".c-table-form\";\r\n stickyTable.headClass = \".c-table-form__head\";\r\n stickyTable.bodyClass = \".c-table-form__body\";\r\n stickyTable.rowClass = \".c-table-form__row\";\r\n stickyTable.cellClass = \".c-table-form__cell\";\r\n stickyTable.cellStickyVariationClass = \".c-table-form__cell--sticky\";\r\n stickyTable.invertedTableVariationClassName = \"c-table-form--list-horizontal\";\r\n\r\n stickyTable.containers = $(stickyTable.containersClass);\r\n if (stickyTable.containers.length > 0) {\r\n stickyTable.heightsActive = false;\r\n stickyTable.widthCheck();\r\n stickyTable.bindListeners();\r\n }\r\n\r\n};\r\n$(function () {\r\n stickyTable.init();\r\n});","/***************************\r\n- rtTabList \r\n****************************/\r\n\r\nvar rtTabList = function (opts) {\r\n this.container = $(opts.container);\r\n this.listUl = this.container.find(opts.listUl);\r\n this.listItems = this.listUl.find(opts.listItems);\r\n this.menuDisplayClass = opts.menuDisplayClass;\r\n this.disableAnimClass = opts.disableAnimClass;\r\n this.listUl.addClass(this.disableAnimClass);\r\n\r\n this.init();\r\n};\r\n\r\nrtTabList.prototype.addMenuButton = function () {\r\n var button =\r\n '
Selected:
';\r\n this.container.prepend(button);\r\n this.buttonCtrl = this.container.find(\".tab-list-menu-btn\");\r\n};\r\n\r\nrtTabList.prototype.bindMenuButton = function () {\r\n var _ = this;\r\n this.buttonCtrl.off(\"click.listbutton\").on(\"click.listbutton\", function (e) {\r\n e.preventDefault();\r\n _.toggleMenu();\r\n });\r\n};\r\n\r\nrtTabList.prototype.updateButtonText = function (text) {\r\n this.buttonCtrl[0].innerText = text;\r\n};\r\n\r\nrtTabList.prototype.bindListItems = function () {\r\n var _ = this;\r\n\r\n this.listItems.on(\"click\", function () {\r\n _.updateButtonText($(this).find(\".rtsTxt\")[0].innerText);\r\n _.hideMenu();\r\n });\r\n};\r\n\r\nrtTabList.prototype.hideMenu = function () {\r\n this.listUl.addClass(this.menuDisplayClass);\r\n this.buttonCtrl.removeClass(\"active\");\r\n};\r\n\r\nrtTabList.prototype.showMenu = function () {\r\n this.listUl.removeClass(this.menuDisplayClass);\r\n this.buttonCtrl.addClass(\"active\");\r\n};\r\n\r\nrtTabList.prototype.toggleMenu = function () {\r\n if (this.listUl.hasClass(this.menuDisplayClass)) {\r\n this.showMenu();\r\n } else {\r\n this.hideMenu();\r\n }\r\n};\r\n\r\nrtTabList.prototype.loadFirstTabText = function () {\r\n for (var i = 0; i < this.listItems.length; i++) {\r\n if ($(this.listItems[i]).hasClass(\"rtsSelected\")) {\r\n this.updateButtonText($(this.listItems[i]).find(\".rtsTxt\")[0].innerText);\r\n }\r\n }\r\n};\r\n\r\nrtTabList.prototype.init = function () {\r\n this.addMenuButton();\r\n this.bindMenuButton();\r\n this.bindListItems();\r\n this.loadFirstTabText();\r\n\r\n this.hideMenu();\r\n};\r\n\r\n/***************************\r\n- rtTabList menus\r\n****************************/\r\n\r\nvar tabListMenu = {};\r\n\r\ntabListMenu.init = function () {\r\n var tabMenuOne = new rtTabList({\r\n container: \"#pvApplications\",\r\n listUl: \".rtsUL\",\r\n listItems: \"> li\",\r\n menuDisplayClass: \"list-hidden\",\r\n disableAnimClass: \"disable-animation\"\r\n });\r\n var tabMenuTwo = new rtTabList({\r\n container: \"#pvProfile\",\r\n listUl: \".rtsUL\",\r\n listItems: \"> li\",\r\n menuDisplayClass: \"list-hidden\",\r\n disableAnimClass: \"disable-animation\"\r\n });\r\n};","//In Core\r\n\r\n\r\n/*************************************\r\n- The (read) 'more' and (read) 'less' links on the end of some lengthy sentences\r\n**************************************/\r\n\r\n//$(function () {\r\n// var readToggleButton = {};\r\n\r\n// readToggleButton.bind = function () {\r\n// for (var i = 0; i < readToggleButton.readMoreBtn.length; i++) {\r\n// readToggleButton.showText(i);\r\n// }\r\n\r\n// for (var i = 0; i < readToggleButton.readLessBtn.length; i++) {\r\n// readToggleButton.hideText(i);\r\n// }\r\n// };\r\n\r\n// readToggleButton.showText = function (i) {\r\n// $(readToggleButton.readMoreBtn[i]).off('click.show').on('click.show', function (e) {\r\n// e.preventDefault();\r\n\r\n// readToggleButton.innerSpan = this.parentNode;\r\n// readToggleButton.outerSpan = readToggleButton.innerSpan.parentNode;\r\n// readToggleButton.label = readToggleButton.outerSpan.parentNode;\r\n\r\n// readToggleButton.textMin = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMinClass)[0];\r\n// readToggleButton.textMax = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMaxClass)[0];\r\n\r\n// readToggleButton.textMin.classList.add(\"hidden\");\r\n// readToggleButton.textMax.classList.add(\"show\");\r\n// });\r\n// };\r\n\r\n// readToggleButton.hideText = function (i) {\r\n// $(readToggleButton.readLessBtn[i]).off('click.hide').on('click.hide', function (e) {\r\n// e.preventDefault();\r\n\r\n// readToggleButton.innerSpan = this.parentNode;\r\n// readToggleButton.outerSpan = readToggleButton.innerSpan.parentNode;\r\n// readToggleButton.label = readToggleButton.outerSpan.parentNode;\r\n\r\n// readToggleButton.textMin = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMinClass)[0];\r\n// readToggleButton.textMax = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMaxClass)[0];\r\n\r\n// readToggleButton.textMin.classList.remove(\"hidden\");\r\n// readToggleButton.textMax.classList.remove(\"show\");\r\n// });\r\n// };\r\n\r\n// readToggleButton.init = function () {\r\n\r\n// if (document.getElementsByClassName(\"more-text__button-show\").length > 0) {\r\n\r\n// readToggleButton.moreTextMinClass = \"more-text__min\";\r\n// readToggleButton.moreTextMaxClass = \"more-text__max\";\r\n\r\n// readToggleButton.readMoreBtn = document.getElementsByClassName(\"more-text__button-show\");\r\n// readToggleButton.readLessBtn = document.getElementsByClassName(\"more-text__button-hide\");\r\n\r\n// readToggleButton.bind();\r\n// }\r\n// };\r\n// readToggleButton.init();\r\n//});\r\n","/***************************\r\n- Repeater Accordions\r\n****************************/\r\nvar repeaterAccs = {};\r\n\r\nrepeaterAccs.getAccordionNameSetting = function (ele) {\r\n var dataName = ele.attributes.getNamedItem(\"data-accordion-name\");\r\n\r\n if (dataName) {\r\n return dataName.value;\r\n }\r\n return false;\r\n};\r\n\r\nrepeaterAccs.getToggleSetting = function (ele) {\r\n var dataToggle = ele.attributes.getNamedItem(\"data-accordion-toggle\");\r\n\r\n if (dataToggle) {\r\n return JSON.parse(dataToggle.value);\r\n }\r\n return false;\r\n};\r\n\r\nrepeaterAccs.init = function () {\r\n\r\n repeaterAccs.repeaters = document.getElementsByClassName(\"c-fieldset-accordions\");\r\n if (repeaterAccs.repeaters) {\r\n\r\n repeaterAccs.accordionSet = [];\r\n\r\n for (var i = 0; i < repeaterAccs.repeaters.length; i++) {\r\n repeaterAccs.accordionSet[i] = new logicjs.accordions({\r\n container: repeaterAccs.repeaters[i],\r\n accordionsPathClass: \" > div > \",\r\n accordionsClass: \".c-fieldset-accordions__item\",\r\n accordionCtrlTarget: \".c-fieldset-accordions__toggle\",\r\n hiddenClass: \"c-fieldset-accordions__item--hidden\",\r\n accordionView: \".c-fieldset-accordions__view\",\r\n storeOpenCookie: {\r\n name: repeaterAccs.getAccordionNameSetting(repeaterAccs.repeaters[i]) || \"ApplicationFieldsetAccordionExpanded\",\r\n attr: \"data-accordion-row-id\"\r\n },\r\n loadingClass: \"loading\",\r\n toggleAccordions: repeaterAccs.getToggleSetting(repeaterAccs.repeaters[i]),\r\n loadAccordionsHidden: true,\r\n setAccordionHeights: true\r\n });\r\n }\r\n }\r\n};\r\n\r\n$(function () {\r\n repeaterAccs.init();\r\n});","/*************************************\r\n- Pop up notes\r\n**************************************/\r\n\r\nvar popupNote = {};\r\n\r\npopupNote.setBindings = function () {\r\n popupNote.icons.off(\"click.note\").on(\"click.note\", function () {\r\n var popupIcon = $(this).parent(),\r\n noteContainer = $(popupIcon.find(\".\" + popupNote.containerClass));\r\n\r\n popupNote.setPosition(popupIcon, noteContainer);\r\n popupNote.toggleActivate(popupIcon, noteContainer);\r\n popupNote.setPosition(popupIcon, noteContainer);\r\n });\r\n};\r\n\r\npopupNote.toggleActivate = function (popupIcon, noteContainer) {\r\n if (noteContainer.hasClass(popupNote.hiddenClass)) {\r\n popupNote.targetArray = [popupIcon, noteContainer];\r\n\r\n popupNote.hideAll();\r\n noteContainer.removeClass(popupNote.hiddenClass);\r\n popupIcon.addClass(popupNote.iconActiveClass);\r\n\r\n popupNote.bindDocument();\r\n } else {\r\n popupNote.targetArray[1].addClass(popupNote.hiddenClass);\r\n popupNote.targetArray[0].removeClass(popupNote.iconActiveClass);\r\n }\r\n};\r\n\r\npopupNote.bindDocument = function () {\r\n document.addEventListener(\"mousedown\", popupNote.handleClick);\r\n};\r\n\r\npopupNote.handleClick = function (e) {\r\n e.stopImmediatePropagation();\r\n var target = e.target;\r\n\r\n if ($(target).hasClass(popupNote.iconClass)) {\r\n document.removeEventListener(\"mousedown\", popupNote.handleClick);\r\n return;\r\n }\r\n\r\n if (\r\n !$(target)\r\n .parents()\r\n .hasClass(popupNote.containerClass) &&\r\n !$(target).hasClass(popupNote.containerClass)\r\n ) {\r\n document.removeEventListener(\"mousedown\", popupNote.handleClick);\r\n popupNote.toggleActivate(\r\n popupNote.targetArray[0],\r\n popupNote.targetArray[1]\r\n );\r\n }\r\n};\r\n\r\npopupNote.hideAll = function () {\r\n var containers = $(\".\" + popupNote.containerClass);\r\n for (var i = 0; i < containers.length; i++) {\r\n $(containers[i])\r\n .parent()\r\n .removeClass(popupNote.iconActiveClass);\r\n $(containers[i]).addClass(popupNote.hiddenClass);\r\n }\r\n};\r\n\r\npopupNote.setPosition = function (note, noteContainer) {\r\n var rect = note[0].getBoundingClientRect(),\r\n halfContainer = noteContainer[0].scrollWidth / 2;\r\n\r\n // left side check\r\n if (rect.x < halfContainer) {\r\n noteContainer.css(\"left\", -rect.x + 10 + \"px\");\r\n } else if (window.innerWidth - rect.x < halfContainer) {\r\n var leftOver = window.innerWidth - rect.x;\r\n var overAmount = halfContainer - leftOver;\r\n var position = overAmount + halfContainer;\r\n\r\n noteContainer.css(\"left\", -position - 20 + \"px\");\r\n } else {\r\n noteContainer.css(\"left\", -halfContainer + 10 + \"px\");\r\n }\r\n};\r\n\r\npopupNote.init = function () {\r\n popupNote.containerClass = \"popup-note-container\";\r\n popupNote.hiddenClass = \"hidden\";\r\n popupNote.iconActiveClass = \"active\";\r\n popupNote.iconClass = \"popup-note-icon\";\r\n popupNote.icons = $(\".\" + popupNote.iconClass);\r\n popupNote.hideAll();\r\n popupNote.setBindings();\r\n};\r\n\r\n\r\n$(function () {\r\n popupNote.init();\r\n});\r\n\r\n","/***************************\r\n- Popout Overlay\r\n****************************/\r\n\r\nvar popoutOverlay = function (opts) {\r\n this.containersClass = opts.containersClass;\r\n this.containers = $(opts.containers);\r\n this.innerContainerClass = opts.innerContainerClass != null ? opts.innerContainerClass : null;\r\n this.overflowVariationClass = opts.overflowVariationClass != null ? opts.overflowVariationClass : null;\r\n this.activeClass = opts.activeContainerClass != null ? opts.activeContainerClass : \"popup-container--open\";\r\n this.hiddenClass = opts.hiddenButtonClass != null ? opts.hiddenButtonClass : \"initially-hidden\";\r\n this.btnOuterCloseClass = opts.outerCloseButtonClass;\r\n this.btnLaunchClass = opts.launchButtonClass;\r\n this.btnCloseClass = opts.closeButtonClass;\r\n this.closePopoutBP = opts.closePopoutBP != null ? opts.closePopoutBP : null;\r\n\r\n this.bindAction();\r\n};\r\n\r\npopoutOverlay.prototype.bindAction = function () {\r\n\r\n if (this.containers.find(\".\" + this.btnLaunchClass)) {\r\n var _ = this;\r\n\r\n this.btnOpen = this.containers.find(\".\" + this.btnLaunchClass);\r\n this.btnClose = this.containers.find(\".\" + this.btnCloseClass);\r\n this.btnOuterClose = this.containers.find(\".\" + this.btnOuterCloseClass);\r\n\r\n this.btnOpen.off(\"click\").on(\"click\", function () {\r\n _.openPopout();\r\n _.addOverflowClass();\r\n\r\n if (_.closePopoutBP) {\r\n window.addEventListener(\"resize\", _.checkBrowserWidth.bind(_));\r\n }\r\n });\r\n\r\n this.btnClose.off(\"click\").on(\"click\", function () {\r\n _.closePopout();\r\n _.removeOverflowClass();\r\n window.removeEventListener(\"resize\", _.checkBrowserWidth);\r\n });\r\n\r\n this.btnOuterClose.off(\"click\").on(\"click\", function () {\r\n _.closePopout();\r\n _.removeOverflowClass();\r\n window.removeEventListener(\"resize\", _.checkBrowserWidth);\r\n });\r\n\r\n this.containers.off(\"click\").on(\"click\", function (e) {\r\n if ($(e.target).hasClass(_.activeClass)) {\r\n _.closePopout();\r\n _.removeOverflowClass();\r\n window.removeEventListener(\"resize\", _.checkBrowserWidth);\r\n }\r\n });\r\n }\r\n};\r\n\r\npopoutOverlay.prototype.checkBrowserWidth = function () {\r\n if (window.matchMedia) {\r\n\r\n if (window.matchMedia(\"(max-width:\" + this.closePopoutBP + \"px)\").matches) {\r\n this.closePopout();\r\n this.removeOverflowClass();\r\n }\r\n }\r\n};\r\n\r\npopoutOverlay.prototype.addOverflowClass = function () {\r\n var _ = this;\r\n\r\n if (_.overflowVariationClass) {\r\n _.getOverlaySettings();\r\n window.addEventListener('resize', _.getOverlaySettings.bind(_));\r\n }\r\n};\r\n\r\npopoutOverlay.prototype.removeOverflowClass = function () {\r\n var _ = this;\r\n\r\n if (this.overflowVariationClass) {\r\n this.containers.removeClass(this.overflowVariationClass);\r\n window.removeEventListener('resize', _.getOverlaySettings);\r\n }\r\n};\r\n\r\npopoutOverlay.prototype.openPopout = function () {\r\n this.btnOpen.addClass(this.hiddenClass);\r\n this.btnOuterClose.removeClass(this.hiddenClass);\r\n this.btnClose.removeClass(this.hiddenClass);\r\n if (!this.containers.hasClass(this.activeClass)) this.containers.addClass(this.activeClass);\r\n};\r\n\r\npopoutOverlay.prototype.closePopout = function () {\r\n this.btnOuterClose.addClass(this.hiddenClass);\r\n this.btnClose.addClass(this.hiddenClass);\r\n this.btnOpen.removeClass(this.hiddenClass);\r\n this.containers.removeClass(this.activeClass);\r\n};\r\n\r\npopoutOverlay.prototype.getOverlaySettings = function () {\r\n var overlayTarget = document.getElementsByClassName(this.containersClass)[0].getElementsByClassName(this.innerContainerClass)[0];\r\n\r\n var overlayTopPos = overlayTarget.getBoundingClientRect().top;\r\n var overlayDisplayHeight = overlayTarget.parentNode.getBoundingClientRect().bottom;\r\n var overlayBottomPos = overlayDisplayHeight - overlayTarget.getBoundingClientRect().bottom;\r\n\r\n this.checkOverlayPosition(overlayTopPos, overlayBottomPos);\r\n};\r\n\r\npopoutOverlay.prototype.checkOverlayPosition = function (topPos, bottomPos) {\r\n if (topPos <= 0 && bottomPos <= 0) {\r\n this.containers.addClass(this.overflowVariationClass);\r\n } else {\r\n this.containers.removeClass(this.overflowVariationClass);\r\n }\r\n};\r\n\r\n\r\n\r\n\r\n\r\nvar popoutFeature = function () {\r\n var initPopout = function () {\r\n var popoutSet = [];\r\n\r\n for (var i = 0; i < repeaters.length; i++) {\r\n popoutSet[i] = new popoutOverlay({\r\n containersClass: popoutContainerClass,\r\n containers: repeaters[i],\r\n innerContainerClass: \"c-popout-container__inner\",\r\n overflowVariationClass: \"c-popout-container--overflow\",\r\n activeContainerClass: \"c-popout-container--open\",\r\n hiddenButtonClass: \"initially-hidden\",\r\n launchButtonClass: \"c-popout-container__btn-launch\",\r\n closeButtonClass: \"c-popout-container__btn-close\",\r\n outerCloseButtonClass: \"c-popout-container__btn-outer-close\",\r\n closePopoutBP: 767\r\n });\r\n }\r\n };\r\n\r\n var popoutContainerClass = \"c-popout-container\";\r\n var repeaters = document.getElementsByClassName(popoutContainerClass);\r\n if (repeaters) initPopout();\r\n};\r\n\r\nvar popoutFeature2 = function () {\r\n var initPopout = function () {\r\n var popoutSet = [];\r\n\r\n for (var i = 0; i < repeaters.length; i++) {\r\n popoutSet[i] = new popoutOverlay({\r\n containersClass: popoutContainerClass,\r\n containers: repeaters[i],\r\n innerContainerClass: \"c-table-form-container__outer\",\r\n overflowVariationClass: \"c-table-form-container--overflow\",\r\n activeContainerClass: \"c-table-form-container--popout\",\r\n hiddenButtonClass: \"initially-hidden\",\r\n launchButtonClass: \"c-table-form__btn-launch\",\r\n closeButtonClass: \"c-table-form__btn-close\",\r\n outerCloseButtonClass: \"c-table-form-container__btn-close\",\r\n closePopoutBP: 1023\r\n });\r\n }\r\n };\r\n\r\n var popoutContainerClass = \"c-table-form-container\";\r\n var repeaters = document.getElementsByClassName(popoutContainerClass);\r\n if (repeaters) initPopout();\r\n};\r\n\r\n$(function () {\r\n popoutFeature();\r\n popoutFeature2();\r\n});","/*************************************\r\n- Site navigation dropdowns for mobile\r\n**************************************/\r\n\r\n$(function () {\r\n var siteDropNav = {};\r\n\r\n siteDropNav.targets = function () {\r\n siteDropNav.container = $(\"#SiteNavigation\");\r\n siteDropNav.ddLinks = siteDropNav.container.find(\"li.has-sub-nav > a\");\r\n };\r\n\r\n siteDropNav.bind = function () {\r\n siteDropNav.ddLinks.off(\"click\").on(\"click\", function () {\r\n siteDropNav.toggleClass($(this).parent());\r\n });\r\n };\r\n\r\n siteDropNav.toggleClass = function (ddContainer) {\r\n if (ddContainer.hasClass(\"active\")) {\r\n ddContainer.removeClass(\"active\");\r\n } else {\r\n ddContainer.addClass(\"active\");\r\n }\r\n };\r\n\r\n siteDropNav.init = function () {\r\n siteDropNav.targets();\r\n siteDropNav.bind();\r\n };\r\n});","/* Config */\r\n\r\n/***************************\r\n-Fix Scroll\r\n****************************/\r\n\r\nvar fixedScrollAlt = function (opts) {\r\n this.opts = {};\r\n\r\n this.opts.ele = $(opts.fixedElement) || false;\r\n this.opts.adjEle = $(opts.adjacentElement) || false;\r\n this.opts.fixedClass = opts.fixedClass || false;\r\n this.opts.absoluteClass = opts.absoluteClass || false;\r\n this.opts.prevScroll = opts.prevScroll || 0;\r\n this.opts.enableWidth = opts.enableWidth || null;\r\n this.opts.fixAlt = opts.fixAlt || true;\r\n\r\n if (this.checkOpts()) {\r\n this.init();\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.checkOpts = function () {\r\n if (\r\n !this.opts.ele ||\r\n !this.opts.adjEle ||\r\n !this.opts.fixedClass ||\r\n !this.opts.absoluteClass\r\n ) {\r\n console.error(\"fixedScrollAlt: Missing required initialise property\");\r\n return false;\r\n }\r\n return true;\r\n};\r\n\r\n/***** Start Alt *****/\r\n\r\nfixedScrollAlt.prototype.identifyAlternateState = function () {\r\n if (\r\n this.opts.wScrollTop < this.opts.adjEleTop ||\r\n this.opts.eleHeight > this.opts.adjEleHeight\r\n ) {\r\n this.unsetAll();\r\n } else {\r\n switch (this.opts.wScrollDir) {\r\n case \"up\":\r\n this.identifyAlternateStateUp();\r\n break;\r\n case \"down\":\r\n this.identifyAlternateStateDown();\r\n break;\r\n }\r\n }\r\n\r\n this.opts.prevScroll = this.opts.wScrollTop;\r\n};\r\n\r\nfixedScrollAlt.prototype.identifyAlternateStateUp = function () {\r\n if (this.opts.wScrollTop - 1 > this.opts.eleTop) {\r\n this.unsetFixed();\r\n this.fixAbsolute(this.opts.eleOffsetContainer);\r\n return;\r\n }\r\n\r\n if (\r\n this.opts.wScrollTop <= this.opts.eleTop &&\r\n this.opts.wScrollTop > this.opts.adjEleTop\r\n ) {\r\n this.setFixed();\r\n this.attachTop();\r\n this.unsetAbsolute();\r\n return;\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.identifyAlternateStateDown = function () {\r\n if (\r\n this.opts.wScrollBottom >= this.opts.eleBottom &&\r\n this.opts.wScrollBottom < this.opts.adjEleBottom\r\n ) {\r\n // fix window to bottom\r\n this.setFixed();\r\n this.attachBottom();\r\n this.unsetAbsolute();\r\n return;\r\n }\r\n\r\n if (\r\n this.opts.wScrollBottom < this.opts.eleBottom ||\r\n this.opts.wScrollBottom >= this.opts.adjEleBottom\r\n ) {\r\n this.unsetFixed();\r\n this.fixAbsolute(this.opts.eleOffsetContainer);\r\n return;\r\n }\r\n};\r\n\r\n/***** End Alt *****/\r\n\r\n/***** Start Fixed *****/\r\n\r\nfixedScrollAlt.prototype.identifyFixedState = function () {\r\n switch (this.opts.wScrollDir) {\r\n case \"up\":\r\n this.identifyFixedStateUp();\r\n break;\r\n case \"down\":\r\n this.identifyFixedStateDown();\r\n break;\r\n }\r\n\r\n this.opts.prevScroll = this.opts.wScrollTop;\r\n};\r\n\r\nfixedScrollAlt.prototype.identifyFixedStateUp = function () {\r\n if (this.opts.wScrollTop < this.opts.adjEleTop) {\r\n this.unsetFixed();\r\n this.unsetAbsolute();\r\n this.clearInlineStyles();\r\n return;\r\n }\r\n\r\n if (this.opts.wScrollTop <= this.opts.eleTop) {\r\n this.setFixed();\r\n this.attachTop();\r\n this.unsetAbsolute();\r\n return;\r\n }\r\n\r\n if (this.opts.wScrollTop - 1 > this.opts.eleTop) {\r\n this.unsetFixed();\r\n this.fixAbsolute(this.opts.eleOffsetMax);\r\n return;\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.identifyFixedStateDown = function () {\r\n if (this.opts.eleBottom >= this.opts.adjEleBottom) {\r\n this.unsetFixed();\r\n this.fixAbsolute(this.opts.eleOffsetMax);\r\n return;\r\n }\r\n\r\n if (this.opts.wScrollTop > this.opts.eleTop) {\r\n this.setFixed();\r\n this.attachTop();\r\n this.unsetAbsolute();\r\n return;\r\n }\r\n};\r\n\r\n/***** End Fixed *****/\r\n\r\nfixedScrollAlt.prototype.unsetAll = function () {\r\n this.unsetFixed();\r\n this.unsetAbsolute();\r\n this.clearInlineStyles();\r\n};\r\n\r\nfixedScrollAlt.prototype.attachBottom = function () {\r\n this.opts.ele.css(\"bottom\", \"0\");\r\n this.opts.ele.css(\"top\", \"auto\");\r\n};\r\n\r\nfixedScrollAlt.prototype.attachTop = function () {\r\n this.opts.ele.css(\"top\", \"0\");\r\n this.opts.ele.css(\"bottom\", \"auto\");\r\n};\r\n\r\nfixedScrollAlt.prototype.setFixed = function () {\r\n this.opts.ele.addClass(this.opts.fixedClass);\r\n};\r\n\r\nfixedScrollAlt.prototype.fixAbsolute = function (calc) {\r\n this.opts.ele.addClass(this.opts.absoluteClass);\r\n this.opts.ele.css(\"top\", calc + \"px\");\r\n this.opts.ele.css(\"bottom\", \"auto\");\r\n};\r\n\r\nfixedScrollAlt.prototype.unsetFixed = function () {\r\n this.opts.ele.removeClass(this.opts.fixedClass);\r\n};\r\n\r\nfixedScrollAlt.prototype.unsetAbsolute = function () {\r\n this.opts.ele.removeClass(this.opts.absoluteClass);\r\n};\r\n\r\nfixedScrollAlt.prototype.clearInlineStyles = function () {\r\n this.opts.ele.css({\r\n bottom: \"\",\r\n top: \"\"\r\n });\r\n};\r\n\r\nfixedScrollAlt.prototype.scrollDir = function () {\r\n if (this.opts.wScrollTop > this.opts.prevScroll) return \"down\";\r\n if (this.opts.wScrollTop < this.opts.prevScroll) return \"up\";\r\n if (this.opts.wScrollTop == this.opts.prevScroll) return \"same\";\r\n};\r\n\r\nfixedScrollAlt.prototype.compareColElements = function () {\r\n if (this.opts.fixAlt) {\r\n if (\r\n this.opts.eleHeight > this.opts.wHeight\r\n // && this.opts.adjEleHeight > this.opts.wHeight\r\n ) {\r\n return \"fix alternate\";\r\n }\r\n }\r\n\r\n if (\r\n this.opts.eleHeight < this.opts.wHeight\r\n // && this.opts.adjEleHeight > this.opts.wHeight\r\n ) {\r\n return \"fix top\";\r\n }\r\n return \"unset\";\r\n};\r\n\r\nfixedScrollAlt.prototype.setCalcs = function () {\r\n // Element\r\n this.opts.eleHeight = this.opts.ele[0].scrollHeight;\r\n this.opts.eleTop = Math.floor(this.opts.ele.offset().top);\r\n this.opts.eleBottom = this.opts.eleTop + this.opts.eleHeight;\r\n this.opts.eleOffsetContainer =\r\n this.opts.eleTop - Math.floor(this.opts.ele.parent().offset().top);\r\n // Adjacent element\r\n this.opts.adjEleHeight = this.opts.adjEle[0].scrollHeight;\r\n this.opts.adjEleTop = Math.floor(this.opts.adjEle.offset().top);\r\n this.opts.adjEleBottom = this.opts.adjEleTop + this.opts.adjEleHeight;\r\n\r\n this.opts.eleOffsetMax = this.opts.adjEleHeight - this.opts.eleHeight;\r\n\r\n // Window\r\n this.opts.wHeight = window.innerHeight;\r\n this.opts.wScrollTop = window.pageYOffset;\r\n this.opts.wScrollBottom = this.opts.wHeight + this.opts.wScrollTop;\r\n};\r\n\r\nfixedScrollAlt.prototype.setInitFns = function (outerFn) {\r\n this.setCalcs();\r\n\r\n if (!outerFn) {\r\n this.opts.wScrollDir = this.scrollDir();\r\n }\r\n\r\n switch (this.compareColElements()) {\r\n case \"fix top\":\r\n this.identifyFixedState();\r\n break;\r\n case \"fix alternate\":\r\n this.identifyAlternateState();\r\n break;\r\n case \"unset\":\r\n this.unsetAll();\r\n break;\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.checkContainerHeights = function () {\r\n if (this.opts.ele.outerHeight() < this.opts.adjEle.outerHeight()) {\r\n this.setInitFns();\r\n } else {\r\n this.unsetAll();\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.setListeners = function () {\r\n var _ = this;\r\n\r\n window.addEventListener(\"scroll\", function () {\r\n if (window.matchMedia(\"(min-width:\" + _.opts.enableWidth + \"px)\").matches) {\r\n _.checkContainerHeights();\r\n }\r\n });\r\n\r\n if (this.opts.enableWidth) {\r\n window.addEventListener(\"resize\", function () {\r\n if (\r\n window.matchMedia(\"(min-width:\" + _.opts.enableWidth + \"px)\").matches\r\n ) {\r\n _.checkContainerHeights();\r\n } else {\r\n _.unsetAll();\r\n }\r\n });\r\n }\r\n};\r\n\r\nfixedScrollAlt.prototype.init = function () {\r\n this.checkContainerHeights();\r\n this.setListeners();\r\n};\r\n\r\nfixedScrollAlt.prototype.changeOpt = function (opt, value) {\r\n this.opts[opt] = value;\r\n};\r\n\r\n/***************************\r\n-Init Fix Scroll\r\n****************************/\r\n\r\n$(function () {\r\n if ($(\".sidebar\").length > 0) {\r\n sideNavFn();\r\n }\r\n});\r\n\r\nvar sideNavFn = function () {\r\n var sideNavScroll = new fixedScrollAlt({\r\n fixedElement: \".sidebar\",\r\n adjacentElement: \".content-gutter\",\r\n fixedClass: \"sidebar--fixed\",\r\n absoluteClass: \"sidebar--absolute\",\r\n enableWidth: 768\r\n });\r\n};\r\n\r\n","if (!SIDAction) var SIDAction = {};\r\n\r\n//Click+ (Result Types)\r\n//Ctrl : Short Default Action(Input -> .Input.TextBox(\"sid\",) or Get -> .Find(\"sid\")\r\n//Alt : Short Get -> .Find(\"sid\")\r\n//Shift : SID only -> \"sid\"\r\n//Ctrl + Shift: Long Default Action(Input -> Driver.Input.TextBox(\"sid\",) or Get -> Driver.Find(\"sid\")\r\n//Alt + Shift : Long Get -> Driver.Get(\"sid\")\r\n\r\nSIDAction.getKeyField = function (codeType, SID) {\r\n\r\n switch (codeType) {\r\n case 'state-button': SIDAction.processKey(['.Click_Action(\"{0}\")', 'SEApplication.Click_Action(\"{0}\").Then.Alert_Click_Ok()', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-button': SIDAction.processKey(['.Field(\"{0}\").Click()', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-repeater': SIDAction.processKey(['.Field(\"{0}\").Add_Row()', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-repeater-row': SIDAction.processKey(['.Field(\"{0}\").Remove_Row()', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-group': SIDAction.processKey(['.Field(\"{0}\")', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field': SIDAction.processKey(['.Field(\"{0}\").Input()', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-number': SIDAction.processKey(['.Field(\"{0}\").Input()', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-date': SIDAction.processKey(['.Field(\"{0}\").Input(New Date())', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'field-time': SIDAction.processKey(['.Field(\"{0}\").Input(New TimeSpan())', '.Get.Form.Field(\"{0}\")', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'sign-off-user': SIDAction.processKey(['.SignOff.User({0})', 'SEApplication.SignOff.User({0})', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'sign-off-user-name': SIDAction.processKey(['.SignOff.User({0}).Name', '.SignOff.User({0})', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'sign-off-user-email': SIDAction.processKey(['.SignOff.User({0}).Email', '.SignOff.User({0})', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'sign-off-user-address': SIDAction.processKey(['.SignOff.User({0}).Address', '.SignOff.User({0})', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'sign-off-user-phone': SIDAction.processKey(['.SignOff.User({0}).Phone', '.SignOff.User({0})', 'SEApplication'], SID, false);\r\n break;\r\n\r\n case 'date_tag': SIDAction.processKey(['.Get.Text(\"{0}\")', '.Find(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'data_tag': SIDAction.processKey(['.Get.Text(\"{0}\")', '.Find(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'status_tag': SIDAction.processKey(['.Get.Text(\"{0}\")', '.Get.Element.Attribute_Value(\"{0}\", \"data-status\")', 'Driver'], SID, false);\r\n break;\r\n\r\n default: SIDAction.processKey(['.Get.Form.Field(\"{0}\").Input(\"\")', '.Get.Form.Field(\"{0}\")', 'Driver.Verso'], SID, false);\r\n }\r\n}\r\n\r\n","\r\n$(document).ready(function () {\r\n\r\n\r\n if (document.getElementsByClassName(\"RadTimePicker\").length > 0) timeChanger()\r\n\r\n});\r\n\r\n\r\nfunction timeChanger() {\r\n\r\n var test = $(\".RadTimePicker\").find(\"input[type=hidden]\").val()\r\n var jsonString = JSON.parse(test)\r\n\r\n var minTime = jsonString.minDateStr.substr(jsonString.minDateStr.length - 8)\r\n var maxTime = jsonString.maxDateStr.substr(jsonString.maxDateStr.length - 8)\r\n\r\n var minTimeFormat = minTime.substring(0, minTime.length - 3).replace('-', '.')\r\n var maxTimeFormat = maxTime.substring(0, maxTime.length - 3).replace('-', '.')\r\n\r\n\r\n var table = $(\".RadTimePicker\").find(\".RadCalendarTimeView\").children()\r\n\r\n table.find(\"td\").each(function () {\r\n\r\n var time = $(this).text().replace(':', '.')\r\n\r\n if (time != \"undefined\" & (time < minTimeFormat || time > maxTimeFormat)) {\r\n\r\n $(this).find('a').css(\"color\", \"red\");\r\n }\r\n\r\n\r\n\r\n\r\n })\r\n\r\n\r\n}\r\nfunction rcbCancel(Sender, Args) {\r\n return false;\r\n}\r\n\r\nfunction rcbLoadOnDemand(sender, eventArgs) {\r\n\r\n sender.clearItems();\r\n var list = sender.get_attributes().getAttribute('data-list');\r\n var loadOnDemandInput = sender.get_text() + String.fromCharCode(eventArgs.get_domEvent().keyCode); // Picks up last key press \r\n if (eventArgs.get_domEvent().keyCode == 40 || eventArgs.get_domEvent().keyCode == 38) { // ignore up or down arrows\r\n loadOnDemandInput = sender.get_text();\r\n }\r\n if (loadOnDemandInput.includes(\"..\")) {\r\n return true;\r\n }\r\n if (loadOnDemandInput.length < 3) {\r\n return true;\r\n }\r\n\r\n $.ajax({\r\n method: 'GET',\r\n url: '/online-application/endpoints/form/rcb-load-on-demand.ashx?fdListName=' + list + '&fdSearchTerm=' + loadOnDemandInput,\r\n success: function (r) {\r\n\r\n const response = JSON.parse(r);\r\n const loadOnDemandList = response.LoadOnDemandList;\r\n\r\n sender.trackChanges();\r\n loadOnDemandList.forEach((item) => {\r\n var comboItem = new Telerik.Web.UI.RadComboBoxItem();\r\n comboItem.set_text(item.Item);\r\n comboItem.set_value(item.Tag);\r\n comboItem.selected = true;\r\n sender.get_items().add(comboItem);\r\n });\r\n sender.commitChanges();\r\n $('.rcbScroll.rcbWidth').height((sender.get_items().get_count() * 40) + 5);\r\n },\r\n error: function (e) {\r\n console.error(e);\r\n }\r\n });\r\n\r\n}\r\n"]}