o: ActiveSupport::Cache::Entry :@created_atf1319053838.6084161ðJ:@expires_in0: @value{"asset_paths["g/Users/bastiaan/Files/Work/Perceptor website/_sandbox/rich/app/assets/javascripts/rich/uploader.js" body"// Implementation of the QQ FileUploader class for use in Rich var rich = rich || {}; rich.Uploader = function(){ this._options = { uploadButtonId: 'upload', insertionPoint: 'uploadBlock' }; // create the qq uploader var self = this; var uploader = new qq.FileUploaderBasic({ button: document.getElementById(self._options.uploadButtonId), multiple: true, maxConnections: 3, action: $("#new_rich_rich_image").attr("action"), params: { authenticity_token: $("input[name='authenticity_token']").attr("value") }, debug: true, onComplete: function(id, fileName, responseJSON) { self.uploadComplete(id, fileName, responseJSON); }, onSubmit: function(id, fileName) { self.uploadSubmit(id, fileName); }, onProgress: function(id, fileName, loaded, total) { self.uploadProgress(id, fileName, Math.round(loaded/total*100)); } }); }; rich.Uploader.prototype = { uploadComplete: function(id, fileName, response){ if (response.success){ $('#up'+id+' .progress-bar').first().width("100%"); $('#up'+id+' .spinner').first().addClass("spinning"); //get the created image object's id from the response and use it to request the thumbnail $.get("/rich/files/"+response.rich_id, function(data) { $('#up'+id).replaceWith(data).addClass("test"); $('#image'+response.rich_id).addClass("new"); }); } else { $('#up'+id+' .spinner').first().addClass("error"); $('#up'+id+' .spinner').first().removeClass("spinning"); } }, uploadSubmit: function(id, fileName) { console.log($('#'+this._options.insertionPoint)); // insert a new image placeholder after the upload button $('#'+this._options.insertionPoint).after('
  • '+fileName+'

  • '); }, uploadProgress: function(id, fileName, progress) { $('#up'+id+' .progress-bar').first().width(progress+"%"); if(progress > 90) { // start spinning $('#up'+id+' .spinner').first().addClass("spinning"); } }, }; "content_type"application/javascript" class"BundledAsset" mtime"2011-10-15T21:28:10+02:00" _version"%46dde6621c301f4928e3b34efee9e3b5"id"%f0c98b89462971a3bc8e8b08a8a98245"dependency_paths[{"hexdigest"%1c5123015ba793b65735bf80e6189ef9" mtimeu: Time ó倠p" path"g/Users/bastiaan/Files/Work/Perceptor website/_sandbox/rich/app/assets/javascripts/rich/uploader.js" pathname"g/Users/bastiaan/Files/Work/Perceptor website/_sandbox/rich/app/assets/javascripts/rich/uploader.js"logical_path"rich/uploader.js:@compressedF