YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/SMSTemplates/resources/Edit.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Edit.min.js","sources":["Edit.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\nVtiger_Edit_Js(\n\t'SMSTemplates_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Load variables panel\n\t\t * @param {jQuery} form\n\t\t */\n\t\tloadVariablePanel: function (form) {\n\t\t\tlet panel = form.find('#variablePanel');\n\t\t\tlet targetModule = form.find('[name=\"target\"]').val();\n\t\t\tif (!targetModule) {\n\t\t\t\tpanel.html('');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tpanel.progressIndicator();\n\t\t\tAppConnector.request({\n\t\t\t\tmodule: 'SMSTemplates',\n\t\t\t\trecord: app.getRecordId(),\n\t\t\t\tview: 'VariablePanel',\n\t\t\t\ttype: 'sms',\n\t\t\t\tselectedModule: targetModule\n\t\t\t})\n\t\t\t\t.done((response) => {\n\t\t\t\t\tpanel.html(response);\n\t\t\t\t\tthis.afterLoadVariablePanel(panel);\n\t\t\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);\n\t\t\t\t})\n\t\t\t\t.fail(() => {\n\t\t\t\t\tpanel.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Events after load variables panel\n\t\t * @param {jQuery} html\n\t\t */\n\t\tafterLoadVariablePanel: function (html) {\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(html.find('select.select2'));\n\t\t\tApp.Fields.Text.registerCopyClipboard(html);\n\t\t},\n\t\t/**\n\t\t * Register variables panel events\n\t\t * @param {jQuery} form\n\t\t */\n\t\tregisterVariablePanelEvent: function (form) {\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tform\n\t\t\t\t.find('[name=\"message\"]')\n\t\t\t\t.closest('.js-block-content')\n\t\t\t\t.prepend('<div id=\"variablePanel\" class=\"row px-0 borderBottom bc-gray-lighter mt-n1\"></div>');\n\t\t\tthis.loadVariablePanel(form);\n\t\t\tform.find('[name=\"target\"]').on('change', () => {\n\t\t\t\tthis.loadVariablePanel(form);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register basic events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerVariablePanelEvent(container);\n\t\t\tApp.Tools.VariablesPanel.registerRefreshCompanyVariables(container);\n\t\t\tApp.Tools.VariablesPanel.refreshCompanyVariables(container);\n\t\t\tnew App.Fields.Text.Completions(container.find('[name=\"message\"]'), {\n\t\t\t\tcompletionsCollection: { emojis: true },\n\t\t\t\tautolink: false\n\t\t\t});\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","loadVariablePanel","form","_this","panel","find","targetModule","val","progressIndicator","AppConnector","request","module","record","app","getRecordId","view","type","selectedModule","done","response","html","afterLoadVariablePanel","App","Tools","VariablesPanel","registerRefreshCompanyVariables","fail","mode","Fields","Picklist","showSelect2ElementView","Text","registerCopyClipboard","registerVariablePanelEvent","_this2","getForm","closest","prepend","on","registerBasicEvents","container","_super","refreshCompanyVariables","Completions","completionsCollection","emojis","autolink"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,cAAc,CACb,sBAAsB,CACtB,EAAE,CACF;AAED;AACA;AACA,KACEC,iBAAiB,CAAE,SAAAA,iBAAAA,CAAUC,IAAI,CAAE,CAAAC,IAAAA,KAAA,CAC9BC,IAAAA,CAAAA,KAAK,CAAGF,IAAI,CAACG,IAAI,CAAC,gBAAgB,CAAC,CACnCC,YAAY,CAAGJ,IAAI,CAACG,IAAI,CAAC,mBAAiB,CAAC,CAACE,GAAG,EAAE,CAAA,OAChDD,YAAY,CAKjBF,KAAAA,KAAK,CAACI,iBAAiB,E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