YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
Test Coverage
{"version":3,"file":"Detail.min.js","sources":["Detail.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is:  vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n *************************************************************************************/\n'use strict';\n\nVtiger_Detail_Js(\n\t'Project_Detail_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to register event for create related record\n\t\t * in summary view widgets\n\t\t */\n\t\tregisterSummaryViewContainerEvents: function (summaryViewContainer) {\n\t\t\tthis._super(summaryViewContainer);\n\t\t},\n\t\t/**\n\t\t * Function to load module summary of Projects\n\t\t */\n\t\tloadModuleSummary: function () {\n\t\t\tvar summaryParams = {};\n\t\t\tsummaryParams['module'] = app.getModuleName();\n\t\t\tsummaryParams['view'] = 'Detail';\n\t\t\tsummaryParams['mode'] = 'showModuleSummaryView';\n\t\t\tsummaryParams['record'] = jQuery('#recordId').val();\n\t\t\tAppConnector.request(summaryParams).done(function (data) {\n\t\t\t\tjQuery('.js-widget-general-info').html(data);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Load gantt component\n\t\t */\n\t\tloadGantt() {\n\t\t\tlet ganttContainer = $('.c-gantt', this.detailViewContentHolder);\n\t\t\tif (ganttContainer.length) {\n\t\t\t\tlet gantt = new Project_Gantt_Js(this.detailViewContentHolder);\n\t\t\t\tgantt.registerEvents();\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Load gantt component when needed\n\t\t */\n\t\tregisterGantt() {\n\t\t\tthis.loadGantt();\n\t\t\tapp.event.on('DetailView.Tab.AfterLoad', (e, data, instance) => {\n\t\t\t\tinstance.detailViewContentHolder.ready(() => {\n\t\t\t\t\tthis.loadGantt();\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to get response from hierarchy\n\t\t * @param {array} params\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetHierarchyResponseData: function (params) {\n\t\t\tlet thisInstance = this,\n\t\t\t\taDeferred = $.Deferred();\n\t\t\tif (!$.isEmptyObject(thisInstance.hierarchyResponseCache)) {\n\t\t\t\taDeferred.resolve(thisInstance.hierarchyResponseCache);\n\t\t\t} else {\n\t\t\t\tAppConnector.request(params).then(function (data) {\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 hierarchy response data\n\t\t * @param {array} data\n\t\t */\n\t\tdisplayHierarchyResponseData: function (data) {\n\t\t\tlet callbackFunction = function () {\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();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Registers read count of hierarchy if it is possible\n\t\t */\n\t\tregisterHierarchyRecordCount: function () {\n\t\t\tlet hierarchyButton = $('.js-detail-hierarchy'),\n\t\t\t\tparams = {\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\tif (hierarchyButton.length) {\n\t\t\t\tAppConnector.request(params).then(function (response) {\n\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t$('.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\t/**\n\t\t * Shows hierarchy\n\t\t */\n\t\tregisterShowHierarchy: function () {\n\t\t\tlet thisInstance = this,\n\t\t\t\thierarchyButton = $('.detailViewTitle'),\n\t\t\t\tparams = {\n\t\t\t\t\tmodule: app.getModuleName(),\n\t\t\t\t\tview: 'Hierarchy',\n\t\t\t\t\trecord: app.getRecordId()\n\t\t\t\t};\n\t\t\thierarchyButton.on('click', '.js-detail-hierarchy', function () {\n\t\t\t\tlet progressIndicatorElement = $.progressIndicator({\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthisInstance.getHierarchyResponseData(params).then(function (data) {\n\t\t\t\t\tthisInstance.displayHierarchyResponseData(data);\n\t\t\t\t\tprogressIndicatorElement.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register events\n\t\t */\n\t\tregisterEvents: function () {\n\t\t\tvar detailContentsHolder = this.getContentHolder();\n\t\t\tvar thisInstance = this;\n\t\t\tthis._super();\n\t\t\tdetailContentsHolder.on('click', '.moreRecentTickets', function () {\n\t\t\t\tvar recentTicketsTab = thisInstance.getTabByLabel(thisInstance.detailViewRecentTicketsTabLabel);\n\t\t\t\trecentTicketsTab.trigger('click');\n\t\t\t});\n\t\t\tthis.registerGantt();\n\t\t\tthis.registerHierarchyRecordCount();\n\t\t\tthis.registerShowHierarchy();\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Detail_Js","registerSummaryViewContainerEvents","summaryViewContainer","_super","loadModuleSummary","summaryParams","module","app","getModuleName","view","mode","record","jQuery","val","AppConnector","request","done","data","html","loadGantt","ganttContainer","$","detailViewContentHolder","length","gantt","Project_Gantt_Js","registerEvents","registerGantt","_this","event","on","e","instance","ready","getHierarchyResponseData","params","thisInstance","aDeferred","Deferred","isEmptyObject","hierarchyResponseCache","then","resolve","promise","displayHierarchyResponseData","callbackFunction","showScrollBar","height","railVisible","size","showModalWindow","modalContainer","App","Components","Scrollbar","xy","registerHierarchyRecordCount","hierarchyButton","action","getRecordId","response","success","result","registerShowHierarchy","progressIndicatorElement","progressIndicator","position","blockInfo","enabled","detailContentsHolder","getContentHolder","recentTicketsTab","getTabByLabel","detailViewRecentTicketsTabLabel","trigger"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,gBAAgB,CACf,mBAAmB,CACnB,EAAE,CACF;AAED;AACA;AACA,KACEC,kCAAkC,CAAE,SAAAA,kCAAAA,CAAUC,oBAAoB,CAAE,CACnE,IAAI,CAACC,MAAM,CAACD,oBAAoB,EACjC,CAAC;AAEH;AACA,KACEE,iBAAiB,CAAE,SAAAA,iBAAAA,EAAY,CAC9B,IAAIC,aAAa,CAAG,EAAE,CACtBA,aAAa,CAAAC,MAAU,CAAGC,GAAG,CAACC,aAAa,EAAE,CAC7CH,aAAa,CAAAI,IAAQ,CAAG,QAAQ,CAChCJ,aAAa,CAAAK,IAAQ,CAAG,uBAAuB,CAC/CL,aAAa,CAAAM,MAAU,CAAGC,MAAM,CAAC,WAAW,CAAC,CAACC,GAAG,EAAE,CACnDC,YAAY,CAACC,OAAO,CAACV,aAAa,CAAC,CAACW,IAAI,CAAC,SAAUC,IAAI,CAAE,CACxDL,MAAM,CAAC,yBAAyB,CAAC,CAACM,IAAI,CAACD,IAAI,EAC5C,CAAC,EACF,CAAC;AAEH;AACA,KACEE,SAAS,UAAAA,SAAA,EAAG,CACX,IAAIC,cAAc,CAAGC,CAAC,CAAC,UAAU,CAAE,IAAI,CAACC,uBAAuB,CAAC,CAChE,GAAIF,cAAc,CAACG,MAAM,CAAE,CAC1B,IAAIC,KAAK,CAAG,IAAIC,gBAAgB,CAAC,IAAI,CAACH,uBAAuB,CAAC,CAC9DE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