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: e8b86f11dac194a5a29badf25e124521098a39f5
4
- data.tar.gz: 17da165ca249d7d9f59178b3066562cb64f7c5bf
3
+ metadata.gz: fb589adb08031e03d8111f3fb57e0a800a0e2038
4
+ data.tar.gz: 3347a92f58ea4208e60cc2408c466e5142035096
5
5
  SHA512:
6
- metadata.gz: efd67968cbfc736620461d4e0ceb7d0c5c1dd22ae472a03ba993220413f4a9c23fa13feea3826086d76107d9c72b1f238c0aaddd7fa457d03fcdf86284e53819
7
- data.tar.gz: 270223665374ff858d08d63ed1ab36788d3c20c93e0153b7132c61a3c220eb4dec76856a5f6bb114734c00bed28d6a4956b1d817e63631c90d2cabafc0479c8b
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, :share_image, :text
9
+ :cover_image, :remove_cover_image,
10
+ :share_image, :remove_share_image,
11
+ :text
10
12
  ]
11
13
  end
12
14
 
@@ -38,7 +38,7 @@ class Tomify::Api::Public::UsersController < Tomify.controllers.public_api
38
38
  end
39
39
 
40
40
  def serializable_options
41
- User.env_serializable_options
41
+ Tomify.models.user.env_serializable_options
42
42
  end
43
43
 
44
44
  def update_record
@@ -1,3 +1,3 @@
1
1
  module Tomify
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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.7
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