YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Documents/resources/Detail.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is:  vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Documents_Detail_Js',\n\t{\n\t\t//It stores the CheckFileIntegrity response data\n\t\tcheckFileIntegrityResponseCache: {},\n\n\t\t/*\n\t\t * function to trigger CheckFileIntegrity action\n\t\t * @param: CheckFileIntegrity url.\n\t\t */\n\t\tcheckFileIntegrity: function (checkFileIntegrityUrl) {\n\t\t\tDocuments_Detail_Js.getFileIntegrityResponse(checkFileIntegrityUrl).done(function (data) {\n\t\t\t\tDocuments_Detail_Js.displayCheckFileIntegrityResponse(data);\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * function to get the CheckFileIntegrity response data\n\t\t * @returns {Promise}\n\t\t */\n\t\tgetFileIntegrityResponse: function (params) {\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(Documents_Detail_Js.checkFileIntegrityResponseCache)) {\n\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tDocuments_Detail_Js.checkFileIntegrityResponseCache = data;\n\t\t\t\t\taDeferred.resolve(Documents_Detail_Js.checkFileIntegrityResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\n\t\t/*\n\t\t * function to display the CheckFileIntegrity message\n\t\t */\n\t\tdisplayCheckFileIntegrityResponse: function (data) {\n\t\t\tvar result = data['result'];\n\t\t\tvar success = result['success'];\n\t\t\tvar message = result['message'];\n\t\t\tvar params = {};\n\t\t\tif (success) {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'success'\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tparams = {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'error'\n\t\t\t\t};\n\t\t\t}\n\t\t\tDocuments_Detail_Js.showNotify(params);\n\t\t\twindow.location.href = result['url'];\n\t\t},\n\n\t\t//This will show the messages of CheckFileIntegrity using pnotify\n\t\tshowNotify: function (customParams) {\n\t\t\tvar params = {\n\t\t\t\ttitle: app.vtranslate('JS_CHECK_FILE_INTEGRITY'),\n\t\t\t\ttext: customParams.text,\n\t\t\t\ttype: customParams.type,\n\t\t\t\tdelay: '2000'\n\t\t\t};\n\t\t\tapp.showNotify(params);\n\t\t}\n\t},\n\t{}\n);\n"],"names":["Vtiger_Detail_Js","checkFileIntegrityResponseCache","checkFileIntegrity","checkFileIntegrityUrl","Documents_Detail_Js","getFileIntegrityResponse","done","data","displayCheckFileIntegrityResponse","params","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","resolve","promise","result","success","message","text","type","showNotify","window","location","href","url","customParams","title","app","vtranslate","delay"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,qBAAqB,CACrB;AAECC,+BAA+B,CAAE,EAAE;AAGrC;AACA;AACA,KACEC,kBAAkB,CAAE,SAAAA,kBAAAA,CAAUC,qBAAqB,CAAE,CACpDC,mBAAmB,CAACC,wBAAwB,CAACF,qBAAqB,CAAC,CAACG,IAAI,CAAC,SAAUC,IAAI,CAAE,CACxFH,mBAAmB,CAACI,iCAAiC,CAACD,IAAI,EAC3D,CAAC,EACF,CAAC;AAGH;AACA;AACA,KACEF,wBAAwB,CAAE,SAAAA,wB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