YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/SMSNotifier/resources/MassSMS.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"MassSMS.min.js","sources":["MassSMS.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\n$.Class(\n\t'SMSNotifier_MassSMS_Js',\n\t{},\n\t{\n\t\t/** Modal container */\n\t\tcontainer: false,\n\t\t/** Message field */\n\t\tmessageField: false,\n\n\t\t/**\n\t\t * Register save\n\t\t */\n\t\tregisterSave: function () {\n\t\t\tthis.container.find('.js-modal__save').on('click', (e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tlet form = this.container.find('form');\n\t\t\t\tif (form.validationEngine('validate')) {\n\t\t\t\t\tlet progress = $.progressIndicator({\n\t\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\t\tblockInfo: { enabled: true }\n\t\t\t\t\t});\n\t\t\t\t\tAppConnector.request(form.serializeFormData())\n\t\t\t\t\t\t.done((response) => {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttextTrusted: false,\n\t\t\t\t\t\t\t\ttext: response.result.message + ` (${response.result.count})`,\n\t\t\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tapp.hideModalWindow();\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(() => {\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttitle: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.always(() => {\n\t\t\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register templates\n\t\t */\n\t\tregisterTemplate: function () {\n\t\t\tlet templateField = this.container.find('select#template');\n\t\t\ttemplateField.on('change', (e) => {\n\t\t\t\tif (e.target.value) {\n\t\t\t\t\tthis.messageField.val(e.target.value);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Register modal events\n\t\t * @param {jQuery} modalContainer\n\t\t */\n\t\tregisterEvents: function (modalContainer) {\n\t\t\tthis.container = modalContainer;\n\t\t\tthis.messageField = this.container.find('[name=\"message\"]');\n\t\t\tthis.registerTemplate();\n\t\t\tthis.registerSave();\n\t\t\tnew App.Fields.Text.Completions(this.messageField, {\n\t\t\t\tcompletionsCollection: { emojis: true },\n\t\t\t\tautolink: false\n\t\t\t});\n\t\t\tApp.Fields.MultiImage.register(this.container);\n\t\t}\n\t}\n);\n"],"names":["$","Class","container","messageField","registerSave","_this","find","on","e","preventDefault","form","validationEngine","progress","progressIndicator","message","app","vtranslate","blockInfo","enabled","AppConnector","request","serializeFormData","done","response","showNotify","textTrusted","text","result","concat","count","type","hideModalWindow","fail","title","always","mode","registerTemplate","_this2","templateField","target","value","val","registerEvents","modalContainer","App","Fields","Text","Completions","completionsCollection","emojis","autolink","MultiImage","register"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,wBAAwB,CACxB,EAAE,CACF,uBAECC,SAAS,CAAA,CAAA,CAAO,qBAEhBC,YAAY,GAAO;AAGrB;AACA,KACEC,YAAY,CAAE,SAAAA,cAAY,CAAA,IAAAC,KAAA,CACzB,IAAA,CAAA,IAAI,CAACH,SAAS,CAACI,IAAI,CAAC,iBAAiB,CAAC,CAACC,EAAE,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,CACzDA,CAAC,CAACC,cAAc,EAAE,CAClB,IAAIC,IAAI,CAAGL,KAAI,CAACH,SAAS,CAACI,IAAI,CAAC,MAAM,CAAC,CACtC,GAAII,IAAI,CAACC,gBAAgB,CAAC,UAAU,CAAC,CAAE,CACtC,IAAIC,QA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