{"version":3,"file":"pep.dialog.min.js","names":["fixedDialogDefaults","customAttrs","attr","centerInWindow","draggable","resizable","closeOnEscape","$","extend","document","ready","mobileApp","isRunning","appendTo","undefined","ui","dialog","overlay","events","map","split","event","join","jQuery","window","onpopstate","pepDialog","isOpen","clearingHistoryState","close","ajaxSetup","cache","self","this","jqObject","onDialogClosed","onDialogCancel","secondPopupMode","callbackData","hideContainerOnOpenId","fullScreenModeWidthThreshold","dialogHeight","dialogWidth","initialWindowScrollTop","$openContent","length","append","loadingMarkup","on","onClose","classes","autoOpen","modal","show","effect","duration","hide","open","parent","promise","done","center","blur","setOpenContentAreaAction","action","data","showLoading","find","hideLoading","url","attributes","$contentArea","content","afterContentLoadComplete","first","each","rebindUnobtrusiveValidationOnForm","removeInputTypes","onLoadComplete","maxHeight","minHeight","height","css","responsiveResize","history","pushState","state","onLoadFail","alwaysCallBack","setCrossBtnVisible","customClass","addClass","$contentAreaLoader","empty","memberAutoLoad","nextAll","remove","after","width","iframe1MaxHeight","iframe2MaxHeight","openNew","modalToDialog","thisDialog","fadeOut","fadeIn","innerHTML","setDataForCallback","invokedViaBrowserNav","$outgoingContentArea","setTitleBarText","call","scrollTop","back","removeClass","removeData","slowToggle","html","closingNotViaXButton","text","title","visible","saveButtonSelector","showSaveButton","hideSaveButton","setSaveButtonClick","clickHandler","unbind","click","cancelButtonSelector","showCancelButton","hideCancelButton","setCancelButtonClick","backButtonSelector","showBackButton","hideBackButton","setBackButtonClick","nextButtonSelector","showNextButton","hideNextButton","setNextButtonClick","finishButtonSelector","showFinishButton","hideFinishButton","setFinishButtonClick","printButtonSelector","showPrintButton","hidePrintButton","setPrintButtonClick","openReportsList","reportsListUrl","pep","site","root","currentPageName","buttons","id","style","showSupplementalDocuments","policy","productcd","openWindow","urlAfterRoot","viewportHelper","trigger","showPageContainer","toggle","setTimeout","closest"],"sources":["Members/Scripts/pep.dialog.js"],"mappings":"AAAC,SAASA,oBAAoBC,aAC1B,IAAIC,KAAO,CACPC,g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AO,gBAAiB7B,MAAO,WAAc,MAIlG/F,KAAK6E,gBAAgB,oCAErBvG,EAAE0B,KAAKoG,oBAAoB3E,OAAO,wBAAwBwB,IAAI,QAAS,QACvE3E,EAAE0B,KAAKoG,oBAAoBnD,IAAI,QAAS,QACxC3E,EAAE0B,KAAKgH,qBAAqB/D,IAAI,QAAS,SACzC3E,EAAE0B,KAAKgG,sBAAsB/C,IAAI,QAAS,QAC9C,EAEAjD,KAAKgI,WAAa,SAAUC,cACxB,IAAI7F,IAAMkF,IAAIC,KAAKC,KAAOS,aAC1B1I,OAAOiC,KAAKY,IAChB,EAGApC,KAAKkD,iBAAmB,WAChBzD,UAAUC,SAUNwI,iBAAiBjE,OAASjE,KAAKO,8BAC/BjC,EAAE,QAAQ6J,QAAQ,oBAAqB,EAAC,IACxC7J,EAAE0B,KAAKW,cAAcuB,KAAK,uBAAuBe,IAAI,SAAU,SAa3D3E,EAAE,QAAQ6J,QAAQ,oBAAqB,EAAC,KA0BpD,IAAIC,mBAAqB3I,UAAUC,QAAUwI,iBAAiBjE,MAAQjE,KAAKO,6BAC3EjC,EAAE,IAAM0B,KAAKM,uBAAuB+H,OAAOD,mBAC3C7I,OAAO+I,YAAW,WAAc7I,UAAUQ,SAASsI,QAAQ,cAAc3G,QAAU,IAG9EnC,UAAUC,QACPM,KAAKU,uBAAyB,GAC9BpC,EAAEiB,QAAQwF,UAAU/E,KAAKU,uBAErC,CACJ,CACJ","sourcesContent":["function fixedDialogDefaults(customAttrs) {\r\n var attr = {\r\n centerInWindow: true,\r\n draggable: false,\r\n resizable: false,\r\n closeOnEscape: false\r\n };\r\n\r\n if (customAttrs)\r\n $.extend(attr, customAttrs);\r\n\r\n return attr;\r\n}\r\n\r\n\r\n$(document).ready(function () {\r\n\r\n\r\n if (mobileApp.isRunning) {\r\n\r\n $(\"\").appendTo(\"head\");\r\n\r\n }\r\n\r\n // Patch for bug where scroll bars are not clickable when jQuery UI Modal dialogs are shown.\r\n (function ($, undefined) {\r\n if ($.ui && $.ui.dialog && $.ui.dialog.overlay) {\r\n $.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','), function (event) { return event + '.dialog-overlay'; }).join(' ');\r\n }\r\n }(jQuery));\r\n\r\n //when browser navigation occurs, fire close dialog if it is open.\r\n window.onpopstate = function () {\r\n if (pepDialog && pepDialog.isOpen) {\r\n if (!pepDialog.clearingHistoryState) {\r\n pepDialog.close(false, true);\r\n }\r\n else {\r\n pepDialog.clearingHistoryState = false;\r\n }\r\n }\r\n };\r\n\r\n pepDialog = new function () {\r\n $.ajaxSetup({\r\n // Disable caching of AJAX responses\r\n cache: false\r\n });\r\n\r\n var self = this;\r\n this.jqObject = $('#pep-dialog');\r\n this.onDialogClosed = null;\r\n this.onDialogCancel = null;\r\n this.secondPopupMode = false;\r\n this.callbackData = false;\r\n this.hideContainerOnOpenId = 'workspace';\r\n this.fullScreenModeWidthThreshold = 767;\r\n this.dialogHeight = '';\r\n this.dialogWidth = '';\r\n this.initialWindowScrollTop = 0;\r\n this.clearingHistoryState = false;\r\n //because of introduction of dynamically sized modals in desktop-mode, a max-height is needed\r\n //to prevent the dialog from exceeding a certain height. This is thus far only needed for the members account terms and conditions\r\n //because it is so long\r\n this.isOpen = false;\r\n this.$openContent = null;\r\n //this.customClass = '';\r\n if (this.jqObject.length == 0) {\r\n $('body').append(\"
\");\r\n this.jqObject = $('#pep-dialog');\r\n }\r\n this.loadingMarkup = \"
Loading...
\";\r\n this.jqObject.on(\"dialogclose\", function () { self.onClose(); });\r\n this.jqObject.dialog({\r\n classes: {\r\n \"ui-dialog\": \"shadow ui-corner-all\",\r\n \"ui-dialog-titlebar\": \"ui-corner-all\"\r\n },\r\n autoOpen: false,\r\n modal: true,\r\n show: { effect: \"fade\", duration: 300 },\r\n hide: { effect: \"fade\", duration: 300 },\r\n open: function () {\r\n $(this).parent().promise().done(function () {\r\n $(this).center();\r\n $('button.ui-dialog-titlebar-close').blur();\r\n });\r\n }\r\n });\r\n this.setOpenContentAreaAction = function(action){\r\n this.$openContent.data('actionName', action);\r\n }\r\n this.showLoading = function () {\r\n this.$openContent.find('#pnlPleaseWaitBg').show();\r\n }\r\n this.hideLoading = function () {\r\n this.$openContent.find('#pnlPleaseWaitBg').hide();\r\n }\r\n this.open = function (url, attributes, $contentArea, content) {\r\n //$(\"\").appendTo(\"body\")[0].click(); //give browser back button a destination other than going to previous page\r\n if (!attributes) {\r\n attributes = {};\r\n }\r\n\r\n //if browser supports history state, push state to indicate browser open.\r\n if (!!history.pushState && history.state == null) {\r\n history.pushState('dialogOpen', null, null);\r\n }\r\n //set default full screen mode screen size threshold\r\n if (attributes.fullScreenModeWidthThreshold) {\r\n this.fullScreenModeWidthThreshold = attributes.fullScreenModeWidthThreshold;\r\n }\r\n\r\n //set default id of container to hide when opened in full screen mode\r\n if (attributes.hideContainerOnOpenId) {\r\n this.hideContainerOnOpenId = 'workspace';\r\n }\r\n \r\n this.onLoadFail = attributes.onLoadFail || function () { };\r\n this.isOpen = true;\r\n this.alwaysCallBack = attributes.alwaysCallBack;\r\n this.callbackData = false;\r\n this.setCrossBtnVisible(true);\r\n\r\n if (!$contentArea) {\r\n $contentArea = $('#pep-dialog-content');\r\n $contentArea.data(\"attributes\", attributes);\r\n }\r\n $contentArea.show();\r\n $contentArea.data('minHeight', attributes.height);\r\n\r\n if (attributes && attributes.customClass) {\r\n $contentArea.data('customClass', attributes.customClass);\r\n $contentArea.addClass(attributes.customClass);\r\n\r\n }\r\n this.$openContent = $contentArea;\r\n $contentAreaLoader = $(this.loadingMarkup);\r\n $contentArea.empty().append($contentAreaLoader);\r\n //make sure that any secondary content section is cleared as well\r\n //$('#pep-dialog-content2').empty();\r\n\r\n function afterContentLoadComplete() {\r\n $contentArea.find('form').first().each(function () {\r\n rebindUnobtrusiveValidationOnForm($(this));\r\n removeInputTypes($(this));\r\n });\r\n if (attributes.onLoadComplete) {\r\n attributes.onLoadComplete();\r\n }\r\n \r\n var maxHeight = $contentArea.data('maxHeight') > 0 ? ($contentArea.data('maxHeight') + 'px') : 'none';\r\n var minHeight = $contentArea.data('minHeight') > 0 ? ($contentArea.data('minHeight') + 'px') : ((attributes && attributes.height) ? (attributes.height + 'px') : 'none');\r\n $contentArea.find('.iframeBodyContents').css('max-height', maxHeight);\r\n $contentArea.find('.iframeBodyContents').css('min-height', minHeight);\r\n pepDialog.responsiveResize();\r\n }\r\n\r\n if (!!url && url != '') {\r\n $contentAreaLoader.attr('data-url', url);\r\n //store the url on the content area for reference\r\n $contentArea.attr('data-url', url);\r\n $contentAreaLoader.memberAutoLoad(function () {\r\n afterContentLoadComplete();\r\n }, this.onLoadFail);\r\n }\r\n else if (!!content && content != '') {\r\n $contentAreaLoader.nextAll().remove();\r\n $contentAreaLoader.after(content);\r\n afterContentLoadComplete();\r\n $contentAreaLoader.hide();\r\n }\r\n //----will need to do something like this when our ajax load is done.\r\n //$iframe.load(function () {\r\n // //add a custom class to an iframe content body\r\n // $($(this).get(0).contentWindow.document.body).addClass(pepDialog.customClass);\r\n // pepDialog.responsiveResize();\r\n\r\n //});\r\n\r\n //----use URL to load dialog content\r\n //if (attributes && attributes.fullSizeIFrame) {\r\n // $iframe.attr('src', url);\r\n //}\r\n //else {\r\n // var iframeWidth = 277;\r\n // var iframeHeight = 350;\r\n // if (attributes && attributes.width) iframeWidth = attributes.width - 30;\r\n // if (attributes && attributes.height) iframeHeight = attributes.height - 105;\r\n\r\n // $iframe\r\n // .attr('src', url)\r\n // .css('width', iframeWidth)\r\n // .css('height', iframeHeight);\r\n //}\r\n\r\n \r\n if (attributes && attributes.width) this.dialogWidth = attributes.width;\r\n //----this was needed because some modals have specified height, but others may dynamically resize but not in excess of a maximum height. We will still need this without iframes. \r\n //Maybe instead of having attributes for each of these, we can just put data attributes on the actual markup that we load.\r\n if (attributes && attributes.iframe1MaxHeight) $('#pep-dialog-content').data('maxHeight', attributes.iframe1MaxHeight);\r\n if (attributes && attributes.iframe2MaxHeight) $('#pep-dialog-content2').data('maxHeight', attributes.iframe2MaxHeight);\r\n\r\n if (attributes && attributes.centerInWindow) {\r\n //----we may still need scrolltop logic, but lets reinvent that rather than copy over a bunch of weird code.\r\n //this.initialWindowScrollTop = $(window).scrollTop();\r\n //$(window)\r\n // .resize(function () {\r\n // window.setTimeout(function () {\r\n // pepDialog.jqObject.closest('.ui-dialog').center();\r\n // });\r\n // });\r\n }\r\n\r\n //if (attributes && attributes.customClass) {\r\n //pepDialog.customClass = attributes.customClass;\r\n //pepDialog.jqObject.closest('.ui-dialog').addClass(attributes.customClass);\r\n //}\r\n\r\n this.onDialogClosed = attributes.onDialogClosed;\r\n this.onDialogCancel = attributes.onDialogCancel;\r\n\r\n //added for tealeaf so we can properly replay\r\n $(\".ui-dialog\").find('[role=button]').attr('id', 'ui-dialog-close-button');\r\n $(\".ui-icon-closethick\").attr('title', 'Close');\r\n \r\n\r\n\r\n this.jqObject\r\n\t\t .dialog(attributes)\r\n\t\t .dialog(\"open\");\r\n\r\n\r\n };\r\n\r\n this.openNew = function (url, attributes, modalToDialog) {\r\n var thisDialog = this;\r\n attributes.modalToDialog = modalToDialog || false;\r\n\r\n //----no more iframes, but we still need page flips. That process is TBD, but most likely show loader, history pushstate, on load complete fadeIn.\r\n $(\"#pep-dialog-content\").fadeOut(\"slow\", null, function () {\r\n $(\"#pep-dialog-content2\").fadeIn(\"slow\");\r\n thisDialog.secondPopupMode = true;\r\n thisDialog.open(url, attributes, $(\"#pep-dialog-content2\"));\r\n $(\"#pep-dialog-content2\").data(\"attributes\", attributes);\r\n $(\"#pep-dialog-content\").data(\"permenantTitle\", $(\".ui-dialog-title\")[0].innerHTML);\r\n thisDialog.setCrossBtnVisible(false);\r\n pepDialog.responsiveResize();\r\n });\r\n };\r\n this.setDataForCallback = function (data) {\r\n this.callbackData = data;\r\n };\r\n this.close = function (data, invokedViaBrowserNav) {\r\n var $outgoingContentArea = null;\r\n if (!this.secondPopupMode) {\r\n $outgoingContentArea = $(\"#pep-dialog-content\")\r\n this.setDataForCallback(data);\r\n this.onDialogClosed = $(\"#pep-dialog-content\").data(\"attributes\").onDialogClosed;\r\n this.onDialogCancel = $(\"#pep-dialog-content\").data(\"attributes\").onDialogCancel;\r\n this.alwaysCallBack = $(\"#pep-dialog-content\").data(\"attributes\").alwaysCallBack;\r\n this.jqObject.dialog(\"close\");\r\n\r\n if (typeof data != \"undefined\" && this.onDialogCancel && window[this.onDialogCancel])\r\n window[this.onDialogCancel].call(this, data);\r\n\r\n if (this.initialWindowScrollTop > 0)\r\n $(window).scrollTop(this.initialWindowScrollTop);\r\n\r\n if (!!history && history.state == 'dialogOpen') {\r\n this.clearingHistoryState = true;\r\n history.back();\r\n }\r\n }\r\n else {\r\n $outgoingContentArea = $(\"#pep-dialog-content2\")\r\n if (typeof data != \"undefined\" && this.onDialogClosed && window[this.onDialogClosed])\r\n window[this.onDialogClosed](data);\r\n\r\n var attr = $(\"#pep-dialog-content\").data(\"attributes\");\r\n var attr2 = $(\"#pep-dialog-content2\").data(\"attributes\");\r\n\r\n if (attr2.modalToDialog) {\r\n $(\"#pep-dialog-content2\").fadeOut(\"slow\", null, function () {\r\n $(\"#pep-dialog-content\")\r\n .fadeIn();\r\n //the close method can be reached either by a nav back event being caught or by manual closing.\r\n //if it is from a browser back nav, we need to indicate that the dialogOpen state is still active.\r\n if (!!history.pushState && history.state == null) {\r\n history.pushState('dialogOpen', null, null);\r\n }\r\n pepDialog.$openContent = $(\"#pep-dialog-content\");\r\n pepDialog.responsiveResize();\r\n });\r\n\r\n this.onDialogClosed = attr.onDialogClosed;\r\n this.jqObject.dialog(attr);\r\n this.setTitleBarText($(\"#pep-dialog-content\").data(\"permenantTitle\"));\r\n this.secondPopupMode = false;\r\n this.setCrossBtnVisible(true);\r\n }\r\n else {\r\n this.jqObject.dialog(\"close\");\r\n $(\"#pep-dialog-content2\").hide();\r\n $(\"#pep-dialog-content\").show();\r\n }\r\n }\r\n\r\n if (!!$outgoingContentArea.data('customClass')) {\r\n $outgoingContentArea.removeClass($outgoingContentArea.data('customClass'));\r\n $outgoingContentArea.removeData('customClass');\r\n }\r\n };\r\n this.onClose = function () {\r\n ////purgeStateOnCloseMode was not set which means this.close was not called which means the jquery close method was called directly (via x or programmatically) and\r\n ////we want to purge all the modal history so next browser nav actually navigates the user from the page as desired.\r\n //if (typeof this.purgeStateOnCloseMode == 'undefined') {\r\n // this.purgeStateOnCloseMode = 'all';\r\n //}\r\n //if (window.history && window.history.back) {\r\n // //we are NOT closing due to x button being clicked\r\n // if (this.purgeStateOnCloseMode == 'back') {\r\n // //purge last history item (i.e. go back one step)\r\n // window.history.back();\r\n // }\r\n // //we are closing due to x button being clicked\r\n // else {\r\n // //purge all dialog history items, x button closes the dialog rather than going back to prior state.\r\n // var interval = window.setInterval(function () {\r\n // if (window.history.state == 'dialogOpen') {\r\n // window.history.back();\r\n // }\r\n // else {\r\n // window.clearInterval(interval);\r\n // }\r\n // });\r\n // }\r\n //}\r\n //if (!!window.history && window.history.state == 'dialogOpen') {\r\n // window.history.back();\r\n //}\r\n if ((this.alwaysCallBack || this.callbackData) && this.onDialogClosed && window[this.onDialogClosed])\r\n window[this.onDialogClosed].call(this, this.callbackData);\r\n\r\n if (!$('#actionBarDesktop').length == 0) {\r\n $('#actionBarDesktop').slowToggle(true);\r\n }\r\n\r\n this.setTitleBarText(\"\");\r\n $('#pep-dialog-content').empty().html(this.loadingMarkup);\r\n //this.customClass = '';\r\n this.isOpen = false;\r\n this.responsiveResize();\r\n\r\n //clear this flag because close is about to be finished\r\n this.closingNotViaXButton = false;\r\n\r\n //sometimes this method is called directly (like if x button is clicked) so clear dialogOpen state\r\n if (!!history && history.state == 'dialogOpen') {\r\n this.clearingHistoryState = true;\r\n history.back();\r\n }\r\n $(\"#pep-dialog-content2\").hide();\r\n $(\"#pep-dialog-content\").show();\r\n };\r\n\r\n this.setTitleBarText = function (text) { this.jqObject.dialog({ title: text }); };\r\n this.setCrossBtnVisible = function (visible) { if (visible) { $(\".ui-dialog-titlebar-close\").show(); } else { $(\".ui-dialog-titlebar-close\").hide(); } };\r\n\r\n // Save button\r\n this.saveButtonSelector = \"#pepDialogSaveButton\";\r\n this.showSaveButton = function () { $(this.saveButtonSelector).show(); };\r\n this.hideSaveButton = function () { $(this.saveButtonSelector).hide(); };\r\n this.setSaveButtonClick = function (clickHandler) {\r\n $(this.saveButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Cancel button\r\n this.cancelButtonSelector = \"#pepDialogCancelButton\";\r\n this.showCancelButton = function () { $(this.cancelButtonSelector).show(); };\r\n this.hideCancelButton = function () { $(this.cancelButtonSelector).hide(); };\r\n this.setCancelButtonClick = function (clickHandler) {\r\n $(this.cancelButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Back button\r\n this.backButtonSelector = \"#pepDialogBackButton\";\r\n this.showBackButton = function () { $(this.backButtonSelector).show(); };\r\n this.hideBackButton = function () { $(this.backButtonSelector).hide(); };\r\n this.setBackButtonClick = function (clickHandler) {\r\n $(this.backButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Next button\r\n this.nextButtonSelector = \"#pepDialogNextButton\";\r\n this.showNextButton = function () { $(this.nextButtonSelector).show(); };\r\n this.hideNextButton = function () { $(this.nextButtonSelector).hide(); };\r\n this.setNextButtonClick = function (clickHandler) {\r\n $(this.nextButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Finish button\r\n this.finishButtonSelector = \"#pepDialogFinishButton\";\r\n this.showFinishButton = function () { $(this.finishButtonSelector).show(); };\r\n this.hideFinishButton = function () { $(this.finishButtonSelector).hide(); };\r\n this.setFinishButtonClick = function (clickHandler) {\r\n $(this.finishButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Print button\r\n this.printButtonSelector = \"#pepDialogPrintButton\";\r\n this.showPrintButton = function () { $(this.printButtonSelector).show(); };\r\n this.hidePrintButton = function () { $(this.printButtonSelector).hide(); };\r\n this.setPrintButtonClick = function (clickHandler) {\r\n $(this.printButtonSelector)\r\n .unbind('click')\r\n .click(function () { clickHandler(); });\r\n };\r\n\r\n // Reports List dialog\r\n this.openReportsList = function () {\r\n var reportsListUrl = pep.site.root + 'ReportList.aspx?frame=Y¤tPage=' + pep.site.currentPageName;\r\n this.open(reportsListUrl, {\r\n height: 450,\r\n width: 430,\r\n buttons: [\r\n { text: \"Back\", id: \"pepDialogBackButton\", style: \"display:none;margin-left:10px;\", click: function () { $('#pep-dialog-content').attr('src', reportsListUrl); } },\r\n { text: \"Cancel\", id: \"pepDialogCancelButton\", click: function () { pepDialog.close(); } },\r\n { text: \"Print\", id: \"pepDialogPrintButton\", style: \"display:none;\", click: function () { } }\r\n ]\r\n });\r\n\r\n $(this.backButtonSelector).parent(\".ui-dialog-buttonset\").css(\"float\", \"none\");\r\n $(this.backButtonSelector).css(\"float\", \"left\");\r\n $(this.printButtonSelector).css(\"float\", \"right\");\r\n $(this.cancelButtonSelector).css(\"float\", \"right\");\r\n };\r\n\r\n this.showSupplementalDocuments = function () {\r\n var reportsListUrl = pep.site.root;\r\n if (pep.policy.productcd == 'MA')\r\n reportsListUrl += 'Mariner';\r\n if (pep.policy.productcd == 'HO')\r\n reportsListUrl += 'Home';\r\n reportsListUrl += 'SupplementalDocuments.aspx?frame=Y¤tPage=' + pep.site.currentPageName;\r\n\r\n this.open(reportsListUrl, {\r\n height: 550,\r\n width: 650,\r\n buttons: [\r\n { text: \"Back\", id: \"pepDialogBackButton\", style: \"display:none;margin-left:10px;\", click: function () { $('#pep-dialog-content').attr('src', reportsListUrl); } },\r\n { text: \"Cancel\", id: \"pepDialogCancelButton\", click: function () { pepDialog.close(); } },\r\n { text: \"Print\", id: \"pepDialogPrintButton\", style: \"display:none;\", click: function () { } }\r\n ]\r\n });\r\n\r\n this.setTitleBarText('Supplemental Documents and Forms');\r\n\r\n $(this.backButtonSelector).parent(\".ui-dialog-buttonset\").css(\"float\", \"none\");\r\n $(this.backButtonSelector).css(\"float\", \"left\");\r\n $(this.printButtonSelector).css(\"float\", \"right\");\r\n $(this.cancelButtonSelector).css(\"float\", \"right\");\r\n };\r\n\r\n this.openWindow = function (urlAfterRoot) {\r\n var url = pep.site.root + urlAfterRoot;\r\n window.open(url);\r\n };\r\n\r\n\r\n this.responsiveResize = function () {\r\n if (pepDialog.isOpen) {\r\n // //select the visible iframe. iframes are screwy particular in ie and sometimes\r\n // //reload or fire \"resize\" both of which can trigger responsiveResize call\r\n // //so must handle incomplete page content\r\n // var $visibleIframe = pepDialog.jqObject.find(\"iframe#pep-dialog-iframe:visible, iframe#pep-dialog-iframe2:visible\").last();\r\n // if ($visibleIframe.length > 0 && $visibleIframe[0].contentWindow.document.body != null) {\r\n // //save scroll position\r\n // var scrollTopBeforeResize = $(window).scrollTop();\r\n\r\n // //full screen mode (small screen)\r\n if (viewportHelper().width <= this.fullScreenModeWidthThreshold) {\r\n $('BODY').trigger(\"responsiveResized\", [true]);\r\n $(this.$openContent).find('.iframeBodyContents').css('height', '100%');\r\n // //set iframe height to the greater of:\r\n // //- specified dialog height - Because it must at least fit the specified height for modal mode\r\n // //- iframe content height - Because we don't want scrolling within scrolling, so expand it so all content fits and the main page will handle scrolling\r\n // //- window height - Because we want it to at least span the full screen\r\n // $visibleIframe.height(0);\r\n // var dialogHeaderHeight = pepDialog.jqObject.siblings('.ui-dialog-titlebar').height();\r\n // var iframeContentWindowHeight = $visibleIframe.get(0).contentWindow.document.body.scrollHeight;\r\n // var windowHeight = $(window).height();\r\n // var newHeight = Math.max(iframeContentWindowHeight, windowHeight);\r\n // $visibleIframe.css('height', newHeight + 'px');\r\n }//modal mode (big screen)\r\n else {\r\n $('BODY').trigger(\"responsiveResized\", [false]);\r\n // //use the specified dialog height\r\n // $visibleIframe.css('height', '100%');\r\n // $visibleIframe.closest('.ui-dialog-content').each(function () {\r\n // $(this).height(0);\r\n // var dialogHeaderHeight = pepDialog.jqObject.siblings('.ui-dialog-titlebar').height();\r\n // var hardCodedInitialDialogHeight = pepDialog.dialogHeight;\r\n // var iframeContentWindowHeight = $visibleIframe.get(0).contentWindow.document.body.scrollHeight;\r\n // var newHeight = Math.max(hardCodedInitialDialogHeight, iframeContentWindowHeight);\r\n // //limit to maxheight if one is specified for the iframe. This is for longer modal content\r\n // //such as the terms and conditions, which we want to scroll entire page for mobile but for desktop here, limit its height\r\n // if ($visibleIframe.data('maxHeight') > 0) {\r\n // newHeight = Math.min($visibleIframe.data('maxHeight'), newHeight);\r\n // }\r\n // $(this).css('height', newHeight + 'px');\r\n // });\r\n\r\n }\r\n\r\n // //restore scroll position\r\n // $(window).scrollTop(scrollTopBeforeResize);\r\n // }\r\n }\r\n\r\n //show the main page behind the dialog if either the dialog is closed, or if it is open and the screen size is within the full-screen threshold.\r\n //This is so that in full screen mode, a lengthy page in the background will not extend the height of the popup.\r\n var showPageContainer = !pepDialog.isOpen || viewportHelper().width > this.fullScreenModeWidthThreshold\r\n $('#' + this.hideContainerOnOpenId).toggle(showPageContainer);\r\n window.setTimeout(function () { pepDialog.jqObject.closest('.ui-dialog').center(); });\r\n\r\n //must come after the above three lines.\r\n if (!pepDialog.isOpen) {\r\n if (this.initialWindowScrollTop > 0)\r\n $(window).scrollTop(this.initialWindowScrollTop);\r\n }\r\n };\r\n };\r\n});\r\n\r\n//# sourceURL=pep.dialog.js"]}