applicious_utils 0.1.36 → 0.1.37

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -1,3 +1,3 @@
1
1
  module AppliciousUtils
2
- VERSION = "0.1.36"
2
+ VERSION = "0.1.37"
3
3
  end
@@ -21,7 +21,6 @@ module AppliciousUtils
21
21
  # max_filesize 2.megabytes
22
22
 
23
23
  def s3_uploader(options = {})
24
- #config = YAML.load(options[:s3_keys])[Rails.env].symbolize_keys
25
24
  options[:s3_config_filename] ||= Rails.root.join('config', 'amazon_s3.yml')
26
25
  config = YAML.load_file(options[:s3_config_filename])[Rails.env].symbolize_keys
27
26
  bucket = config[:bucket_name]
@@ -67,28 +66,14 @@ module AppliciousUtils
67
66
  // image uploader via plupload
68
67
  var uploader = new plupload.Uploader({
69
68
  runtimes : 'html5,flash,silverlight',
70
- browse_button : 'pickfiles',
69
+ browse_button : 'applicious_uploader',
71
70
  max_file_size : '500mb',
72
71
  url : 'http://#{bucket}.s3.amazonaws.com/',
73
- flash_swf_url: 'applicious/plupload/plupload.flash.swf',
72
+ flash_swf_url: '/applicious/plupload/plupload.flash.swf',
74
73
  silverlight_xap_url: '/applicious/plupload/plupload.silverlight.xap',
75
- init : {
76
- FilesAdded: function(up, files) {
77
- plupload.each(files, function(file) {
78
- if (up.files.length > 1) {
79
- up.removeFile(file);
80
- }
81
- });
82
- if (up.files.length >= 1) {
83
- $('#pickfiles').fadeOut('slow');
84
- }
85
- },
86
- FilesRemoved: function(up, files) {
87
- if (up.files.length < 1) {
88
- $('#pickfiles').fadeIn('slow');
89
- }
90
- }
91
- },
74
+
75
+ //resize : {width : 320, height : 240, quality : 90},
76
+
92
77
  multi_selection: false,
93
78
  multipart: true,
94
79
  multipart_params: {
@@ -107,42 +92,25 @@ module AppliciousUtils
107
92
  file_data_name: 'file'
108
93
  });
109
94
 
110
- // instantiates the uploader
111
- uploader.init();
112
-
113
- // shows the progress bar and kicks off uploading
114
- uploader.bind('FilesAdded', function(up, files) {
115
- $('#progress_bar .ui-progress').css('width', '5%');
116
- $('span.ui-label').show();
117
-
118
- // start the uploader after the progress bar shows
119
- $('#progress_bar').show(function () {
120
- uploader.start();
121
- });
122
- });
95
+ uploader.bind('FilesAdded', function(up, files) {
96
+ AP.log( up, file );
97
+ up.refresh(); // Reposition Flash/Silverlight
98
+ });
123
99
 
124
- // binds progress to progress bar
125
- uploader.bind('UploadProgress', function(up, file) {
126
- if(file.percent < 100){
127
- $('#progress_bar .ui-progress').css('width', file.percent+'%');
128
- }
129
- else {
130
- $('#progress_bar .ui-progress').css('width', '100%');
131
- $('span.ui-label').text('Complete');
132
- }
133
- });
100
+ uploader.bind('UploadProgress', function(up, file) {
101
+ AP.log( up, file );
102
+ });
134
103
 
135
- // shows error object in the browser console (for now)
136
- uploader.bind('Error', function(up, error) {
137
- // unfortunately PLUpload gives some extremely vague
138
- // Flash error messages so you have to use WireShark
139
- // for debugging them (read the README)
140
-
141
- alert('There was an error. Check the browser console log for more info');
142
- console.log('Expand the error object below to see the error. Use WireShark to debug.');
143
-
144
- console.log(error);
145
- });
104
+ uploader.bind('Error', function(up, err) {
105
+ AP.log( up, err );
106
+ up.refresh(); // Reposition Flash/Silverlight
107
+ });
108
+
109
+ uploader.bind('FileUploaded', function(up, file) {
110
+ AP.log( up, file );
111
+ });
112
+
113
+ uploader.init();
146
114
 
147
115
  });")
148
116
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applicious_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.36
4
+ version: 0.1.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -74,6 +74,7 @@ files:
74
74
  - app/assets/stylesheets/applicious_utils/FbMultiFriendSelector/jquery.facebook.multifriend.select.min.js
75
75
  - app/assets/stylesheets/applicious_utils/FbMultiFriendSelector/README.md
76
76
  - app/assets/stylesheets/applicious_utils/index.css
77
+ - applicious_utils-0.1.36.gem
77
78
  - applicious_utils.gemspec
78
79
  - Gemfile
79
80
  - lib/applicious_utils/engine.rb