oxen_media 0.4.12 → 0.4.13
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: 45cde34b46abea2a529b5d02ecda26a9d83a5098
|
4
|
+
data.tar.gz: 5c5c894a0dd398a3ff8ddd2edbe24dacf84a1968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe32d262295fb74f7b3b5311df6a99cb3c41ba75e9c601adf42ba52bbe0d0029c1a9ff9c77f2ecb4bc50f1af3451963256a50d5bdc6f37a1dc716fcad87468a0
|
7
|
+
data.tar.gz: 08e28a49cc7943d5e875b266897ca03f3f0a25fe4f879fd2cba3253b312450326e41d1ba6b830f5c6a2b892a13ba94a0e6337c54fe5e89f478951416e57addce
|
@@ -8,18 +8,15 @@ class @DropZone extends React.Component
|
|
8
8
|
super props
|
9
9
|
@state =
|
10
10
|
entity: props.entity
|
11
|
-
key: props.key
|
12
11
|
record: props.record
|
13
12
|
reader: null
|
14
13
|
shared: new App.Shared()
|
15
14
|
url: props.url
|
16
15
|
|
17
|
-
# filesID: {}
|
18
|
-
|
19
16
|
@propTypes =
|
20
17
|
# record: React.PropTypes.node
|
21
18
|
entity: React.PropTypes.string
|
22
|
-
|
19
|
+
# rkey: React.PropTypes.number
|
23
20
|
id: React.PropTypes.string
|
24
21
|
classes: React.PropTypes.string
|
25
22
|
url: React.PropTypes.string
|
@@ -34,7 +31,7 @@ class @DropZone extends React.Component
|
|
34
31
|
record: ''
|
35
32
|
classes: ''
|
36
33
|
id: 'dropzone'
|
37
|
-
|
34
|
+
# rkey: 0
|
38
35
|
onDragStart: BLANK_FUNCTION
|
39
36
|
onDragEnter: BLANK_FUNCTION
|
40
37
|
onDrop: BLANK_FUNCTION
|
@@ -184,7 +181,7 @@ class @DropZone extends React.Component
|
|
184
181
|
|
185
182
|
handleDelete: (e) =>
|
186
183
|
e.preventDefault()
|
187
|
-
id=$(e.target).closest('
|
184
|
+
id=$(e.target).closest('.row').find('input.files_uploaded').first().val()
|
188
185
|
|
189
186
|
jqxhr = $.ajax
|
190
187
|
method: 'DELETE'
|
@@ -210,6 +207,7 @@ class @DropZone extends React.Component
|
|
210
207
|
dataType: 'html'
|
211
208
|
|
212
209
|
.done (r) =>
|
210
|
+
console.log r
|
213
211
|
$('#drop_zone_upload_bay').removeClass('loading_files')
|
214
212
|
$('#photos_'+f.id+'_id').val(r.replace(/\s/g, ""))
|
215
213
|
|
@@ -4,18 +4,18 @@ class @PhotoCard extends React.Component
|
|
4
4
|
constructor: (props) ->
|
5
5
|
super props
|
6
6
|
@state =
|
7
|
-
|
7
|
+
photo_id: props.photo_id
|
8
8
|
entity: props.entity
|
9
9
|
record: props.record
|
10
10
|
|
11
11
|
@propTypes =
|
12
12
|
# record: React.PropTypes.node
|
13
|
-
|
13
|
+
photo_id: React.PropTypes.number
|
14
14
|
entity: React.PropTypes.string
|
15
15
|
|
16
16
|
@defaultProps: ->
|
17
17
|
record: ''
|
18
|
-
|
18
|
+
photo_id: 0
|
19
19
|
entity: 'stock_item'
|
20
20
|
|
21
21
|
show_on_new: () =>
|
@@ -26,13 +26,14 @@ class @PhotoCard extends React.Component
|
|
26
26
|
|
27
27
|
handleDelete: (e) =>
|
28
28
|
e.preventDefault()
|
29
|
+
$elem = $(e.currentTarget)
|
29
30
|
jqxhr = $.ajax
|
30
31
|
method: 'DELETE'
|
31
32
|
url: "/photos/#{ @state.record.id }"
|
32
33
|
dataType: 'html'
|
33
34
|
jqxhr.done () =>
|
34
|
-
$
|
35
|
-
|
35
|
+
$elem.closest('.card').fadeOut 'slow', () =>
|
36
|
+
$elem.closest('.card').remove()
|
36
37
|
jqxhr.fail (e,msg) =>
|
37
38
|
swal "Fejl!", "Det var ikke muligt at slette billedet - fejlen er:\n" + msg, "error"
|
38
39
|
|
@@ -52,7 +53,7 @@ class @PhotoCard extends React.Component
|
|
52
53
|
style: width: '0%'
|
53
54
|
img
|
54
55
|
className: "activator"
|
55
|
-
id: @props.
|
56
|
+
id: @props.photo_id
|
56
57
|
src: @props.record.image.url
|
57
58
|
div
|
58
59
|
className: "row"
|
@@ -38,7 +38,7 @@ class @Photos extends React.Component
|
|
38
38
|
try
|
39
39
|
cards = []
|
40
40
|
for record in @state.records
|
41
|
-
cards.push React.createElement PhotoCard, { key: record.id, record: record, deleteRecord: @deleteRecord, entity: @props.entity }
|
41
|
+
cards.push React.createElement PhotoCard, { key: record.id, photo_id: record.id, record: record, deleteRecord: @deleteRecord, entity: @props.entity }
|
42
42
|
|
43
43
|
div
|
44
44
|
className: @props.classes
|
data/lib/oxen_media/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxen_media
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Walther H Diechmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|