public_html/layouts/basic/modules/SSalesProcesses/resources/Detail.min.js.map
{"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'SSalesProcesses_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)\n\t\t\t\t\t.done(function (data) {\n\t\t\t\t\t\t//store it in the cache, so that we dont do multiple request\n\t\t\t\t\t\tthisInstance.hierarchyResponseCache = data;\n\t\t\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\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","fail","textStatus","errorThrown","reject","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,kKAC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