Sha256: 2190453baa30773dfbe86fa53f6aef174875d7d0d2a7496614d8a3c933a5f1ad

Contents?: true

Size: 932 Bytes

Versions: 11

Compression:

Stored size: 932 Bytes

Contents

#= require ./applicious_class.js.coffee
root = exports ? window

class AppliciousUploader extends AppliciousCore
	@UploadObj: ''
	@FileToken: ''


	constructor: ->
		@log 'Applicious [AP::Uploader] Loaded'


	init: (@UploadObj, @FileToken) ->
		@UploadObj.init()
		
		@UploadObj.bind 'FilesAdded', (up, files) =>			
			@log 'FilesAdded:', up, files
			root.appliciousUploaderFileAdded up, files

		@UploadObj.bind 'UploadProgress', (up, file) =>
			#@log 'UploadProgress:', up, file
			root.appliciousUploaderUploadProgress up, file

		@UploadObj.bind 'FileUploaded', (up, file) =>
			token = up.settings.multipart_params.key
			@log 'FileUploaded:', up, file, token
			root.appliciousUploaderFileUploaded up, file, token

		@UploadObj.bind 'Error', (up, error) =>
			@log 'Error:', up, error
			root.appliciousUploaderError up, error

		@log 'Initialised [AP::Uploader]', @UploadObj

# - - - #

AP.Uploader = new AppliciousUploader

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
applicious_utils-0.1.95 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.94 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.93 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.92 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.91 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.90 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.89 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.88 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.86 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.85 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee
applicious_utils-0.1.84 app/assets/javascripts/applicious_utils/Applicious/uploader_class.js.coffee