YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/GenerateModal.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"GenerateModal.min.js","sources":["GenerateModal.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\njQuery.Class(\n\t'Vtiger_GenerateModal_Js',\n\t{},\n\t{\n\t\tregisterGenetateButton: function (container) {\n\t\t\tconst thisInstance = this;\n\t\t\tcontainer.find('button.js-genetate-button').on('click', function (e) {\n\t\t\t\tdocument.progressLoader = $.progressIndicator({\n\t\t\t\t\tmessage: app.vtranslate('JS_LOADING_PLEASE_WAIT'),\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlet currentTarget = container.find('.js-generate-mapping option:selected'),\n\t\t\t\t\tactionUrl = currentTarget.data('url'),\n\t\t\t\t\tmethod = container.find('[name=\"method\"]:checked');\n\t\t\t\tif (method.length <= 0) {\n\t\t\t\t\twindow.location.href = actionUrl;\n\t\t\t\t} else {\n\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\t\t\taction: 'GenerateRecords',\n\t\t\t\t\t\t\trecords: container.find('[name=\"all_records\"]').val(),\n\t\t\t\t\t\t\ttemplate: currentTarget.data('id'),\n\t\t\t\t\t\t\ttarget: currentTarget.data('name'),\n\t\t\t\t\t\t\tmethod: method.val()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'json'\n\t\t\t\t\t})\n\t\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t\tlet response = data['result'];\n\t\t\t\t\t\t\tif (data['success']) {\n\t\t\t\t\t\t\t\tlet records = response.ok;\n\t\t\t\t\t\t\t\tthisInstance.summary(container, response);\n\t\t\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\tif ('1' === method.val()) {\n\t\t\t\t\t\t\t\t\tfor (let i in records) {\n\t\t\t\t\t\t\t\t\t\twindow.open(actionUrl + records[i], '_blank');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function (data, err) {\n\t\t\t\t\t\t\tapp.errorLog(data, err);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tsummary: function (container, data) {\n\t\t\tcontainer.find('.modal-title').text(app.vtranslate('JS_SUMMARY'));\n\t\t\tcontainer\n\t\t\t\t.find('.modal-body')\n\t\t\t\t.html(\n\t\t\t\t\t'<div>' +\n\t\t\t\t\t\tapp.vtranslate('JS_SELECTED_RECORDS') +\n\t\t\t\t\t\t': <strong>' +\n\t\t\t\t\t\tdata.all +\n\t\t\t\t\t\t'</strong></div><div>' +\n\t\t\t\t\t\tapp.vtranslate('JS_SUCCESSFULLY_PERFORMED_ACTION_FOR') +\n\t\t\t\t\t\t': <strong>' +\n\t\t\t\t\t\tdata.ok.length +\n\t\t\t\t\t\t'</strong></div><div>' +\n\t\t\t\t\t\tapp.vtranslate('JS_ACTION_FAILED_FOR') +\n\t\t\t\t\t\t': <strong>' +\n\t\t\t\t\t\tdata.fail.length +\n\t\t\t\t\t\t'</strong></div>'\n\t\t\t\t);\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tvar container = jQuery('.generateMappingModal');\n\t\t\tthis.registerGenetateButton(container);\n\t\t}\n\t}\n);\n\njQuery(document).ready(function (e) {\n\tvar instance = new Vtiger_GenerateModal_Js();\n\tinstance.registerEvents();\n});\n"],"names":["jQuery","Class","registerGenetateButton","container","thisInstance","find","on","document","progressLoader","$","progressIndicator","message","app","vtranslate","position","blockInfo","enabled","currentTarget","actionUrl","data","method","length","window","location","href","AppConnector","request","module","getModuleName","action","records","val","template","target","dataType","done","response","result","success","ok","summary","mode","i","open","fail","err","errorLog","text","html","all","registerEvents","ready","instance","Vtiger_GenerateModal_Js"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,MAAM,CAACC,KAAK,CACX,yBAAyB,CACzB,EAAE,CACF,CACCC,sBAAsB,CAAE,SAAAA,sBAAUC,CAAAA,SAAS,CAAE,CAC5C,IAAMC,YAAY,CAAG,IAAI,CACzBD,SAAS,CAACE,IAAI,CAAC,2BAA2B,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,UAAa,CACpEC,QAAQ,CAACC,cAAc,CAAGC,CAAC,CAACC,iBAAiB,CAAC,CAC7CC,OAAO,CAAEC,GAAG,CAACC,UAAU,CAAC,wBAAwB,CAAC,CACjDC,QAAQ,CAAE,MAAM,CAChBC,SAAS,CAAE,CACVC,OAAO,GACR,CACD,CAAC,CAAC,CACF,IAAIC,aAAa,CAAGd,SAAS,CAACE,IAAI,CAAC,sCAAsC,CAAC,CACzEa,SAAS,CAAGD,aAAa,CAACE,IAAI,CAAC,KAAK,CAAC,CACrCC,MAAM,CAAGjB,SAAS,CAACE,IAAI,CAAC,2BAAyB,CAAC,CAC9B,CAAC,EAAlBe,MAAM,CAACC,MAAW,CACrBC,MAAM,CAACC,QAAQ,CAACC,IAAI,CAAGN,SAAS,CAEhCO,YAAY,CAACC,OAAO,CAAC,CACpBP,IAAI,CAAE,CACLQ,MAAM,CAAEf,GAAG,CAACgB,aAAa,EAAE,CAC3BC,MAAM,CAAE,iBAAiB,CACzBC,OAAO,CAAE3B,SAAS,CAACE,IAAI,CAAC,wBAAsB,CAAC,CAAC0B,GAAG,EAAE,CACrDC,QAAQ,CAAEf,aAAa,CAACE,IAAI,CAAC,IAAI,CAAC,CAClCc,MAAM,CAAEhB,aAAa,CAACE,IAAI,CAAC,MAAM,CAAC,CAClCC,MAAM,CAAEA,MAAM,CAACW,GAAG,EACnB,CAAC,CACDG,QAAQ,CAAE,MACX,CAAC,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