public_html/layouts/basic/modules/SMSTemplates/resources/Edit.min.js
'use strict';
/* {[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]} */"use strict";Vtiger_Edit_Js("SMSTemplates_Edit_Js",{},{/**
* Load variables panel
* @param {jQuery} form
*/loadVariablePanel:function loadVariablePanel(form){var _this=this,panel=form.find("#variablePanel"),targetModule=form.find("[name=\"target\"]").val();return targetModule?void(panel.progressIndicator(),AppConnector.request({module:"SMSTemplates",record:app.getRecordId(),view:"VariablePanel",type:"sms",selectedModule:targetModule}).done(function(response){panel.html(response),_this.afterLoadVariablePanel(panel),App.Tools.VariablesPanel.registerRefreshCompanyVariables(panel);}).fail(function(){panel.progressIndicator({mode:"hide"});})):(panel.html(""),!1)},/**
* Events after load variables panel
* @param {jQuery} html
*/afterLoadVariablePanel:function afterLoadVariablePanel(html){App.Fields.Picklist.showSelect2ElementView(html.find("select.select2")),App.Fields.Text.registerCopyClipboard(html);},/**
* Register variables panel events
* @param {jQuery} form
*/registerVariablePanelEvent:function registerVariablePanelEvent(form){var _this2=this;"undefined"==typeof form&&(form=this.getForm()),form.find("[name=\"message\"]").closest(".js-block-content").prepend("<div id=\"variablePanel\" class=\"row px-0 borderBottom bc-gray-lighter mt-n1\"></div>"),this.loadVariablePanel(form),form.find("[name=\"target\"]").on("change",function(){_this2.loadVariablePanel(form);});},/**
* Register basic events
* @param {jQuery} container
*/registerBasicEvents:function registerBasicEvents(container){this._super(container),this.registerVariablePanelEvent(container),App.Tools.VariablesPanel.registerRefreshCompanyVariables(container),App.Tools.VariablesPanel.refreshCompanyVariables(container),new App.Fields.Text.Completions(container.find("[name=\"message\"]"),{completionsCollection:{emojis:!0},autolink:!1});}});
//# sourceMappingURL=Edit.min.js.map