YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/resources/helper.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"helper.min.js","sources":["helper.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 * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\n$.Class(\n\t'Vtiger_Helper_Js',\n\t{\n\t\tcheckServerConfigResponseCache: '',\n\t\tlangCode: '',\n\t\t/*\n\t\t * Function to set lang code\n\t\t */\n\t\tsetLangCode: function () {\n\t\t\tvar htmlTag = document.getElementsByTagName('html')[0];\n\t\t\tthis.langCode = htmlTag.getAttribute('lang') ? htmlTag.getAttribute('lang') : 'en';\n\t\t},\n\t\t/*\n\t\t * Function to get lang code\n\t\t */\n\t\tgetLangCode: function () {\n\t\t\tif (!this.langCode) {\n\t\t\t\tthis.setLangCode();\n\t\t\t}\n\t\t\treturn this.langCode;\n\t\t},\n\t\t/*\n\t\t * Function to get the instance of Mass edit of Email\n\t\t */\n\t\tgetEmailMassEditInstance: function () {\n\t\t\tvar className = 'Emails_MassEdit_Js';\n\t\t\tvar emailMassEditInstance = new window[className]();\n\t\t\treturn emailMassEditInstance;\n\t\t},\n\t\tshowMessage: function (params) {\n\t\t\tif (typeof params.type === 'undefined') {\n\t\t\t\tparams.type = 'info';\n\t\t\t}\n\t\t\tif (typeof params.title === 'undefined') {\n\t\t\t\tparams.title = app.vtranslate('JS_MESSAGE');\n\t\t\t}\n\t\t\tapp.showNotify(params);\n\t\t},\n\n\t\t/*\n\t\t * Function to add clickoutside event on the element - By using outside events plugin\n\t\t * @params element---On which element you want to apply the click outside event\n\t\t * @params callbackFunction---This function will contain the actions triggered after clickoutside event\n\t\t */\n\t\taddClickOutSideEvent: function (element, callbackFunction) {\n\t\t\telement.one('clickoutside', callbackFunction);\n\t\t},\n\t\t/*\n\t\t * Function to show horizontal top scroll bar\n\t\t */\n\t\tshowHorizontalTopScrollBar: function () {\n\t\t\tvar container = $('.contentsDiv');\n\t\t\tvar topScroll = $('.contents-topscroll', container);\n\t\t\tvar bottomScroll = $('.contents-bottomscroll', container);\n\t\t\t$('.bottomscroll-div', container).attr('style', '');\n\t\t\t$('.topscroll-div', container).css('width', $('.bottomscroll-div', container).outerWidth());\n\t\t\t$('.bottomscroll-div', container).css('width', $('.topscroll-div', container).outerWidth());\n\t\t\ttopScroll.on('scroll', function () {\n\t\t\t\tbottomScroll.scrollLeft(topScroll.scrollLeft());\n\t\t\t});\n\t\t\tbottomScroll.on('scroll', function () {\n\t\t\t\ttopScroll.scrollLeft(bottomScroll.scrollLeft());\n\t\t\t});\n\t\t},\n\n\t\thideOptions: function (element, attr, value) {\n\t\t\tvar opval = '';\n\t\t\telement.find('option').each(function (index, option) {\n\t\t\t\toption = $(option);\n\t\t\t\tif (value != option.data(attr)) {\n\t\t\t\t\toption.addClass('d-none');\n\t\t\t\t\toption.attr('disabled', 'disabled');\n\t\t\t\t} else {\n\t\t\t\t\tif (opval == '') {\n\t\t\t\t\t\topval = option.val();\n\t\t\t\t\t}\n\t\t\t\t\toption.removeClass('d-none');\n\t\t\t\t\toption.removeAttr('disabled');\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.val(opval).trigger('change');\n\t\t},\n\t\tunique: function (array) {\n\t\t\treturn array.filter(function (el, index, arr) {\n\t\t\t\treturn index === arr.indexOf(el);\n\t\t\t});\n\t\t}\n\t},\n\t{}\n);\n"],"names":["$","Class","checkServerConfigResponseCache","langCode","setLangCode","htmlTag","document","getElementsByTagName","getAttribute","getLangCode","getEmailMassEditInstance","emailMassEditInstance","window","Emails_MassEdit_Js","showMessage","params","type","title","app","vtranslate","showNotify","addClickOutSideEvent","element","callbackFunction","one","showHorizontalTopScrollBar","container","topScroll","bottomScroll","attr","css","outerWidth","on","scrollLeft","hideOptions","value","opval","find","each","index","option","data","val","removeClass","removeAttr","addClass","trigger","unique","array","filter","el","arr","indexOf"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,CAAC,CAACC,KAAK,CACN,kBAAkB,CAClB,CACCC,8BAA8B,CAAE,EAAE,CAClCC,QAAQ,CAAE,EAAE;AAEd;AACA,KACEC,WAAW,CAAE,SAAAA,aAAY,CACxB,IAAIC,OAAO,CAAGC,QAAQ,CAACC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CACtD,IAAI,CAACJ,QAAQ,CAAGE,OAAO,CAACG,YAAY,CAAC,MAAM,CAAC,CAAGH,OAAO,CAACG,YAAY,CAAC,MAAM,CAAC,CAAG,KAC/E,CAAC;AAEH;AACA,KACEC,WAAW,CAAE,SAAAA,WAAAA,EAAY,CAIxB,WAHS,CAACN,QAAQ,EACjB,IAAI,CAACC,WAAW,EAAE,CAEZ,IAAI,CAACD,QACb,CAAC;AAEH;AACA,KACEO,wBAAwB,CAAE,SAAAA,wBAAAA,EAAY,CAAA,IAEjCC,qBAAqB,CAAG,IAAIC,MAAM,CAAAC,kBAAa,CACnD,OAAOF,qBACR,CAAC,CACDG,WAAW,CAAE,SAAAA,WAAAA,CAAUC,MAAM,CAAE,CACH,WAAW,EAAlC,OAAOA,MAAM,CAACC,IAAoB,GACrCD,MAAM,CAACC,IAAI,CAAG,MAAM,CAEO,CAAA,WAAW,EAAnC,OAAOD,MAAM,CAACE,KAAqB,GACtCF,MAAM,CAACE,KAAK,CAAGC,GAAG,CAACC,UAAU,CAAC,YAAY,CAAC,CAAA,CAE5CD,GAAG,CAACE,UAAU,CAACL,MAAM,EACtB,CAAC;AAGH;AACA;AACA;AACA,KACEM,oBAAoB,CAAE,SAAAA,qBAAUC,OAAO,CAAEC,gBAAgB,CAAE,CAC1DD,OAAO,CAACE,GAAG,CAAC,cAAc,CAAED,gBAAg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