{"version":3,"sources":["../js/Audit.js"],"names":["g_oAudit","Audit","prototype","getAnnotationAudit","annotationId","bSVGAnnotation","oJSON","AnnotationId","SessionId","g_szSessionId","$","ajax","type","url","data","JSON","stringify","contentType","dataType","success","response","renderAnnotationAudit","failure","xhr","textStatus","ProcessApiError","error","annotationAudits","oAnnotationAuditHTML","c_szCloseAnnotationAudit","i","length","oAnnotationAudit","actionDescription","g_oSVGText","getUnformattedSVGText","auditTrailId","auditedDate","Date","dateTimeStamp","localeAuditedDate","getTime","getTimezoneOffset","actionType","g_oAnnotations","getDisplayName","userEmailAddress","userDisplayName","formatDate","html","addClass","slideDown","scrollAnnotationAudit","closeAnnotationAudit","bAnimate","iAnimationTime","slideUp","removeClass","iAnnotationAuditPosition","position","top","animate","scrollTop","window"],"mappings":"AAeA,IAAIA,SAAW,IAEd,WACA,aAKA,SAASC,SAOTA,MAAMC,UAAUC,mBAAqB,SAAUC,aAAcC,gBAE5D,IAAIC,MAAQ,CACXC,aAAcH,aACdI,UAAWC,eAIZC,EAAEC,KAAK,CACNC,KAAM,OACNC,IAAK,8CACLC,KAAMC,KAAKC,UAAUV,OACrBW,YAAa,kCACbC,SAAU,OACVC,QAAS,SAAUC,UAElBpB,SAASqB,sBAAsBjB,aAAcgB,SAAUf,iBAExDiB,QAAS,SAAUC,IAAKC,YACvBC,gBAAgBF,IAAKC,aAEtBE,MAAO,SAAUH,IAAKC,YACrBC,gBAAgBF,IAAKC,gBAUxBvB,MAAMC,UAAUmB,sBAAwB,SAAUjB,aAAcuB,iBAAkBtB,gBAEjF,IAAIuB,qBAAuB,GAG3BA,sBAAwB,YAAcxB,aAAe,qEAGrDwB,sBAAwB,cAAgBxB,aAAe,gFAAkFJ,SAAS6B,yBAA2B,gDAG7KD,sBAAwB,SAGxB,IAAK,IAAIE,EAAI,EAAGA,EAAIH,iBAAiBI,OAAQD,IAAK,CAGjD,IAAIE,iBAAmBL,iBAAiBG,GAGpCzB,iBAGH2B,iBAAiBC,kBAAoBC,WAAWC,sBAAsBH,iBAAiBC,oBAIxFL,sBAAwB,YAAcI,iBAAiBI,aAAe,6CAGtE,IAAIC,YAAc,IAAIC,KAAKN,iBAAiBO,eACxCC,kBAAoB,IAAIF,KAAKD,YAAYI,UAAa,IAAQJ,YAAYK,qBAG9Ed,sBAAwB,+CAAiDI,iBAAiBW,WACvF,QAAUC,eAAeC,eAAeb,iBAAiBc,iBAAkBd,iBAAiBe,iBAC5F,QAAUC,WAAWR,mBACrB,OAGHZ,sBAAwB,kDAAoDI,iBAAiBC,kBAAoB,OAGjHL,sBAAwB,SAIzBlB,EAAE,IAAMN,aAAe,6BAA6B6C,KAAKrB,sBAGzDlB,EAAE,IAAMN,aAAe,6BAA6B8C,SAAS,4BAG7DxC,EAAE,IAAMN,aAAe,6BAA6B+C,UAAU,GAAI,GAAI,WAAcnD,SAASoD,sBAAsBhD,iBAOpHH,MAAMC,UAAUmD,qBAAuB,SAAUjD,aAAckD,UAG9D,IAAIC,eAAiBD,SAAW,IAAM,EAGtC5C,EAAE,IAAMN,aAAe,6BAA6BoD,QAAQD,eAAgB,GAAI,WAAc7C,EAAE,IAAMN,aAAe,6BAA6BqD,YAAY,+BAO/JxD,MAAMC,UAAUkD,sBAAwB,SAAUhD,cAGjD,IAAIsD,yBAA2BhD,EAAE,IAAMN,aAAe,6BAA6BuD,WAAWC,IAG9FF,0BAA4B,GAG5BhD,EAAE,wBAAwBmD,QAAQ,CAAEC,UAAW,KAAOJ,yBAA2B,QAMlFK,OAAO9D,MAAQA,MArIhB","file":"Audit-841084bb94.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 2018 SGS Europe.\r\n* Any unauthorised use, reproduction, or transfer of this program is strictly\r\n* prohibited.\r\n*\r\n* File Name:\tAudit.js\r\n*\r\n* Description:\tJavaScript code for Audit module.\r\n*\r\n* History:\t\t05-FEB-18\tP Dickson\tInitial implementation.\r\n*\r\n*/\r\n\r\nvar g_oAudit = {};\r\n\r\n(function () {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Create the Audit object.\r\n\t */\r\n\tfunction Audit() {}\r\n\r\n\t/**\r\n\t * Gets the audit trail for an annotation.\r\n\t * @param {int} annotationId - The id of the annotation.\r\n\t * @param {boolean} bSVGAnnotation - Is the annotation created on an SVG document.\r\n\t */\r\n\tAudit.prototype.getAnnotationAudit = function (annotationId, bSVGAnnotation) {\r\n\t\t// Build up the JSON to be sent to the server.\r\n\t\tvar oJSON = {\r\n\t\t\tAnnotationId: annotationId,\r\n\t\t\tSessionId: g_szSessionId\r\n\t\t};\r\n\r\n\t\t// Go the server and request the annotations audit trail.\r\n\t\t$.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: \"internal/GreenlightAudit/getAnnotationAudit\",\r\n\t\t\tdata: JSON.stringify(oJSON),\r\n\t\t\tcontentType: \"application/json; charset=utf-8\",\r\n\t\t\tdataType: \"json\",\r\n\t\t\tsuccess: function (response) {\r\n\t\t\t\t// Render the annotation audit.\r\n\t\t\t\tg_oAudit.renderAnnotationAudit(annotationId, response, bSVGAnnotation);\r\n\t\t\t},\r\n\t\t\tfailure: function (xhr, textStatus) {\r\n\t\t\t\tProcessApiError(xhr, textStatus);\r\n\t\t\t},\r\n\t\t\terror: function (xhr, textStatus) {\r\n\t\t\t\tProcessApiError(xhr, textStatus);\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t * Renders the audit trail for an annotation.\r\n\t * @param {int} annotationId - The id of the annotation.\r\n\t * @param {obj} annotationAudits - The list of annotation audits to be rendered.\r\n\t */\r\n\tAudit.prototype.renderAnnotationAudit = function (annotationId, annotationAudits, bSVGAnnotation) {\r\n\t\t// Build up the HTML for the audit trail.\r\n\t\tvar oAnnotationAuditHTML = \"\";\r\n\t\t\r\n\t\t// Create a div for closing the annotation audit.\r\n\t\toAnnotationAuditHTML += \"
\" + oAnnotationAudit.actionType\r\n\t\t\t\t+ \"
\" + g_oAnnotations.getDisplayName(oAnnotationAudit.userEmailAddress, oAnnotationAudit.userDisplayName)\r\n\t\t\t\t+ \"
\" + formatDate(localeAuditedDate)\r\n\t\t\t\t+ \"
\" + oAnnotationAudit.actionDescription + \"
\";\r\n\r\n\t\t\t// Close the div for the annotation audit.\r\n\t\t\toAnnotationAuditHTML += \"