YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/ImageHandler.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"ImageHandler.min.js","sources":["ImageHandler.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\n(function ($) {\n\tvar vtImageLoader = function (element, options) {\n\t\tvar thisInstance = this;\n\t\tthis.defaults = {\n\t\t\tposition: 'append',\n\t\t\tmode: 'show'\n\t\t};\n\n\t\tif (typeof options === 'undefined') {\n\t\t\toptions = {};\n\t\t}\n\n\t\tthis.options = $.extend(this.defaults, options);\n\t\tthis.container = element;\n\t\tthis.position = options.position;\n\n\t\tthis.show = function () {\n\t\t\tvar imagePath = 'themes/basic/images/loading.gif';\n\t\t\tvar imageHtml = '<span class=\"imageHolder\"><img class=\"loadinImg\" src=\"' + imagePath + '\" /></span>';\n\n\t\t\tswitch (thisInstance.position) {\n\t\t\t\tcase 'prepend':\n\t\t\t\t\tthisInstance.container.prepend(imageHtml);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'html':\n\t\t\t\t\tthisInstance.container.html(imageHtml);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'replace':\n\t\t\t\t\tthisInstance.container.replaceWith(imageHtml);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthisInstance.container.append(imageHtml);\n\t\t\t}\n\t\t};\n\n\t\tthis.hide = function () {\n\t\t\t$('.imageHolder', this.container).remove();\n\t\t};\n\n\t\tif (this.options.mode == 'show') {\n\t\t\tthis.show();\n\t\t} else if (this.options.mode == 'hide') {\n\t\t\tthis.hide();\n\t\t}\n\t};\n\n\t$.fn.vtLoadImage = function (options) {\n\t\treturn this.each(function (index, element) {\n\t\t\tvar jQueryObject = $(element);\n\t\t\tvar imageLoader = new vtImageLoader(jQueryObject, options);\n\t\t\tjQueryObject.data('imageLoader', imageLoader);\n\t\t});\n\t};\n})(jQuery);\n"],"names":["$","vtImageLoader","element","options","thisInstance","defaults","position","mode","extend","container","show","imageHtml","prepend","html","replaceWith","append","hide","remove","fn","vtLoadImage","each","index","jQueryObject","imageLoader","data","jQuery"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZ,CAAC,SAAUA,CAAC,CAAE,CACb,IAAIC,aAAa,CAAG,SAAUC,OAAO,CAAEC,OAAO,CAAE,CAC/C,IAAIC,YAAY,CAAG,IAAI,CACvB,IAAI,CAACC,QAAQ,CAAG,CACfC,QAAQ,CAAE,QAAQ,CAClBC,IAAI,CAAE,MACP,CAAC,CAEsB,WAAW,EAA9B,OAAOJ,OAAuB,GACjCA,OAAO,CAAG,EAAE,CAGb,CAAA,IAAI,CAACA,OAAO,CAAGH,CAAC,CAACQ,MAAM,CAAC,IAAI,CAACH,QAAQ,CAAEF,OAAO,CAAC,CAC/C,IAAI,CAACM,SAAS,CAAGP,OAAO,CACxB,IAAI,CAACI,QAAQ,CAAGH,OAAO,CAACG,QAAQ,CAEhC,IAAI,CAACI,IAAI,CAAG,UAAY,CAEnB,IAAAC,SAAS,CAAA,wGAAuF,CAEpG,OAAQP,YAAY,CAACE,QAAQ,EAC5B,IAAK,SAAS,CACbF,YAAY,CAACK,SAAS,CAACG,OAAO,CAACD,SAAS,CAAC,CACzC,MACD,IAAK,MAAM,CACVP,YAAY,CAACK,SAAS,CAACI,IAAI,CAACF,SAAS,CAAC,CACtC,MACD,IAAK,SAAS,CACbP,YAAY,CAACK,SAAS,CAACK,WAAW,CAACH,SAAS,CAAC,CAC7C,MACD,QACCP,YAAY,CAACK,SAAS,CAACM,MAAM,CAACJ,SAAS,EACzC,CACD,CAAC,CAED,IAAI,CAACK,IAAI,CAAG,UAA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