YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/MultiCompany/resources/Detail.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Detail.min.js","sources":["Detail.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_Detail_Js(\n\t'MultiCompany_Detail_Js',\n\t{},\n\t{\n\t\t//It stores the IStorages Hierarchy response data\n\t\thierarchyResponseCache: {},\n\t\t/*\n\t\t * function to get the IStoragesHierarchy response data\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tvar thisInstance = this;\n\t\t\tvar aDeferred = jQuery.Deferred();\n\n\t\t\t//Check in the cache\n\t\t\tif (!jQuery.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).done(function (data) {\n\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/*\n\t\t * function to display the IStorages Hierarchy response data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function (data) {\n\t\t\t\tapp.showScrollBar($('#hierarchyScroll'), {\n\t\t\t\t\theight: '300px',\n\t\t\t\t\trailVisible: true,\n\t\t\t\t\tsize: '6px'\n\t\t\t\t});\n\t\t\t};\n\t\t\tapp.showModalWindow(data, function (modalContainer) {\n\t\t\t\tApp.Components.Scrollbar.xy($('#hierarchyScroll', modalContainer));\n\t\t\t\tif (typeof callbackFunction == 'function' && $('#hierarchyScroll', modalContainer).height() > 300) {\n\t\t\t\t\tcallbackFunction(data);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tvar hierarchyButton = $('.detailViewTitle .hierarchy');\n\t\t\tif (hierarchyButton.length) {\n\t\t\t\tvar params = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\taction: 'RelationAjax',\n\t\t\t\t\trecord: app.getRecordId(),\n\t\t\t\t\tmode: 'getHierarchyCount'\n\t\t\t\t};\n\t\t\t\tAppConnector.request(params).done(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.detailViewTitle .hierarchy .badge').html(response.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterShowHierarchy: function () {\n\t\t\tvar thisInstance = this;\n\t\t\tvar hierarchyButton = $('.detailViewTitle');\n\t\t\tvar params = {\n\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\tview: 'Hierarchy',\n\t\t\t\trecord: app.getRecordId()\n\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail__icon', function (e) {\n\t\t\t\tthisInstance.getHierarchyResponseData(params).done(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tthis._super();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","hierarchyResponseCache","getHierarchyResponseData","params","thisInstance","aDeferred","jQuery","Deferred","isEmptyObject","AppConnector","request","done","data","resolve","promise","displayHierarchyResponseData","callbackFunction","app","showScrollBar","$","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","length","module","getModuleName","action","record","getRecordId","mode","response","success","html","result","registerShowHierarchy","view","on","registerEvents","_super"],"mappings":";;AAAA,kKACA,YAAY,CAEZA,gBAAgB,CACf,wBAAwB,CACxB,EAAE,CACF;AAECC,sBAAsB,CAAE,EAAE;AAE5B;AACA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