raw/ace/assets/js/uncompressed/x-editable/ace-editable.js
function() {
			var self = this;
			this.$input = this.$tpl.find('input[type=hidden]:eq(0)');
			this.$file = this.$tpl.find('input[type=file]:eq(0)');

			this.$file.attr({'name':this.name});
			this.$input.attr({'name':this.name+'-hidden'});

			
			this.options.image.before_change = this.options.image.before_change || function(files, dropped) {
				var file = files[0];
				if(typeof file === "string") {
					//files is just a file name here (in browsers that don't support FileReader API)
					if(! (/\.(jpe?g|png|gif)$/i).test(file) ) {
						if(self.on_error) self.on_error(1);
						return false;
					}
				}
				else {//file is a File object
					var type = $.trim(file.type);
					if( ( type.length > 0 && ! (/^image\/(jpe?g|png|gif)$/i).test(type) )
							|| ( type.length == 0 && ! (/\.(jpe?g|png|gif)$/i).test(file.name) )//for android default browser!
						)
					{
						if(self.on_error) self.on_error(1);
						return false;
					}
					if( self.max_size && file.size > self.max_size ) {
						if(self.on_error) self.on_error(2);
						return false;
					}
				}

				if(self.on_success) self.on_success();
				return true;
			}
			this.options.image.before_remove = this.options.image.before_remove || function() {
				self.$input.val(null);
				return true;
			}

			this.$file.ace_file_input(this.options.image).on('change', function(){
				var $rand = (self.$file.val() || self.$file.data('ace_input_files')) ? Math.random() + "" + (new Date()).getTime() : null;
				self.$input.val($rand)//set a random value, so that selected file is uploaded each time, even if it's the same file, because inline editable plugin does not update if the value is not changed!
			}).closest('.ace-file-input').css({'width':'150px'}).closest('.editable-input').addClass('editable-image');
		}
function() {
			var self = this;
			this.$input = this.$tpl.find('input[type=hidden]:eq(0)');
			this.$file = this.$tpl.find('input[type=file]:eq(0)');

			this.$file.attr({'name':this.name});
			this.$input.attr({'name':this.name+'-hidden'});

			
			this.options.image.before_change = this.options.image.before_change || function(files, dropped) {
				var file = files[0];
				if(typeof file === "string") {
					//files is just a file name here (in browsers that don't support FileReader API)
					if(! (/\.(jpe?g|png|gif)$/i).test(file) ) {
						if(self.on_error) self.on_error(1);
						return false;
					}
				}
				else {//file is a File object
					var type = $.trim(file.type);
					if( ( type.length > 0 && ! (/^image\/(jpe?g|png|gif)$/i).test(type) )
							|| ( type.length == 0 && ! (/\.(jpe?g|png|gif)$/i).test(file.name) )//for android default browser!
						)
					{
						if(self.on_error) self.on_error(1);
						return false;
					}
					if( self.max_size && file.size > self.max_size ) {
						if(self.on_error) self.on_error(2);
						return false;
					}
				}

				if(self.on_success) self.on_success();
				return true;
			}
			this.options.image.before_remove = this.options.image.before_remove || function() {
				self.$input.val(null);
				return true;
			}

			this.$file.ace_file_input(this.options.image).on('change', function(){
				var $rand = (self.$file.val() || self.$file.data('ace_input_files')) ? Math.random() + "" + (new Date()).getTime() : null;
				self.$input.val($rand)//set a random value, so that selected file is uploaded each time, even if it's the same file, because inline editable plugin does not update if the value is not changed!
			}).closest('.ace-file-input').css({'width':'150px'}).closest('.editable-input').addClass('editable-image');
		}
function ( ) { var self = this ; this . $input = this . $tpl . find ( 'input[type=hidden]:eq(0)' ) ; this . $file = this . $tpl . find ( 'input[type=file]:eq(0)' ) ; this . $file . attr ( { 'name' : this . name } ) ; this . $input . attr ( { 'name' : this . name + '-hidden' } ) ; this . options . image . before_change = this . options . image . before_change || function ( files , dropped ) { var file = files [ 0 ] ; if ( typeof file === "string" ) { //files is just a file name here (in browsers that don't support FileReader API) if ( ! ( / \.(jpe?g|png|gif)$ / i ) . test ( file ) ) { if ( self . on_error ) self . on_error ( 1 ) ; return false ; } } else { //file is a File object var type = $ . trim ( file . type ) ; if ( ( type . length > 0 && ! ( / ^image\/(jpe?g|png|gif)$ / i ) . test ( type ) ) || ( type . length == 0 && ! ( / \.(jpe?g|png|gif)$ / i ) . test ( file . name ) ) //for android default browser! ) { if ( self . on_error ) self . on_error ( 1 ) ; return false ; } if ( self . max_size && file . size > self . max_size ) { if ( self . on_error ) self . on_error ( 2 ) ; return false ; } } if ( self . on_success ) self . on_success ( ) ; return true ; } this . options . image . before_remove = this . options . image . before_remove || function ( ) { self . $input . val ( null ) ; return true ; } this . $file . ace_file_input ( this . options . image ) . on ( 'change' , function ( ) { var $rand = ( self . $file . val ( ) || self . $file . data ( 'ace_input_files' ) ) ? Math . random ( ) + "" + ( new Date ( ) ) . getTime ( ) : null ; self . $input . val ( $rand ) //set a random value, so that selected file is uploaded each time, even if it's the same file, because inline editable plugin does not update if the value is not changed! } ) . closest ( '.ace-file-input' ) . css ( { 'width' : '150px' } ) . closest ( '.editable-input' ) . addClass ( 'editable-image' ) ; }
Renders input from tpl

@method render()
Renders input from tpl