tomify 0.1.7 → 0.1.8
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: fb589adb08031e03d8111f3fb57e0a800a0e2038
|
4
|
+
data.tar.gz: 3347a92f58ea4208e60cc2408c466e5142035096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71768438cb41713f68135bc325efdb41a85a4e6392f9108e30f2fe19aae782282f0b063917893a31a318f62fb288224317f32ae012f0fd1abddae31ec214b215
|
7
|
+
data.tar.gz: 1044b11434cbaca198e9f2c0b5fb447156919280e1f9b5b2e8e97deab574fb613aacfe1029930b5a2f181dce9d836a52345448e9dc48b6f7a640c270a094666b
|
@@ -1,3 +1,19 @@
|
|
1
1
|
Component.create "Form.Field.File",
|
2
2
|
render: ->
|
3
|
-
<input placeholder={@props.placeholder} className="form-control" type="file" name={@props.name} id={@props.name} onChange={@props.onChange.bind(null, @props.name)} />
|
3
|
+
file = <input placeholder={@props.placeholder} className="form-control" type="file" name={@props.name} id={@props.name} onChange={@props.onChange.bind(null, @props.name)} />
|
4
|
+
value = @props.value(@props.name)
|
5
|
+
console.log(value)
|
6
|
+
return file unless value.url
|
7
|
+
name = "remove_#{@props.name}"
|
8
|
+
|
9
|
+
<div className="row">
|
10
|
+
<div className="col-md-6">{file}</div>
|
11
|
+
<div className="col-md-6">
|
12
|
+
<div className="checkbox">
|
13
|
+
<label>
|
14
|
+
<input type="checkbox" name={name} id={name} checked={@props.value(name)} onChange={@props.onChange.bind(null, name)} />
|
15
|
+
<span dangerouslySetInnerHTML={{__html: "Remove #{@props.name.titleize}"}} />
|
16
|
+
</label>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -6,7 +6,9 @@ class Tomify::Api::Admin::PagesController < Tomify.controllers.admin_api
|
|
6
6
|
:active, :root, :feedback,
|
7
7
|
:rank, :path, :name,
|
8
8
|
:template, :title, :description,
|
9
|
-
:cover_image, :
|
9
|
+
:cover_image, :remove_cover_image,
|
10
|
+
:share_image, :remove_share_image,
|
11
|
+
:text
|
10
12
|
]
|
11
13
|
end
|
12
14
|
|
data/lib/tomify/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Prats
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: carrierwave-i18n
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: coffee-rails
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|