YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
A
0 mins
Test Coverage
'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";jQuery.Class("Vtiger_RelatedCommentModal_Js",{windowParent:app.getWindowParent(),/*
     * Function to register the click event for generate button
     */registerSubmitEvent:function registerSubmitEvent(container){var self=this;container.find("[name=\"saveButton\"]").on("click",function(){var progressLoader=$.progressIndicator({position:"html",blockInfo:{enabled:!0}}),comment=container.find(".comment").val(),params={module:self.windowParent.app.getModuleName(),record:self.windowParent.app.getRecordId(),action:"RelatedCommentModal",mode:"update",comment:comment,relid:container.find(".relatedRecord").val(),relmodule:container.find(".relatedModuleName").val()};AppConnector.request(params).done(function(data){Vtiger_Helper_Js.showMessage({text:data.result}),app.hideModalWindow(),progressLoader.progressIndicator({mode:"hide"}),self.windowParent.Vtiger_Detail_Js.getInstance().reloadTabContent();}).fail(function(){progressLoader.progressIndicator({mode:"hide"});});});},registerEvents:function registerEvents(){var container=$("#modalRelatedCommentModal");new App.Fields.Text.Completions(container.find(".js-completions")),this.registerSubmitEvent(container);}}),$(function(){var instance=new Vtiger_RelatedCommentModal_Js;instance.registerEvents();});
//# sourceMappingURL=RelatedCommentModal.min.js.map