public_html/layouts/basic/modules/Vtiger/resources/Menu.min.js.map
{"version":3,"file":"Menu.min.js","sources":["Menu.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\njQuery.Class('Vtiger_Menu_Js', {\n\tregisterMenu: function () {\n\t\tvar largeNav = jQuery('#largeNavDiv nav').width();\n\t\tvar tabsWidth = 0;\n\n\t\tjQuery('#largeNavDiv ul.nav.modulesList')\n\t\t\t.children('li')\n\t\t\t.each(function () {\n\t\t\t\tvar eWidth = jQuery(this).width();\n\t\t\t\tvar moreMenuElement = jQuery('#commonMoreMenu li[data-id=\"' + jQuery(this).data('id') + '\"]');\n\t\t\t\ttabsWidth += eWidth;\n\t\t\t\tif (tabsWidth > largeNav) {\n\t\t\t\t\tjQuery(this).hide();\n\t\t\t\t\tmoreMenuElement.show();\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(this).show();\n\t\t\t\t\tmoreMenuElement.hide();\n\t\t\t\t}\n\t\t\t});\n\t\tif (tabsWidth < largeNav) jQuery('#commonMoreMenu').hide();\n\t},\n\n\t/**\n\t * Gets the number of entries according to the selected filter\n\t */\n\tregisterRecordsCount() {\n\t\t$('.js-menu__content .js-count').each(function (_index, element) {\n\t\t\tlet countEntries = $(element);\n\t\t\tif (countEntries.length > 0) {\n\t\t\t\tAppConnector.request(countEntries.parent().attr('href') + '&action=Pagination&mode=getTotalCount').done(\n\t\t\t\t\tfunction (data) {\n\t\t\t\t\t\tcountEntries.text(JSON.parse(data).result.totalCount);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n});\nvar menu = new Vtiger_Menu_Js();\njQuery(window).on('resize', () => {\n\tmenu.registerMenu();\n});\njQuery(function () {\n\tmenu.registerMenu();\n\tmenu.registerRecordsCount();\n});\n"],"names":["jQuery","Class","registerMenu","largeNav","width","tabsWidth","children","each","eWidth","moreMenuElement","data","hide","show","registerRecordsCount","$","_index","element","countEntries","length","AppConnector","request","parent","attr","done","text","JSON","parse","result","totalCount","menu","Vtiger_Menu_Js","window","on"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,MAAM,CAACC,KAAK,CAAC,gBAAgB,CAAE,CAC9BC,YAAY,CAAE,SAAAA,YAAA,EAAY,CACrB,IAAAC,QAAQ,CAAGH,MAAM,CAAC,kBAAkB,CAAC,CAACI,KAAK,EAAE,CAC7CC,SAAS,CAAG,CAAC,CAEjBL,MAAM,CAAC,iCAAiC,CAAC,CACvCM,QAAQ,CAAC,IAAI,CAAC,CACdC,IAAI,CAAC,UAAY,CAAA,IACbC,MAAM,CAAGR,MAAM,CAAC,IAAI,CAAC,CAACI,KAAK,EAAE,CAC7BK,eAAe,CAAGT,MAAM,CAAC,+BAA8B,CAAGA,MAAM,CAAC,IAAI,CAAC,CAACU,IAAI,CAAC,IAAI,CAAC,CAAG,KAAI,CAAC,CAC7FL,SAAS,EAAIG,MAAM,CACfH,SAAS,CAAGF,QAAQ,EACvBH,MAAM,CAAC,IAAI,CAAC,CAACW,IAAI,EAAE,CACnBF,eAAe,CAACG,IAAI,EAAE,GAEtBZ,MAAM,CAAC,IAAI,CAAC,CAACY,IAAI,EAAE,CACnBH,eAAe,CAACE,IAAI,EAAE,EAExB,CAAC,CAAC,CACCN,SAAS,CAAGF,QAAQ,EAAEH,MAAM,CAAC,iBAAiB,CAAC,CAACW,IAAI,GACzD,CAAC;AAGF;AACA,IACCE,oBAAoB,CAAAA,SAAAA,oBAAAA,EAAG,CACtBC,CAAC,CAAC,6BAA6B,CAAC,CAACP,IAAI,CAAC,SAAUQ,MAAM,CAAEC,OAAO,CAAE,CAChE,IAAIC,YAAY,CAAGH,CAAC,CAACE,OAAO,CAA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