1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["filebrowser-TImageBrowser"],{8326:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageBrowser = function( options ) {\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar id = 'file_browser';\n\t\tvar name = 'filedata';\n\t\tvar browser;\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\t\tvar enabled = true;\n\n\t\tthis.setEnabled = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.find( '.browser-form input' );\n\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.attr( 'disabled', true );\n\t\t\t\tbtn.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tbtn.removeAttr( 'disabled' );\n\t\t\t\tbtn.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getFileName = function() {\n\n\t\t\treturn browser.val();\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\tvar form_data;\n\t\t\tif ( browser && browser.val() ) {\n\n\t\t\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\t\t\tform_data = $this.find( '.browser-form' );\n\t\t\t\t} else {\n\t\t\t\t\tform_data = new FormData( $( $this.find( '.browser-form' ) )[0] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tform_data = null;\n\t\t\t}\n\n\t\t\treturn form_data;\n\t\t};\n\n\t\tthis.getImageSrc = function() {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\treturn image.attr( 'src' );\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tvar onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\t// var $this = this;\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tbrowser = $( this ).find( '.browser' );\n\t\t\tvar image = $( this ).find( '.image' );\n\t\t\timage.hide();\n\t\t\timage.on( 'load', function() {\n\t\t\t\tonImageLoad( this );\n\n\t\t\t} );\n\n\t\t\tif ( accept_filter ) {\n\t\t\t\tbrowser.attr( 'accept', accept_filter );\n\t\t\t} else {\n\t\t\t\taccept_filter = 'image/*';\n\t\t\t\tbrowser.attr( 'accept', 'image/*' );\n\t\t\t}\n\n\t\t\tbrowser.attr( 'id', id );\n\t\t\tbrowser.attr( 'name', name );\n\n\t\t\tif ( Global.isSet( o.changeHandler ) ) {\n\n\t\t\t\t$this.bind( 'imageChange', o.changeHandler );\n\t\t\t}\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\tthis.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tbrowser.bind( 'change', function() {\n\t\t\t\timage.hide();\n\n\t\t\t\tif ( typeof FileReader != 'undefined' ) {\n\n\t\t\t\t\tvar files = !!this.files ? this.files : [];\n\n\t\t\t\t\t// If no files were selected, or no FileReader support, return\n\t\t\t\t\tif ( !files.length || !window.FileReader ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( accept_filter === 'image/*' ) {\n\t\t\t\t\t\t// Create a new instance of the FileReader\n\t\t\t\t\t\tvar reader = new FileReader();\n\n\t\t\t\t\t\t// Read the local file as a DataURL\n\t\t\t\t\t\treader.readAsDataURL( files[0] );\n\n\t\t\t\t\t\t// When loaded, set image data as background of div\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = this.result;\n\t\t\t\t\t\t\timage.attr( 'src', url );\n\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$this.trigger( 'imageChange', [$this] );\n\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageBrowser.defaults = {};\n\t$.fn.TImageBrowser.html_template = `\n\t<div class=\"file-browser\">\n\t\t<img class=\"image\">\n\t\t<form enctype=\"multipart/form-data\" class=\"browser-form\">\n\t\t\t<input name=\"filedata\" class=\"browser\" type=\"file\"/>\n\t\t</form>\n\t</div>\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMyNi5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7QUFDQTtBQUNBLHlCQUF5Qjs7QUFFekI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7O0FBRUEsS0FBSzs7QUFFTDtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBOzt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