instant-upload 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb18a57e70d32fd4b6db8bf9281824b3ac175f48
|
4
|
+
data.tar.gz: fc48b0cb853665c468c44a257b0028232cf97b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fef52262fd073bf7e1de3cdb728ddc8a4a572eb0165c56035ded1f66bb86d2dd581eca548276b96db8358f4c1b1fae05f7528dc88cc18e2a1cff811dfa6f55b1
|
7
|
+
data.tar.gz: a9b361b5dba39e83cd82136500e35e76f745e8ac9d8b75e8887312ebc5b2a38ad5c8f6bd3779c92600fcb05c200603a83adeab4812825d385376fd921db7c539
|
@@ -109,7 +109,13 @@ app = angular.module('instantUpload', [])
|
|
109
109
|
|
110
110
|
# $scope.files = []
|
111
111
|
for image in $.parseJSON(xhr.response)
|
112
|
-
|
112
|
+
isNew = true
|
113
|
+
|
114
|
+
if $scope.persisted
|
115
|
+
for f in $scope.files
|
116
|
+
isNew = false if f.id == image.id
|
117
|
+
|
118
|
+
$scope.files.push { path: image[$scope.multi][$scope.version].url, id: image.id } if isNew
|
113
119
|
), false
|
114
120
|
|
115
121
|
xhr.addEventListener 'error', ( (e) =>
|
@@ -142,7 +148,8 @@ app = angular.module('instantUpload', [])
|
|
142
148
|
|
143
149
|
$scope.$apply ->
|
144
150
|
$uploader.find('.iu-multi-files-cache li').each ->
|
145
|
-
$
|
151
|
+
$this = $(this)
|
152
|
+
$scope.files.push { path: $this.find('img').attr('src'), id: $this.data('id') }
|
146
153
|
|
147
154
|
$ -> $scope.init($($element)) if !!window.FormData
|
148
155
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
%ul.iu-multi-files-cache
|
11
11
|
- record.send(field).each do |img|
|
12
|
-
%li= image_tag img.send(options[:multi]).send(options[:version]).url
|
12
|
+
%li{ data: { id: img.id } }= image_tag img.send(options[:multi]).send(options[:version]).url
|
13
13
|
|
14
14
|
.iu-alert Too much, only #{options[:limit]}
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instant-upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mariusz Ołownia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|