{"version":3,"file":"Compilator.WindowHandler-5.55.8.8.min.js","names":["compilator","windowOperationsEventListener","e","origin","window","location","data","action","closeAllOtherWindows","$","each","this","close","winWidth","width","winHeight","height","winTitle","title","$kendo","openNewKendoWindow","windowUrl","onWindowClose","openKendoWindowNotification","$translations","Common","Information","message","buttonText","OK","openWin","windowId","$find","show","prop","GetTranslatedCloseText","css","openWindow","url","id","positionBottom","oWnd","setUrl","bounds","$telerik","getClientBounds","moveTo","get_width","get_height","windowHandler","openWindowWithFocus","windowName","openExistingWindowIfAny","scrollbars","name","replace","win","features","open","href","document","body","innerHTML","PleaseWaitWhilePageIsLoading","blur","focus","showCurrentWindow","setTimeout","openKendoConfirmDialog","Confirm","PageAlreadyOpen","ok","openStorageCard","$string","format","openOwnerInfo","licenseplate","branchId","forceRefresh","openVehicleDetails","openNewOrderInNewWindow","isThirdPartyOrder","f_url","$url","OrderMVC","Order","OrderDetails","url1","f_args","f_windowName","undefined","join","Date","now","openNewContractInNewWindow","isOrderOpen","sellerBranchId","windowExistsCallback","left","screen","top","kendo","dialogResultOk","dialogResultCancel","confirmDialog","async","keepHtml","Promise","resolve","attachWindow","settings","length","prepend","kendoWindow","createAndOpenHtmlViewWindow","tempSettings","Object","assign","windowSettings","modal","visible","resizable","iframe","animation","hide","ajaxSettings","type","extend","view","refresh","center","content","userParams","startsWith","substring","destroyOnClose","html","text","params","lastNotificationDialogId","minWidth","minHeight","position","innerWidth","innerHeight","maxAutomaticWidth","maxAutomaticHeight","kendoMethods","resize","_userManuallyChangedSize","onWindowRefresh","element","find","iframeContent","contents","attr","contentWindow","kendoWindowOptions","setOptions","noFocusOnRefresh","kendoWindowEvents","kendoWindowRefreshed","dialogTitle","titleFromHead","i","v","console","error","args","kendoWindowClosing","when","done","empty","remove","deactivate","sender","destroy","append","dialog","parents","addClass","onWindowResize","parseInt","options","addEventListener","bind","removeEventListener","maxWidth","useOkAndCancelButtons","load","Layout","Dialog","ConfirmDialog","cache","responseText","get","actions","btnOktext","dontStripHtml","icon","openKendoErrorDialog","errorDetails","responseJSON","Content","errorId","CorrelationId","ErrorId","GeneralErrorMessage","exceptionDetails","Exception","Message","StackTrace","concat","ErrorNotificationTitle","_getCurrentKendoWindow","returnValue","containingWindow","kendoWindowDiv","closest","parent","getCurrentKendoWindow","closeKendoWindowById","closeCurrentKendoWindow","ret","windows","openContactDetailsWindow","saveOnPost","readonly","allowCreate","allowEdit","contactId","customerId","functionToLoadContact","Business","Contact","ContactDetails","allowDelete","isPurchaser","openCustomerSearchWindow","callModule","callback","openStockBalance","articleId","radWindow","dialogResultOK","radWindowId","getCurrentRadWindow","frameElement","closeCurrentRadWindow","openRadWindow","properties","radopen","reloadOnShow","closeEnabled","keepInScreenBounds","visibleStatusbar","showContentDuringLoad","set_title","set_width","set_height","set_modal","set_reloadOnShow","set_destroyOnClose","set_keepInScreenBounds","set_visibleStatusbar","set_showContentDuringLoad","set_behaviors","Telerik","Web","UI","WindowBehaviors","Move","Close","remove_close","add_close","openRadWindowConfirmDialog","confirmText","openRadWindowQuestionDialog","confirmText2","defaultButton","openJSRadWindowDestroyOnClose","notifications","errorTitle","informationTitle","okButtonText","showNotification","showErrorNotification","printing","_printingWindowHeight","_printingWindowWidth","_printingWindowCenterHeight","_printingWindowCenterWidth","openPrintingWindow","screenTop","availHeight","screenLeft","availWidth","windowProperties","displayPopupBlockerInfo","movePrintingWindowToCenter","posLeft","posTop","resizeTo","movePrintingWindowToBottom","ready","attachEvent","$radWindow"],"sources":["Compilator.WindowHandler.js"],"mappings":"AAAA,aASA,IAAIA,WAAaA,YAAc,CAAC,EA63BhC,SAASC,8BAA8BC,GAErC,GAAIA,EAAEC,SAAWC,OAAOC,SAASF,OASjC,GALsB,iBAAlBD,EAAEI,KAAKC,SAA6D,IAAhCL,EAAEI,KAAKE,sBAC7CC,EAAE,qBAAqBC,MAAK,WAC1BD,EAAEE,MAAML,KAAK,eAAeM,OAC9B,IAEoB,oBAAlBV,EAAEI,KAAKC,OAA8B,CACvC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AKqR,sBACxC,UAAYrR,KAAKsR,qBACjB,QAAUI,EACV,SAAWE,EAHY,wFAYnB/O,EAAMpD,OAAOsD,KAAKpB,EAAK,SAAUmQ,GAQvC,OANIjP,cACoBkC,IAAlBtF,OAAOuN,QACTvN,OAAOuN,OAAO+E,2BAIX,CACT,EAEAC,2BAA4B,WAC1B,MAAMC,EAAWzM,OAAOrF,MAAQ,EAAMH,KAAKwR,2BAA6B,EAClEU,EAAU1M,OAAOmM,YAAc,EAAM3R,KAAKuR,4BAA8B,EAE9E9R,OAAO0C,OAAO8P,EAASC,GACvBzS,OAAO0S,SAASnS,KAAKwR,2BAA4BxR,KAAKuR,6BAEtD9R,OAAO6D,OACT,EAEA8O,2BAA4B,WAC1B,MAAMV,EAAYlM,OAAOmM,YAAc3R,KAAKqR,sBACtCO,EAAapM,OAAOqM,WAAa7R,KAAKsR,qBAE5C7R,OAAO0C,OAAOyP,EAAYF,GAC1BjS,OAAO0S,SAASnS,KAAKsR,qBAAsBtR,KAAKqR,sBAClD,GAIFvR,EAAEmD,UAAUoP,OAAM,WACZ5S,OAAOoL,iBACTpL,OAAOoL,iBAAiB,UAAWvL,+BAA+B,GAC3DG,OAAO6S,aACd7S,OAAO6S,YAAY,YAAahT,+BAA+B,EACnE,IAoDA,IAAIkB,OAASnB,WAAWiD,cAAcoD,MAClC6M,WAAalT,WAAWiD,cAAckM","sourcesContent":["\"use strict\";\r\n/*\r\n\r\nSHORTHANDS:\r\n$kendo - compilator.windowHandler.kendo\r\n$radWindow - compilator.windowHandler.radWindow\r\n\r\n*/\r\n// Defines compilator global namespace.\r\nvar compilator = compilator || {};\r\n\r\ncompilator.windowHandler = {\r\n openWindowWithFocus: function (url, windowName, openExistingWindowIfAny, scrollbars) {\r\n if (!windowName) {\r\n windowName = \"\";\r\n }\r\n //replace is needed because - in guids are not accepted\r\n const name = windowName.replace(/-/g, \"\");\r\n let features = \"resizable=yes,\" +\r\n \"directories=no,\" +\r\n \"titlebar=no,\" +\r\n \"toolbar=no,\" +\r\n \"location=yes,\" +\r\n \"status=no,\" +\r\n \"menubar=no\";\r\n\r\n if (scrollbars) {\r\n features = features + \",scrollbars=1\";\r\n }\r\n\r\n let win;\r\n try {\r\n if (openExistingWindowIfAny === true) {\r\n // window.open with url = '' will either:\r\n // a) Give a reference to a previously opened window with this name\r\n // b) Open an empty window with this name, url will then be set to 'about:blank'\r\n win = window.open(\"\", name, features, false);\r\n if (win.location.href === \"about:blank\") {\r\n win.document.body.innerHTML = \"
\" + $translations.Common.PleaseWaitWhilePageIsLoading + \"
\";\r\n win.location.href = url;\r\n }\r\n win.blur();\r\n win.focus();\r\n\r\n win.compilator.windowHandler.showCurrentWindow(url);\r\n } else {\r\n win = window.open(url, name, features, false);\r\n win.focus();\r\n }\r\n } catch (e) {\r\n // console.log(e);\r\n }\r\n\r\n return win;\r\n },\r\n showCurrentWindow: function (url) {\r\n window.focus();\r\n setTimeout(function () {\r\n $kendo.openKendoConfirmDialog($translations.Common.Confirm, $translations.Common.PageAlreadyOpen,\r\n function (ok) {\r\n if (ok) {\r\n window.location.href = url;\r\n }\r\n }, 400);\r\n }, 100);\r\n },\r\n openStorageCard: function (id) {\r\n const url = $string.format(\"/TyreHotel/StorageCard.aspx?id={0}\", id);\r\n compilator.windowHandler.openWindowWithFocus(url, \"storageCard_\" + id, true);\r\n },\r\n openOwnerInfo: function (licenseplate, branchId, forceRefresh) {\r\n const url = $string.format(\"/Common/Vehicle/OwnerDetails?licenseplate={0}&branchId={1}&forceRefresh={2}\", licenseplate, branchId, forceRefresh);\r\n compilator.windowHandler.openWindowWithFocus(url, \"ownerInfo_\" + licenseplate, true);\r\n },\r\n\r\n openVehicleDetails: function (licenseplate, branchId, forceRefresh) {\r\n const url = $string.format(\"/Common/Vehicle/Details?licenseplate={0}&branchId={1}&forceRefresh={2}\", licenseplate, branchId, forceRefresh);\r\n compilator.windowHandler.openWindowWithFocus(url, \"vehicleInfo_\" + licenseplate, true);\r\n },\r\n //This opens a new order always in new window\r\n openNewOrderInNewWindow: function (branchId, isThirdPartyOrder) {\r\n var f_url = $url.OrderMVC.Order.OrderDetails.url1(null, branchId, isThirdPartyOrder, null);\r\n var f_args = [null, branchId, isThirdPartyOrder, null];\r\n var f_winId = f_args.join('_')\r\n var f_windowName = undefined;\r\n if (f_winId.replace(/_/g, '') != '') {\r\n f_windowName = 'OrderDetails_' + f_args.join('_') + Date.now(); //Date.now() is used to get unique windowname so it always opens a new window\r\n }\r\n compilator.windowHandler.openWindowWithFocus(f_url, f_windowName, false);\r\n },\r\n\r\n openNewContractInNewWindow: function (branchId) {\r\n const url = `/OrderMVC/Contract/Details?id=©From=&branchId=${branchId}`;\r\n const windowName = `ContractDetails_${Date.now()}`;\r\n compilator.windowHandler.openWindowWithFocus(url, windowName, false);\r\n },\r\n\r\n isOrderOpen: function (id, sellerBranchId, windowExistsCallback) {\r\n const name = \"OrderDetails_\" + id + \"_\" + sellerBranchId;\r\n\r\n const left = screen.width - 100;\r\n const top = screen.height - 100;\r\n\r\n const win = window.open(\"\", name, \"toolbar=no,\" +\r\n \"location=no,\" +\r\n \"status=no,\" +\r\n \"menubar=no,\" +\r\n \"scrollbars=no,\" +\r\n \"resizable=no,\" +\r\n \"width=100,\" +\r\n \"height=100,\" +\r\n \"top=\" + top + \",\" +\r\n \"left=\" + left, false);\r\n if (win.location.href === \"about:blank\") {\r\n win.close();\r\n return false;\r\n }\r\n\r\n if (windowExistsCallback) {\r\n windowExistsCallback(win);\r\n }\r\n return true;\r\n }\r\n};\r\n\r\ncompilator.windowHandler.kendo = {\r\n dialogResultOk: \"Ok\",\r\n dialogResultCancel: \"Cancel\",\r\n\r\n /** async wrapper for the openKendoConfirmDialog method */\r\n confirmDialog: async function (title, message, keepHtml = false) {\r\n return new Promise((resolve) => {\r\n $kendo.openKendoConfirmDialog(title, message, (e) => {\r\n resolve(e);\r\n }, null, keepHtml);\r\n });\r\n },\r\n\r\n attachWindow: function (name, settings) {\r\n const id = name + \"Window\";\r\n if (!$(\"#\" + id).length) {\r\n $(\"body\").prepend(`
`);\r\n }\r\n\r\n return $(\"#\" + id).kendoWindow(settings).data(\"kendoWindow\");\r\n },\r\n\r\n createAndOpenHtmlViewWindow: function (name, settings) {\r\n let tempSettings = Object.assign({}, settings);\r\n \r\n let windowSettings = {\r\n modal: true,\r\n visible: false,\r\n resizable: false,\r\n iframe: false,\r\n animation: false,\r\n close: function () {\r\n if (tempSettings.close) {\r\n tempSettings.close();\r\n } \r\n //Bugfix: Overlay wasn't closed properly second time the dialog was opened when closing with cross.\r\n setTimeout(function () {\r\n $('body > .k-overlay').hide();\r\n }, 10);\r\n }\r\n };\r\n let ajaxSettings = {\r\n type: \"POST\",\r\n data: {},\r\n }\r\n\r\n $.extend(ajaxSettings, settings.view);\r\n delete settings.view;\r\n delete settings.close; \r\n\r\n $.extend(windowSettings, settings);\r\n\r\n const id = name + \"Window\";\r\n if (!$(\"#\" + id).length) {\r\n $(\"body\").prepend(`
`);\r\n }\r\n \r\n let window = $(\"#\" + id).kendoWindow(windowSettings).data(\"kendoWindow\");\r\n window.refresh(ajaxSettings).center().open();\r\n return window;\r\n },\r\n\r\n openNewKendoWindow: function (content, userParams) {\r\n userParams = userParams || {};\r\n if (content.startsWith(\"#\")) {\r\n $.extend(userParams, {\r\n windowName: content.substring(1),\r\n iframe: false,\r\n destroyOnClose: false\r\n })\r\n content = undefined;\r\n }\r\n\r\n if (userParams.title) {\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n userParams.title = $(\"
\").html(userParams.title).text();\r\n }\r\n const params = {\r\n content: content,\r\n windowName: \"kendo_wnd_\" + ++this.lastNotificationDialogId,\r\n resizable: false,\r\n animation: false,\r\n title: \"\",\r\n modal: true,\r\n iframe: true,\r\n destroyOnClose: true,\r\n visible: false\r\n };\r\n\r\n // If userParams.iframe is set and it's set to true OR userParams.iframe is not set (default value, true, will be used)\r\n if ((userParams.iframe && userParams.iframe === true) || userParams.iframe === undefined) {\r\n $.extend(params, {\r\n width: 400,\r\n height: 200,\r\n minWidth: 400,\r\n minHeight: 200\r\n });\r\n }\r\n\r\n if (userParams.position) {\r\n params.width = window.innerWidth - (2 * userParams.position.left);\r\n params.height = window.innerHeight - (2 * userParams.position.top);\r\n\r\n if (userParams.position.maxAutomaticWidth && params.width > userParams.position.maxAutomaticWidth) {\r\n params.width = userParams.position.maxAutomaticWidth;\r\n }\r\n if (userParams.position.maxAutomaticHeight && params.height > userParams.position.maxAutomaticHeight) {\r\n params.height = userParams.position.maxAutomaticHeight;\r\n }\r\n }\r\n\r\n $.extend(params, userParams);\r\n const kendoMethods = {\r\n resize: function () {\r\n this._userManuallyChangedSize = true;\r\n },\r\n refresh: function () {\r\n try {\r\n if (params.onWindowRefresh) {\r\n params.onWindowRefresh(this);\r\n }\r\n\r\n const iframe = $(this.element).find(\"iframe\");\r\n if (iframe.length !== 0) {\r\n const iframeContent = iframe.contents();\r\n const html = $(\"html\", iframeContent);\r\n html.attr(\"data-kendo-window-name\", params.windowName);\r\n\r\n if (iframe[0].contentWindow.kendoWindowOptions) {\r\n if (iframe[0].contentWindow.kendoWindowOptions.title) {\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n iframe[0].contentWindow.kendoWindowOptions.title = $(\"
\").html(iframe[0].contentWindow.kendoWindowOptions.title).text();\r\n }\r\n this.setOptions(iframe[0].contentWindow.kendoWindowOptions);\r\n }\r\n\r\n if (!params.noFocusOnRefresh) {\r\n $(\"[type=submit]\", html).focus();\r\n } \r\n\r\n if (iframe[0].contentWindow.kendoWindowEvents && iframe[0].contentWindow.kendoWindowEvents.kendoWindowRefreshed) {\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n iframe[0].contentWindow.dialogTitle = $(\"
\").html(iframe[0].contentWindow.dialogTitle).text();\r\n\r\n iframe[0].contentWindow.kendoWindowEvents.kendoWindowRefreshed(this);\r\n }\r\n\r\n if (this.title() === \"\") {\r\n const titleFromHead = $(\"head title\", iframeContent).text();\r\n if (titleFromHead) {\r\n this.title(titleFromHead);\r\n }\r\n }\r\n } else {\r\n // No iframe\r\n $(\"[id]\", this.element).each(function (i, v) {\r\n if ($(\"[id=\" + v.id + \"]\").length !== 1) {\r\n throw \"There are multiple elements with same id: \" + v.id;\r\n }\r\n });\r\n\r\n }\r\n } catch (e) {\r\n console.error(\"Exception when refreshing window.\", e);\r\n }\r\n },\r\n close: function (e) {\r\n const iframe = $(this.element).find(\"iframe\");\r\n let args;\r\n try {\r\n args = this.element.data(\"kendo-close-args\");\r\n if (iframe.length !== 0) {\r\n if (iframe[0].contentWindow.kendoWindowEvents && iframe[0].contentWindow.kendoWindowEvents.kendoWindowClosing) {\r\n if (!iframe[0].contentWindow.kendoWindowEvents.kendoWindowClosing(e, args)) {\r\n return;\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n console.error(\"Exception when trying to close window.\", e);\r\n }\r\n\r\n if (params.onWindowClose) {\r\n $.when(params.onWindowClose(args)).done(function () {\r\n //Fix for an IE bug. (IE 9 and IE 10 cannot enter text into input text boxes from time to time)\r\n //https://stackoverflow.com/questions/19150008/ie-9-and-ie-10-cannot-enter-text-into-input-text-boxes-from-time-to-time\r\n if (iframe) {\r\n iframe.empty().remove();\r\n }\r\n });\r\n }\r\n else {\r\n if (iframe) {\r\n iframe.empty().remove();\r\n }\r\n\r\n }\r\n },\r\n deactivate: function (e) {\r\n if (params.destroyOnClose) {\r\n e.sender.destroy();\r\n }\r\n }\r\n };\r\n\r\n $.extend(params, kendoMethods);\r\n\r\n if ($(\"#\" + params.windowName).length === 0) {\r\n $(\"body\").append(\"
\");\r\n }\r\n\r\n //Replace single and double quotes with encoded values.\r\n if (params.content) {\r\n params.content = params.content.replace(/'/g, \"%27\");\r\n }\r\n const dialog = $(\"#\" + params.windowName).kendoWindow(params);\r\n dialog.parents(\".k-window\").addClass(\"kendoWindow_Compilator\");\r\n\r\n const kendoWindow = dialog.data(\"kendoWindow\");\r\n const onWindowResize = function () {\r\n const startWidth = parseInt(kendoWindow.options.width);\r\n const startHeight = parseInt(kendoWindow.options.height);\r\n\r\n let width = startWidth;\r\n let height = startHeight;\r\n\r\n if (width > window.innerWidth) {\r\n width = window.innerWidth - 50;\r\n }\r\n if (height > window.innerHeight) {\r\n height = window.innerHeight - 40;\r\n }\r\n\r\n if (userParams.position && !kendoWindow._userManuallyChangedSize) {\r\n width = window.innerWidth - (2 * userParams.position.left);\r\n height = window.innerHeight - (2 * userParams.position.top);\r\n if (userParams.position.maxAutomaticWidth && width > userParams.position.maxAutomaticWidth) {\r\n width = userParams.position.maxAutomaticWidth;\r\n }\r\n if (userParams.position.maxAutomaticHeight && height > userParams.position.maxAutomaticHeight) {\r\n height = userParams.position.maxAutomaticHeight;\r\n }\r\n }\r\n\r\n if (width !== kendoWindow.options.width || height !== kendoWindow.options.height) {\r\n kendoWindow.setOptions({\r\n width: width,\r\n height: height\r\n });\r\n }\r\n\r\n kendoWindow.center();\r\n };\r\n\r\n window.addEventListener(\"resize\", onWindowResize);\r\n\r\n kendoWindow.bind(\"deactivate\", function () {\r\n window.removeEventListener(\"resize\", onWindowResize);\r\n });\r\n\r\n return kendoWindow.center().open();\r\n },\r\n lastNotificationDialogId: 0,\r\n openKendoConfirmDialog: function (title, message, onWindowClose, maxWidth, keepHtml, useOkAndCancelButtons) {\r\n // Make sure message is decoded (so special characters will appear correctly)\r\n if (!keepHtml) {\r\n message = $(\"
\").html(message).text();\r\n }\r\n\r\n // Replaces 'Yes' and 'No' buttons with 'Ok' and 'Cancel' buttons if true\r\n if (useOkAndCancelButtons === undefined) {\r\n useOkAndCancelButtons = false;\r\n }\r\n\r\n //Add html tags instead of linebreaks\r\n message = message.replace(/\\n/g, \"
\")\r\n if (maxWidth === undefined) {\r\n maxWidth = 500;\r\n }\r\n $kendo.lastNotificationDialogId += 1;\r\n const windowName = \"notificationDialog\" + $kendo.lastNotificationDialogId;\r\n\r\n $(\"body\").append($(\"
\").load($url.Layout.Dialog.ConfirmDialog.url() + \"/?useOkAndCancelButtons=\" + useOkAndCancelButtons, { cache: true }, function (responseText) {\r\n $(\"#\" + windowName).html($(\"#\" + windowName).html().replace(/{message}/g, message).replace(/{windowName}/g, windowName));\r\n\r\n $(\"#\" + windowName + \" input[type=submit]\").get(0).focus();\r\n $(\"#\" + windowName).data(\"kendoWindow\").center();\r\n }));\r\n\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n title = $(\"
\").html(title).text();\r\n const dialog = $(\"#\" + windowName).kendoWindow({\r\n content: null,\r\n actions: [\"Close\"],\r\n modal: true,\r\n title: title,\r\n minWidth: 350,\r\n maxWidth: maxWidth,\r\n animation: false,\r\n visible: false,\r\n close: function () {\r\n if (onWindowClose != undefined) {\r\n const args = $(this.element).data(\"kendo-close-args\");\r\n onWindowClose(args);\r\n }\r\n dialog.destroy();\r\n }\r\n }).data(\"kendoWindow\").center().open();\r\n $(\"#\" + windowName).parents(\".k-window\").addClass(\"kendoWindowNotification_Compilator\");\r\n return dialog;\r\n },\r\n openKendoWindowNotification: function (title, message, btnOktext, error, modal, onWindowClose, dontStripHtml) {\r\n // Make sure message is decoded (so special characters will appear correctly)\r\n if (!dontStripHtml) {\r\n message = $(\"
\").html(message).text();\r\n }\r\n\r\n let icon = \"info.png\";\r\n if (error) {\r\n icon = \"warning32.png\";\r\n }\r\n\r\n $kendo.lastNotificationDialogId += 1;\r\n const windowName = \"notificationDialog\" + $kendo.lastNotificationDialogId;\r\n\r\n $('body').append('
\\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n ' + message + '\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
\\\r\n
');\r\n\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n title = $(\"
\").html(title).text();\r\n\r\n const dialog = $(\"#\" + windowName).kendoWindow({\r\n content: null,\r\n actions: [\"Close\"],\r\n modal: modal,\r\n title: title,\r\n minWidth: 300,\r\n maxWidth: 500,\r\n visible: false,\r\n close: function () {\r\n if (onWindowClose) {\r\n onWindowClose();\r\n }\r\n dialog.destroy();\r\n }\r\n }).data(\"kendoWindow\").center().open();\r\n $(\"#\" + windowName).parents(\".k-window\").addClass(\"kendoWindowNotification_Compilator\");\r\n\r\n $(\"#\" + windowName + \" input[type=submit]\").get(0).focus();\r\n setTimeout(function () { $(\"#\" + windowName + \" input[type=submit]\").get(0).focus(); }, 500);\r\n return;\r\n },\r\n\r\n openKendoErrorDialog: function (errorDetails, onWindowClose, title) {\r\n errorDetails = errorDetails || {};\r\n if (errorDetails.responseJSON && errorDetails.responseJSON.Content) {\r\n errorDetails = errorDetails.responseJSON.Content;\r\n }\r\n else if (errorDetails.responseJSON) {\r\n errorDetails = errorDetails.responseJSON;\r\n }\r\n\r\n $kendo.lastNotificationDialogId += 1;\r\n const windowName = \"errorDialog\" + $kendo.lastNotificationDialogId;\r\n let errorId = \"\";\r\n if (errorDetails.CorrelationId) {\r\n errorId = '
' + $translations.Common.ErrorId.replace('{0}', errorDetails.CorrelationId) + '
';\r\n }\r\n\r\n let message = $translations.Common.GeneralErrorMessage;\r\n let exceptionDetails = '';\r\n if (typeof errorDetails === 'string') {\r\n message = errorDetails;\r\n }\r\n else if (errorDetails && errorDetails.Exception) {\r\n exceptionDetails = \"
\";\r\n if (errorDetails.Exception.Message) {\r\n exceptionDetails += \"
\" + errorDetails.Exception.Message + \"
\";\r\n }\r\n if (errorDetails.Exception.StackTrace) {\r\n exceptionDetails += \"
\" + errorDetails.Exception.StackTrace.replace(/\\/g, \">\").replace(/(?:\\r\\n|\\r|\\n)/g, '
') + \"
\";\r\n }\r\n exceptionDetails += \"
\";\r\n }\r\n\r\n // Make sure message is decoded (so special characters will appear correctly)\r\n message = $(\"
\").html(message).text();\r\n // Convert \\n to
:\r\n message = message.replace(/\\n/g, '
');\r\n $('body').append('
\\\r\n
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n ' + message + '\\\r\n
'\r\n + errorId.concat(exceptionDetails) +\r\n '
\\\r\n
\\\r\n
\\\r\n \\\r\n
\\\r\n
\\\r\n
\\\r\n
');\r\n\r\n // Make sure title is decoded (so special characters will appear correctly)\r\n title = title || $translations.Common.ErrorNotificationTitle;\r\n title = $(\"
\").html(title).text();\r\n\r\n const dialog = $('#' + windowName).kendoWindow({\r\n content: null,\r\n actions: [\"Close\"],\r\n modal: true,\r\n title: title,\r\n minWidth: 400,\r\n maxWidth: exceptionDetails ? ($(document).width() - 100) : 500,\r\n visible: false,\r\n close: function () {\r\n if (onWindowClose != undefined) {\r\n onWindowClose();\r\n }\r\n dialog.destroy();\r\n }\r\n }).data('kendoWindow').center().open();\r\n $('#' + windowName).parents('.k-window').addClass('kendoWindowNotification_Compilator');\r\n\r\n $('#' + windowName + ' input[type=submit]').get(0).focus();\r\n setTimeout(function () { $('#' + windowName + ' input[type=submit]').get(0).focus(); }, 500);\r\n return;\r\n },\r\n _getCurrentKendoWindow: function (element) {\r\n const returnValue = {\r\n containingWindow: undefined,\r\n kendoWindow: undefined\r\n };\r\n\r\n if (element) {\r\n const kendoWindowDiv = $(element).closest('[data-role=window]');\r\n if (kendoWindowDiv.length !== 0) {\r\n returnValue.kendoWindow = kendoWindowDiv.data('kendoWindow');\r\n returnValue.containingWindow = window;\r\n return returnValue;\r\n }\r\n }\r\n\r\n let windowName = $('html').data('kendo-window-name');\r\n if (windowName === undefined || windowName === '') {\r\n windowName = $('html').attr('data-kendo-window-name');\r\n }\r\n\r\n let containingWindow = window;\r\n while (containingWindow !== containingWindow.top) {\r\n if (containingWindow.$('#' + windowName).data('kendoWindow')) {\r\n returnValue.kendoWindow = containingWindow.$('#' + windowName).data('kendoWindow');\r\n returnValue.containingWindow = containingWindow;\r\n return returnValue;\r\n }\r\n containingWindow = containingWindow.parent;\r\n };\r\n\r\n if (containingWindow === window) {\r\n // Not iframe\r\n if (element === undefined) {\r\n // Return first available kendo window (possible multiple dialogs on page)\r\n returnValue.kendoWindow = $('[data-role=window]').data('kendoWindow');\r\n }\r\n }\r\n else {\r\n returnValue.kendoWindow = containingWindow.$('#' + windowName).data('kendoWindow');\r\n }\r\n\r\n returnValue.containingWindow = containingWindow;\r\n\r\n return returnValue;\r\n },\r\n getCurrentKendoWindow: function (element) {\r\n return this._getCurrentKendoWindow(element).kendoWindow;\r\n },\r\n\r\n closeKendoWindowById: function (args, id) {\r\n let kendoWindow = null;\r\n if (parent === top) {\r\n window.parent.$('#' + id).data('kendo-close-args', args);\r\n kendoWindow = window.parent.$('#' + id).data('kendoWindow');\r\n }\r\n else {\r\n $('#' + id).data('kendo-close-args', args);\r\n kendoWindow = $('#' + id).data('kendoWindow');\r\n }\r\n kendoWindow.close();\r\n },\r\n closeCurrentKendoWindow: function (args, element) {\r\n const ret = this._getCurrentKendoWindow(element);\r\n ret.containingWindow.$(ret.kendoWindow.element).data('kendo-close-args', args);\r\n\r\n ret.kendoWindow.close();\r\n }\r\n}\r\n\r\ncompilator.windowHandler.kendo.windows = {\r\n openContactDetailsWindow: function (params) {\r\n const options = {\r\n title: '',\r\n saveOnPost: false,\r\n readonly: true,\r\n allowCreate: false,\r\n allowEdit: false,\r\n contactId: '',\r\n customerId: '',\r\n onWindowClose: undefined,\r\n functionToLoadContact: '',\r\n modal: true,\r\n windowName: 'ContactDetails',\r\n width: 650,\r\n height: 600\r\n };\r\n $.extend(options, params);\r\n\r\n $url.Business.Contact.ContactDetails.kendoWindow(options.contactId,\r\n options.customerId,\r\n options.allowCreate,\r\n options.allowEdit,\r\n options.saveOnPost,\r\n options.readonly,\r\n options.functionToLoadContact,\r\n options.allowDelete,\r\n options.isPurchaser,\r\n options);\r\n\r\n return false;\r\n },\r\n openCustomerSearchWindow: function (callModule, callback, params) {\r\n const options = {\r\n onWindowClose: function (args) {\r\n if (callback) {\r\n callback(args);\r\n }\r\n },\r\n modal: true,\r\n windowName: 'SearchCustomers',\r\n resizable: true,\r\n position: {\r\n left: 100,\r\n top: 75,\r\n maxAutomaticWidth: 1500,\r\n maxAutomaticHeight: 800\r\n },\r\n minWidth: 1200\r\n };\r\n $.extend(options, params);\r\n\r\n const windowUrl = '/Business/Windows/SearchCustomer.aspx?CallModule=' + callModule;\r\n $kendo.openNewKendoWindow(windowUrl, options);\r\n return false;\r\n },\r\n openStockBalance: function (params) {\r\n const options = {\r\n articleId: '',\r\n title: '',\r\n width: 700,\r\n height: 450\r\n };\r\n $.extend(options, params);\r\n const windowUrl = '/Windows/ViewStockBalance.aspx?articleId=' + options.articleId;\r\n $kendo.openNewKendoWindow(windowUrl, options);\r\n }\r\n}\r\n\r\ncompilator.windowHandler.radWindow = {\r\n dialogResultOK: \"Ok\",\r\n dialogResultCancel: \"Cancel\",\r\n radWindowId: 0,\r\n\r\n getCurrentRadWindow: function () {\r\n let radWindow = null;\r\n\r\n if (window.radWindow) {\r\n radWindow = window.radWindow;\r\n }\r\n else if (window.frameElement.radWindow) {\r\n radWindow = window.frameElement.radWindow;\r\n }\r\n\r\n return radWindow;\r\n },\r\n\r\n closeCurrentRadWindow: function () {\r\n this.getCurrentRadWindow().close();\r\n },\r\n\r\n // Creates and opens a JS RadWindow, and sets the properties supplied in the parameter object.\r\n // Mandatory properties: windowId, url, witdh, height, title.\r\n // Optional (default will be used if not supplied): modal, reloadOnShow, destroyOnclose, closeEnabled, keepInScreenBounds, visibleStatusBar, onWindowClose, showContentDuringLoad.\r\n // Add more properties if needed.\r\n openRadWindow: function (properties) {\r\n if (typeof radopen === 'undefined') {\r\n return null;\r\n }\r\n\r\n // Extending non supplied properties with default properties.\r\n const defaultProperties = {\r\n modal: true,\r\n reloadOnShow: true,\r\n destroyOnClose: true,\r\n closeEnabled: true,\r\n keepInScreenBounds: true,\r\n visibleStatusbar: false,\r\n showContentDuringLoad: false\r\n };\r\n properties = $.extend(defaultProperties, properties);\r\n\r\n const radWindow = radopen(properties.url, properties.windowId);\r\n\r\n // Set properties\r\n radWindow.set_title(properties.title);\r\n radWindow.set_width(properties.width);\r\n radWindow.set_height(properties.height);\r\n radWindow.set_modal(properties.modal);\r\n radWindow.set_reloadOnShow(properties.reloadOnShow);\r\n radWindow.set_destroyOnClose(properties.destroyOnClose);\r\n radWindow.set_keepInScreenBounds(properties.keepInScreenBounds);\r\n radWindow.set_visibleStatusbar(properties.visibleStatusbar);\r\n radWindow.set_showContentDuringLoad(properties.showContentDuringLoad);\r\n\r\n if (properties.closeEnabled) {\r\n radWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);\r\n } else {\r\n radWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move);\r\n }\r\n\r\n // Due to a bug in telerik, destroyonclose cannot be used in combination with onWindowClose. (!= instead of !== used for checking both null and undefined)\r\n if (properties.onWindowClose != undefined) {\r\n radWindow.remove_close(properties.onWindowClose);\r\n radWindow.add_close(properties.onWindowClose);\r\n radWindow.set_destroyOnClose(false);\r\n }\r\n\r\n radWindow.center();\r\n $(\".rwCloseButton\").prop(\"title\", GetTranslatedCloseText());\r\n $(\".rwCloseButton\").css(\"cursor\", \"pointer\");\r\n\r\n return radWindow;\r\n },\r\n\r\n openRadWindowConfirmDialog: function (confirmText, title, onWindowClose) {\r\n return this.openRadWindow({\r\n url: '/Common/Windows/Confirm.aspx?DialogType=1&ConfirmText=' + confirmText,\r\n windowId: '_rwConfirmDialog',\r\n width: 320,\r\n height: 150,\r\n closeEnabled: false,\r\n title: title,\r\n onWindowClose: onWindowClose\r\n });\r\n },\r\n\r\n //Opens a rad window with a new windowId each time it's called.\r\n openRadWindowQuestionDialog: function (confirmText, title, confirmText2, defaultButton, onWindowClose) {\r\n return this.openRadWindow({\r\n url: '/Common/Windows/Confirm.aspx?DialogType=2&ConfirmText=' + confirmText + '&ConfirmText2=' + confirmText2 + '&DefaultButton=' + defaultButton,\r\n windowId: '_rwQuestionDialog' + this.radWindowId++,\r\n width: 320,\r\n height: 150,\r\n closeEnabled: false,\r\n title: title,\r\n onWindowClose: onWindowClose\r\n });\r\n },\r\n\r\n // Old function. Should be removed when(if?) all calls are updated to use openRadWindow() directly.\r\n openJSRadWindowDestroyOnClose: function (url, windowId, title, width, height, modal, onWindowClose) {\r\n return this.openRadWindow({\r\n url: url,\r\n windowId: windowId,\r\n title: title,\r\n width: width,\r\n height: height,\r\n modal: modal,\r\n onWindowClose: onWindowClose\r\n })\r\n }\r\n}\r\n\r\n// Contains functions for client-side displaying of notifications \r\ncompilator.windowHandler.notifications = function (errorTitle, informationTitle, okButtonText) {\r\n this.showNotification = function (text, callback) {\r\n $kendo.openKendoWindowNotification(informationTitle, text, okButtonText, false, false, callback);\r\n };\r\n\r\n this.showErrorNotification = function (text, callback) {\r\n $kendo.openKendoWindowNotification(errorTitle, text, okButtonText, true, false, callback);\r\n };\r\n};\r\n\r\ncompilator.windowHandler.printing = {\r\n _printingWindowHeight: 135,\r\n _printingWindowWidth: 280,\r\n _printingWindowCenterHeight: 250,\r\n _printingWindowCenterWidth: 500,\r\n\r\n openPrintingWindow: function (url) {\r\n const screenTop = screen.availHeight - this._printingWindowHeight;\r\n const screenLeft = screen.availWidth - this._printingWindowWidth;\r\n const windowProperties = 'height=' + this._printingWindowHeight +\r\n ',width=' + this._printingWindowWidth +\r\n ',top=' + screenTop +\r\n ',left=' + screenLeft +\r\n ',resizable=yes' +\r\n ',directories=no' +\r\n ',titlebar=no' +\r\n ',toolbar=no' +\r\n ',location=no' +\r\n ',status=no' +\r\n ',menubar=no';\r\n\r\n const win = window.open(url, '_blank', windowProperties);\r\n\r\n if (win === null || typeof (win) === 'undefined') {\r\n if (window.parent !== undefined) {\r\n window.parent.displayPopupBlockerInfo();\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n movePrintingWindowToCenter: function () {\r\n const posLeft = (screen.width / 2) - (this._printingWindowCenterWidth / 2);\r\n const posTop = (screen.availHeight / 2) - (this._printingWindowCenterHeight / 2);\r\n\r\n window.moveTo(posLeft, posTop);\r\n window.resizeTo(this._printingWindowCenterWidth, this._printingWindowCenterHeight);\r\n\r\n window.focus();\r\n },\r\n\r\n movePrintingWindowToBottom: function () {\r\n const screenTop = screen.availHeight - this._printingWindowHeight;\r\n const screenLeft = screen.availWidth - this._printingWindowWidth;\r\n\r\n window.moveTo(screenLeft, screenTop);\r\n window.resizeTo(this._printingWindowWidth, this._printingWindowHeight);\r\n },\r\n};\r\n\r\n// Common message listener for receiving messages from child windows (in iframes) that need to perform operations in the main window.\r\n$(document).ready(function () {\r\n if (window.addEventListener) // W3C DOM\r\n window.addEventListener(\"message\", windowOperationsEventListener, false);\r\n else if (window.attachEvent) // IE DOM\r\n window.attachEvent(\"onmessage\", windowOperationsEventListener, false);\r\n});\r\n\r\nfunction windowOperationsEventListener(e) {\r\n // Check the origin to make sure it comes from a trusted source.\r\n if (e.origin !== window.location.origin) {\r\n return;\r\n }\r\n\r\n if (e.data.action === \"CloseWindows\" || e.data.closeAllOtherWindows === true) {\r\n $(\".k-window-content\").each(function () {\r\n $(this).data(\"kendoWindow\").close();\r\n });\r\n }\r\n if (e.data.action === \"OpenKendoWindow\") {\r\n const winWidth = e.data.width || 600;\r\n const winHeight = e.data.height || 450;\r\n const winTitle = e.data.title || \"\";\r\n\r\n $kendo.openNewKendoWindow(e.data.windowUrl, { title: winTitle, width: winWidth, height: winHeight, onWindowClose: e.data.onWindowClose });\r\n }\r\n else if (e.data.action === \"DisplayMessage\") {\r\n $kendo.openKendoWindowNotification(e.data.title || $translations.Common.Information,\r\n e.data.message,\r\n e.data.buttonText || $translations.Common.OK,\r\n false,\r\n true);\r\n }\r\n}\r\n\r\n// Below is used by old code in tyrehotel. When code is updated to create radwindows with windowHandler instead of in markup, these functions can be deleted. \r\nfunction openWin(windowId) {\r\n const oWnd = $find(windowId);\r\n oWnd.show();\r\n $(\".rwCloseButton\").prop(\"title\", GetTranslatedCloseText());\r\n $(\".rwCloseButton\").css(\"cursor\", \"pointer\");\r\n}\r\n\r\nfunction openWindow(url, id, positionBottom) {\r\n const oWnd = $find(id);\r\n oWnd.setUrl(url);\r\n\r\n oWnd.show();\r\n\r\n if (positionBottom) {\r\n const bounds = $telerik.getClientBounds();\r\n oWnd.moveTo(bounds.width - oWnd.get_width(), bounds.height - oWnd.get_height());\r\n }\r\n\r\n $(\".rwCloseButton\").prop(\"title\", GetTranslatedCloseText());\r\n $(\".rwCloseButton\").css(\"cursor\", \"pointer\");\r\n}\r\n\r\nvar $kendo = compilator.windowHandler.kendo;\r\nvar $radWindow = compilator.windowHandler.radWindow;"]}