spud_photos 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/spud/admin/photos.js +14 -12
- data/lib/spud_photos/version.rb +1 -1
- metadata +4 -4
@@ -127,7 +127,7 @@ Spud.Admin.Photos = new function(){
|
|
127
127
|
var progressBar;
|
128
128
|
var file = form.find('#spud_photo_photo')[0].files[0];
|
129
129
|
if(file){
|
130
|
-
progressBar = self.progressBarForUpload(file.
|
130
|
+
progressBar = self.progressBarForUpload(file.name);
|
131
131
|
fd.append('spud_photo[photo]', file);
|
132
132
|
form.append(progressBar);
|
133
133
|
}
|
@@ -153,16 +153,18 @@ Spud.Admin.Photos = new function(){
|
|
153
153
|
-------------------------------- */
|
154
154
|
|
155
155
|
this.progressBarForUpload = function(fileName){
|
156
|
-
|
157
|
-
<div class="spud_admin_photo_progress"
|
158
|
-
<h6>
|
159
|
-
<span class="spud_admin_photo_progress_filename">'+fileName+'</span>:
|
160
|
-
<span class="spud_admin_photo_progress_status">Uploading</span>
|
161
|
-
</h6>
|
162
|
-
<div class="progress progress-striped active">
|
163
|
-
<div class="bar" style="width: 0;"></div>
|
164
|
-
</div>
|
165
|
-
</div>'
|
156
|
+
var html = [
|
157
|
+
'<div class="spud_admin_photo_progress">',
|
158
|
+
'<h6>',
|
159
|
+
'<span class="spud_admin_photo_progress_filename">'+fileName+'</span>: ',
|
160
|
+
'<span class="spud_admin_photo_progress_status">Uploading</span>',
|
161
|
+
'</h6>',
|
162
|
+
'<div class="progress progress-striped active">',
|
163
|
+
'<div class="bar" style="width: 0;"></div>',
|
164
|
+
'</div>',
|
165
|
+
'</div>'
|
166
|
+
].join('');
|
167
|
+
return $(html);
|
166
168
|
};
|
167
169
|
|
168
170
|
this.onPhotoUploadProgress = function(e, progressBar){
|
@@ -332,7 +334,7 @@ Spud.Admin.Photos = new function(){
|
|
332
334
|
fd.append('spud_photo[photo]', file);
|
333
335
|
|
334
336
|
// create a progress bar
|
335
|
-
var progressBar = self.progressBarForUpload(file.
|
337
|
+
var progressBar = self.progressBarForUpload(file.name);
|
336
338
|
$('#spud_admin_photo_upload_queue_bars').prepend(progressBar);
|
337
339
|
|
338
340
|
// send formdata as xhr
|
data/lib/spud_photos/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_photos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -276,7 +276,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
276
276
|
version: '0'
|
277
277
|
segments:
|
278
278
|
- 0
|
279
|
-
hash: -
|
279
|
+
hash: -445048895014471916
|
280
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
281
|
none: false
|
282
282
|
requirements:
|
@@ -285,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
285
|
version: '0'
|
286
286
|
segments:
|
287
287
|
- 0
|
288
|
-
hash: -
|
288
|
+
hash: -445048895014471916
|
289
289
|
requirements: []
|
290
290
|
rubyforge_project:
|
291
291
|
rubygems_version: 1.8.24
|