{"version":3,"sources":["../js/GreenlightMessages.js"],"names":["g_oGreenlightMessages","GreenlightMessage","this","c_szUnauthorisedMessage","prototype","displaySuccessBubble","szContent","delay","setTimeout","displayBubble","displayErrorBubble","displayPermanentErrorBubble","displayWarningBubble","displayInfoBubble","bShowCollapseIcon","displayConfirmBubble","confirmAction","cancelAction","szType","szIcon","bDisplayTop","bAutoClose","bCloseOtherBubblesOfType","szConfirmAction","szCancelAction","i","g_oActiveBubbles","length","type","closeBubble","id","$","append","g_iActiveBubbleId","click","iBubbleHeight","height","parseInt","css","replace","window","iRightPos","iTargetRightPos","g_oSettings","g_oUserSettings","RightMenuCollapse","g_oSVGCopyMagic","g_bCopyMagicSlideoutShown","g_oTextCompare","g_bTextCompareInProgress","g_bTextCompareDivShown","toggle","iAnimateRight","displayTop","animate","right","push","ActiveBubble","iId","bForceClose","bAnimateOut","oBubble","grep","bubble","dtNow","Date","displayDate","g_iBubbleCloseSeconds","width","remove","fadeOut","closeBubbles","toggleBubbleCollapse"],"mappings":"AAaA,IAAIA,sBAAwB,IAE3B,WACG,aAEA,SAASC,oBACLC,KAAKC,wBAA0B,GAQnCF,kBAAkBG,UAAUC,qBAAuB,SAAUC,UAAWC,OACpEA,WAA0B,IAAVA,MAAyBA,MAAQ,EACjDC,WAAW,WACPC,cAAc,UAAW,kCAAmCH,WAAW,GAAO,GAAM,EAAO,GAAI,IAAI,IACpGC,QAOPN,kBAAkBG,UAAUM,mBAAqB,SAAUJ,WACvDG,cAAc,QAAS,wBAAyBH,WAAW,GAAO,GAAM,EAAO,GAAI,IAAI,IAO3FL,kBAAkBG,UAAUO,4BAA8B,SAAUL,WAChEG,cAAc,QAAS,wBAAyBH,WAAW,GAAO,GAAO,EAAO,GAAI,IAAI,IAQ5FL,kBAAkBG,UAAUQ,qBAAuB,SAAUN,UAAWC,OACpEA,WAA0B,IAAVA,MAAyBA,MAAQ,EACjDC,WAAW,WACPC,cAAc,UAAW,kCAAmCH,WAAW,GAAO,GAAM,EAAO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,IAAI,UAAW,WAInDP,EAAE,yBAA2B2B,KAAKpB,IAAI,YAAa,kBAMnDP,EAAE,uBAAyB2B,KAAKpB,IAAI,UAAW,QAG/CP,EAAE,eAAiB2B,KAAKJ,QAAQ,CAAEc,MAAO,SAGzCrC,EAAE,yBAA2B2B,KAAKpB,IAAI,YAAa,oBAK3DE,OAAOvC,kBAAoBA,kBAjT/B","file":"GreenlightMessages-ecd9497d89.js","sourcesContent":["/*\r\n * Copyright (c) 2018 SGS Europe. All rights reserved.\r\n *\r\n * This program is the CONFIDENTIAL and PROPRIETARY property of 2017 SGS Europe.\r\n * Any unauthorised use, reproduction, or transfer of this program is strictly\r\n * prohibited.\r\n *\r\n * File Name:\tGreenlightMessages.js\r\n *\r\n * Description:\tCommon Javascript functions for displaying message bubbles.\r\n *\r\n */\r\n\r\nvar g_oGreenlightMessages = {};\r\n\r\n(function () {\r\n \"use strict\";\r\n\r\n function GreenlightMessage() {\r\n this.c_szUnauthorisedMessage = \"\";\r\n }\r\n\r\n /**\r\n * Displays a Success Bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n * @param {number} [delay=0] - Duration in milliseconds before the bubble is displayed. Defaults to 0 (immediate display).\r\n */\r\n GreenlightMessage.prototype.displaySuccessBubble = function (szContent, delay) {\r\n delay = (typeof delay !== 'undefined') ? delay : 0; // Handle default value for delay\r\n setTimeout(function () {\r\n displayBubble(\"Success\", \"img/bubble_emblem-default24.png\", szContent, false, true, false, \"\", \"\", false);\r\n }, delay);\r\n };\r\n\r\n /**\r\n * Displays an Error Bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n */\r\n GreenlightMessage.prototype.displayErrorBubble = function (szContent) {\r\n displayBubble(\"Error\", \"img/Reject_Wht_24.png\", szContent, false, true, false, \"\", \"\", false);\r\n };\r\n\r\n /**\r\n * Displays an Error Bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n */\r\n GreenlightMessage.prototype.displayPermanentErrorBubble = function (szContent) {\r\n displayBubble(\"Error\", \"img/Reject_Wht_24.png\", szContent, false, false, false, \"\", \"\", false);\r\n };\r\n\r\n /**\r\n * Displays a Warning Bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n * @param {number} [delay=0] - Duration in milliseconds before the bubble is displayed. Defaults to 0 (immediate display).\r\n */\r\n GreenlightMessage.prototype.displayWarningBubble = function (szContent, delay) {\r\n delay = (typeof delay !== 'undefined') ? delay : 0; // Handle default value for delay\r\n setTimeout(function () {\r\n displayBubble(\"Warning\", \"img/bubble_dialog-warning24.png\", szContent, false, true, false, \"\", \"\", false);\r\n }, delay);\r\n };\r\n\r\n /**\r\n * Displays an info Bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n * @param {bool} bShowCollapseIcon - If a collapse icon should be shown.\r\n */\r\n GreenlightMessage.prototype.displayInfoBubble = function (szContent, bShowCollapseIcon) {\r\n displayBubble(\"Info\", \"img/bubble_dialog-info24.png\", szContent, true, false, true, \"\", \"\", bShowCollapseIcon);\r\n };\r\n\r\n /**\r\n * Displays a Confirm Bubble\r\n * @param {string} szContent - Contents of bubble.\r\n * @param {string} confirmAction - The action of the confirm.\r\n * @param {string} cancelAction - The action of the cancel.\r\n */\r\n GreenlightMessage.prototype.displayConfirmBubble = function (szContent, confirmAction, cancelAction) {\r\n displayBubble(\"Confirm\", \"img/bubble_dialog-warning24.png\", szContent, true, false, true, confirmAction, cancelAction, false);\r\n };\r\n\r\n /**\r\n * Shows the speech bubble in the required location.\r\n * @param {string} szType - Bubble type.\r\n * @param {string} szIcon - The icon to display within the bubble.\r\n * @param {string} szContent - Contents of bubble.\r\n * @param {bool} bDisplayTop - If the bubble should be displayed at the top.\r\n * @param {bool} bAutoClose - If the bubble should auto close.\r\n * @param {bool} bCloseOtherBubblesOfType - If other bubbles of the same type should be closed.\r\n * @param {string} szConfirmAction - The confirm action for confirm bubbles.\r\n * @param {string} szCancelAction - The cancel action for confirm bubbles.\r\n * @param {bool} bShowCollapseIcon - If the bubble should be collapsable.\r\n */\r\n var displayBubble = function (szType, szIcon, szContent, bDisplayTop, bAutoClose, bCloseOtherBubblesOfType, szConfirmAction, szCancelAction, bShowCollapseIcon) {\r\n\r\n // Set the width of the bubble.\r\n var iWidth = 300;\r\n\r\n // If we wish to close other bubbles of the same type.\r\n if (bCloseOtherBubblesOfType) {\r\n\r\n // Loop through each of the active bubbles.\r\n for (var i = 0; i < g_oActiveBubbles.length; i++) {\r\n\r\n // If this bubble is the same type.\r\n if (g_oActiveBubbles[i].type == szType) {\r\n\r\n // Force close the bubble.\r\n g_oGreenlightMessages.closeBubble(g_oActiveBubbles[i].id, true, true);\r\n }\r\n }\r\n }\r\n\r\n // Add the new bubble to the page.\r\n $(\"body\").append(\r\n \"
\"\r\n );\r\n\r\n // Set the confirm action if required.\r\n if (typeof (szConfirmAction) == \"function\") {\r\n $(\"#tdSpeech_Confirm_\" + g_iActiveBubbleId + \"_Confirm\").click(function () { szConfirmAction(); });\r\n }\r\n\r\n // Set the cancel action if required.\r\n if (typeof (szCancelAction) == \"function\") {\r\n $(\"#tdSpeech_Confirm_\" + g_iActiveBubbleId + \"_Reject\").click(function () { szCancelAction(); });\r\n }\r\n\r\n // Work out the height of the bubble (including any padding).\r\n var iBubbleHeight = ($(\"#divGLSpeech\" + g_iActiveBubbleId).height() + parseInt($(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"padding-top\")) + parseInt($(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"padding-bottom\")));\r\n\r\n // Set the properties of the bubble.\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"width\", iWidth);\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"right\", -iWidth);\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"z-index\", 9999);\r\n\r\n // If we are displaying the bubble at the top.\r\n if (bDisplayTop) {\r\n\r\n // Move the bubble to the correct position.\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"top\", parseInt($(\"#divViewerCell\").css(\"top\").replace(\"px\", \"\")) + (5 + ($(\"#divSepContainer\").css(\"display\") != \"none\" ? 40 : 0) + 10));\t// Allow 5px for the loading bar, 40px for the slide out if shown, and 10 pixels of Margin.\r\n }\r\n // If we are displaying the bubble at the bottom.\r\n else {\r\n\r\n // Move the bubble to the correct position.\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).css(\"top\", $(window).height() - (iBubbleHeight + 10));\t// Allow 10 pixels of Margin.\r\n }\r\n\r\n // Determine the position at which the bubble should be animated to.\r\n var iRightPos = parseInt($(\"#divGLSpeech\" + g_iActiveBubbleId).css('right'));\r\n var iTargetRightPos = 10 + 8; // Allow 10 pixels of margin, and 8px for the viewer margin.\r\n\r\n // If the right slide out is shown, add the width of the slide out.\r\n if ($(\"#divSepContainer\").css(\"display\") != \"none\" && g_oSettings.g_oUserSettings.RightMenuCollapse == false) {\r\n iTargetRightPos += parseInt($(\"#divSepDiv\").css(\"width\").replace(\"px\", \"\"));\r\n }\r\n\r\n // If the right copy magic slide out is shown, add the width of the slide out.\r\n if ($(\"#divCopyMagicContainer\").css(\"display\") != \"none\" && g_oSVGCopyMagic.g_bCopyMagicSlideoutShown) {\r\n iTargetRightPos += parseInt($(\"#divCopyMagicContainer\").css(\"width\").replace(\"px\", \"\"));\r\n }\r\n\r\n // If we are in text compare mode, we need to add the width of the slider button if this is in the correct state.\r\n if ((g_oTextCompare.g_bTextCompareInProgress && bDisplayTop && g_oTextCompare.g_bTextCompareDivShown) || (g_oTextCompare.g_bTextCompareInProgress && !bDisplayTop && !g_oTextCompare.g_bTextCompareDivShown)) {\r\n iTargetRightPos += parseInt($(\"#divTextCompareButton\").css(\"width\").replace(\"px\", \"\"));\r\n }\r\n\r\n // Show the bubble.\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).toggle(true);\r\n\r\n // Determine animation to move in from the right.\r\n var iAnimateRight = (parseInt($(\"#divGLSpeech\" + g_iActiveBubbleId).css('right')) == iTargetRightPos) ? iRightPos : iTargetRightPos;\r\n\r\n // Move any existing bubbles up to make room for the new bubble.\r\n for (var i = 0; i < g_oActiveBubbles.length; i++) {\r\n\r\n // If this bubble is in the same position as the bubble added.\r\n if (g_oActiveBubbles[i].displayTop == bDisplayTop) {\r\n\r\n // If the bubble is at the top of the window.\r\n if (bDisplayTop) {\r\n\r\n // Move the bubble down by the new bubble height plus 10 pixels of margin.\r\n $(\"#divGLSpeech\" + g_oActiveBubbles[i].id).css(\"top\", parseInt($(\"#divGLSpeech\" + g_oActiveBubbles[i].id).css(\"top\").replace(\"px\", \"\")) + (iBubbleHeight + 10));\r\n }\r\n // If the bubble is at the bottom of the window.\r\n else {\r\n\r\n // Move the bubble up by the new bubble height plus 10 pixels of margin.\r\n $(\"#divGLSpeech\" + g_oActiveBubbles[i].id).css(\"top\", parseInt($(\"#divGLSpeech\" + g_oActiveBubbles[i].id).css(\"top\").replace(\"px\", \"\")) - (iBubbleHeight + 10));\r\n }\r\n }\r\n }\r\n\r\n // Animate the bubble in from the right.\r\n $(\"#divGLSpeech\" + g_iActiveBubbleId).animate({\r\n right: iAnimateRight + 'px'\r\n });\r\n\r\n // Add the bubble to the list of active bubbles.\r\n g_oActiveBubbles.push(new ActiveBubble(g_iActiveBubbleId, szType, bDisplayTop, bAutoClose));\r\n\r\n // Try to close the bubble if required.\r\n if (bAutoClose) {\r\n g_oGreenlightMessages.closeBubble(g_iActiveBubbleId, false, false);\r\n }\r\n\r\n // Increase the active bubble id.\r\n g_iActiveBubbleId++;\r\n }\r\n\r\n /**\r\n * Closes the speech bubble when required.\r\n * @param {int} iId - The id of the bubble to close.\r\n * @param {bool} bForceClose - If the bubble should be closed regardless of duration.\r\n * @param {bool} bAnimateOut - If the bubble should be animated out.\r\n */\r\n GreenlightMessage.prototype.closeBubble = function (iId, bForceClose, bAnimateOut) {\r\n // Locate the bubble from the list.\r\n var oBubble = $.grep(g_oActiveBubbles, function (bubble) { return bubble.id == iId; })[0];\r\n\r\n // Get the current date time.\r\n var dtNow = new Date();\r\n\r\n // If the bubble has been found.\r\n if (oBubble) {\r\n\r\n // Check if the bubble has been static for the configured seconds, or if we are forcing the close.\r\n if ((((dtNow - oBubble.displayDate) / 1000) > g_iBubbleCloseSeconds) || bForceClose) {\r\n\r\n // If we are animating the bubble out.\r\n if (bAnimateOut) {\r\n\r\n // Animate and remove the bubble.\r\n $(\"#divGLSpeech\" + oBubble.id).animate({ right: $(\"#divGLSpeech\" + oBubble.id).width() * -1 }, 400, function () { $(\"#divGLSpeech\" + oBubble.id).remove(); });\r\n }\r\n // If we are not animating out.\r\n else {\r\n\r\n // Hide and remove the bubble.\r\n $(\"#divGLSpeech\" + oBubble.id).fadeOut(400, function () { $(\"#divGLSpeech\" + oBubble.id).remove(); });\r\n }\r\n\r\n // Remove the bubble from the list.\r\n g_oActiveBubbles = $.grep(g_oActiveBubbles, function (bubble) { return bubble.id != iId; });\r\n }\r\n // If the bubble has not been static for 5 seconds.\r\n else {\r\n\r\n // Check again in 1 second.\r\n setTimeout(function () { g_oGreenlightMessages.closeBubble(iId, bForceClose, bAnimateOut); }, 1000);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Closes all active bubbles of a given type.\r\n * @param {string} type - The type of bubble to close.\r\n */\r\n GreenlightMessage.prototype.closeBubbles = function (type) {\r\n\r\n // Loop through each of the active bubbles.\r\n for (var i = 0; i < g_oActiveBubbles.length; i++) {\r\n\r\n // If this is a bubble of our desired type.\r\n if (g_oActiveBubbles[i].type == type || !type) {\r\n\r\n // Force close the bubble.\r\n g_oGreenlightMessages.closeBubble(g_oActiveBubbles[i].id, true, true);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Toggles the bubble collapse.\r\n * @param {int} iId - The id of the bubble to toggle.\r\n */\r\n GreenlightMessage.prototype.toggleBubbleCollapse = function (iId) {\r\n\r\n // If the bubble is currently collapsed.\r\n if ($(\"#spanSpeech_Content_\" + iId).css(\"display\") == \"none\") {\r\n\r\n // Expand the bubble.\r\n $(\"#divGLSpeech\" + iId).animate({ width: '300px' }, function () {\r\n\r\n // Show the span content.\r\n $(\"#spanSpeech_Content_\" + iId).css(\"display\", \"block\");\r\n });\r\n\r\n // Turn the icon.\r\n $(\"#divGLSpeech_Collapse_\" + iId).css(\"transform\", \"rotate(0deg)\");\r\n }\r\n // If the bubble is currently expanded.\r\n else {\r\n\r\n // Hide the span content.\r\n $(\"#spanSpeech_Content_\" + iId).css(\"display\", \"none\");\r\n\r\n // Collapse the bubble.\r\n $(\"#divGLSpeech\" + iId).animate({ width: '50px' });\r\n\r\n // Turn the icon.\r\n $(\"#divGLSpeech_Collapse_\" + iId).css(\"transform\", \"rotate(180deg)\");\r\n }\r\n }\r\n\r\n // Apply to the window.\r\n window.GreenlightMessage = GreenlightMessage;\r\n}());\r\n\r\n"]}