public_html/layouts/basic/modules/Campaigns/resources/Detail.min.js
'use strict';
/*+***********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
* Contributor(s): YetiForce S.A.
*************************************************************************************/"use strict";Vtiger_Detail_Js("Campaigns_Detail_Js",{},{/**
* Function to register email enabled actions
*/registerEmailEnabledActions:function registerEmailEnabledActions(){var moduleName=app.getModuleName(),listInstance=new window[moduleName+"_List_Js"];listInstance.registerEvents(),listInstance.markSelectedRecords();},registerEventForRelatedTabClick:function registerEventForRelatedTabClick(){var thisInstance=this,detailContentsHolder=thisInstance.getContentHolder(),detailContainer=detailContentsHolder.closest("div.detailViewInfo");jQuery(".related",detailContainer).on("click","li:not(.spaceRelatedList)",function(e,urlAttributes){var tabElement=jQuery(e.currentTarget);if(!tabElement.hasClass("dropdown")){var element=jQuery("<div></div>");element.progressIndicator({position:"html",blockInfo:{enabled:!0,elementToBlock:detailContainer}});var url=tabElement.data("url");if("undefined"!=typeof urlAttributes){var callBack=urlAttributes.callback;delete urlAttributes.callback;}thisInstance.loadContents(url,urlAttributes).done(function(data){thisInstance.deSelectAllrelatedTabs(),thisInstance.markTabAsSelected(tabElement),Vtiger_Helper_Js.showHorizontalTopScrollBar(),app.registerModal(detailContentsHolder),element.progressIndicator({mode:"hide"});var emailEnabledModule=jQuery(data).find("[name=\"emailEnabledModules\"]").val();if(emailEnabledModule){var listInstance=new Campaigns_List_Js;listInstance.registerEvents();}"function"==typeof callBack&&callBack(data),tabElement.data("linkKey")==thisInstance.detailViewSummaryTabLabel&&thisInstance.loadWidgets(),thisInstance.registerBasicEvents();}).fail(function(){element.progressIndicator({mode:"hide"});});}});},registerEvents:function registerEvents(){this._super();//Calling registerevents of campaigns list to handle checkboxs click of related records
var listInstance=Vtiger_List_Js.getInstance();listInstance.registerEvents();var thisInstance=this;app.event.on("RelatedList.AfterLoad",function(event,instance){var response=instance.content;response.find("[name=\"selectedIds\"]").data("selectedIds",""),response.find("[name=\"excludedIds\"]").data("excludedIds","");var emailEnabledModule=response.find("[name=\"emailEnabledModules\"]").val();emailEnabledModule&&thisInstance.registerEmailEnabledActions();});}});
//# sourceMappingURL=Detail.min.js.map