sandbox/tmp/cache/assets/D10/260/sprockets%2F34be45a2946b38f2577ee0d334d5a63d in iugu-ux-0.9.5 vs sandbox/tmp/cache/assets/D10/260/sprockets%2F34be45a2946b38f2577ee0d334d5a63d in iugu-ux-0.9.8
- old
+ new
@@ -1,17 +1,18 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1358772537.955107 y:@value"e{I"
-class:EFI"ProcessedAsset; FI"logical_path; FI"#iugu-ux/editors/file_editor.js; FI"
pathname; FI"p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffee; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2013-01-17T19:14:46-02:00; FI"length; FiíI"digest; F"%8e0ebcf3fd0fd1402e432fde84807c3dI"source; FI"í(function() {
- var __hasProp = {}.hasOwnProperty,
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1372441622.656936:@value"q{I"
+class:EFI"ProcessedAsset; FI"logical_path; F"#iugu-ux/editors/file_editor.jsI"
pathname; F"p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffeeI"content_type; FI"application/javascript; FI"
+mtime; FI"2013-01-17T19:14:46-02:00; FI"length; Fi
I"digest; F"%bf8ae73714a2efd07939f3eed96ec038I"source; FI"
(function() {
+ var _ref,
+ __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Backbone.Form.editors.File = (function(_super) {
-
__extends(File, _super);
function File() {
- return File.__super__.constructor.apply(this, arguments);
+ _ref = File.__super__.constructor.apply(this, arguments);
+ return _ref;
}
File.prototype.tagName = 'div';
File.prototype.events = {
@@ -27,10 +28,11 @@
'click [data-action=remove-document]': 'removeDocument'
};
File.prototype.removeDocument = function(evt) {
var docid;
+
evt.preventDefault();
docid = this.$('.uploaded-file').data("id");
return (new DocumentDestroyRequester(this, docid)).execute();
};
@@ -46,10 +48,11 @@
return context.$('.progress .bar').text(value + '%');
};
File.prototype.initialize = function(options) {
var input, prbar, that, upfil;
+
Backbone.Form.editors.Base.prototype.initialize.call(this, options);
input = this.$el.append("<input class='file-upload' type='file'/>");
prbar = this.$el.append("<div class='progress'><div class='bar' style='width: 0%;'></div></div>");
upfil = this.$el.append("<div class='uploaded-file' data-id=''><div class='uploaded-file-name'></div><a data-action='remove-document' href='#'>Remover</a></div>");
this.$('.progress').hide();
@@ -64,10 +67,11 @@
title: that.schema.title,
api_token: window.api_token
},
progressall: function(evt, data) {
var progress;
+
progress = parseInt(data.loaded / data.total * 100, 10);
return that.setProgressBar(that, progress);
},
send: function(evt, data) {
that.$('.file-upload').hide();
@@ -93,10 +97,11 @@
return this.$('.uploaded-file').data('id');
};
File.prototype.setValue = function(value) {
var sp;
+
if (!value) {
return;
}
sp = value.split(":");
this.$('.uploaded-file').data('id', sp[0]);
@@ -124,7 +129,7 @@
return File;
})(Backbone.Form.editors.Base);
}).call(this);
-; TI"dependency_digest; F"%824be627a908d98ca39a9f7bef3cb7d0I"required_paths; F[I"p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffee; FI"dependency_paths; F[{I" path; FI"p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffee; FI"
-mtime; FI"2013-01-17T19:14:46-02:00; FI"digest; F"%6717909d957824bf97758974b16b1d2bI"
_version; F"%9f3b95dd7ea3030dc35985c0a8020862
+; TI"dependency_digest; F"%74fae30c75805db4f90274ad21e4fe00I"required_paths; F["p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffeeI"dependency_paths; F[{I" path; F"p/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/editors/file_editor.js.coffeeI"
+mtime; FI"2013-01-17T19:14:46-02:00; FI"digest; F"%ffc8e0ff983512afc2f411f709f510c1I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file