biola_wcms_components 0.10.0 → 0.11.0

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: 31e37c8293b1910400c4c1e4daee6161404a67cc
4
- data.tar.gz: d617616b942e10b9731f1fd2257e4edaf6cea8fd
3
+ metadata.gz: 15c3fcc2fbe8a94ac07b1a262c7bdd991774dfcd
4
+ data.tar.gz: 36947f8497653fa1e1846a81c2792005f85ee32e
5
5
  SHA512:
6
- metadata.gz: eb68ef14a59d7658093071782b1f9961feea9a6b165c32e0515ebbb63f218f727d41a813b714b0f2f69b9328a248a62d949789e6de48e71c34a4f4e2a8b353bf
7
- data.tar.gz: 88e5349dfe2ea7371a43470e1bfc5366b4efea4a9cec71cdcb9b89d47eb92ec4a19a8419cf8cb5404073f5cdb2e8654a6f224650f3d56bddc416a6cdb991beab
6
+ metadata.gz: cb5a57ce8c2de76f6cce19eaf540ef3d45a331177f9f8de11429d7aecebdfa0a3bf853a7a983b6a305022eeebc873a66aef54b9ee3f7ea9d2eeac51c4551a0d5
7
+ data.tar.gz: 80d6a1c9a1c446b3a660d7561b40f597d7a984bbd246d3867ca5000879180ec9883fd8554411c7444822619c255d1d1739b7bcce5243076087367b205e6cda61
@@ -7,7 +7,7 @@ $(document).ready ->
7
7
 
8
8
  # Delete an array item when you click the delete button
9
9
  $('.array_wrapper').on 'click', '.delete_array_item', ->
10
- $(this).parents('.array_item').remove()
10
+ $(this).parents('.array_item').first().remove()
11
11
  false
12
12
 
13
13
  # Add an new array item from the last array_item
@@ -38,4 +38,9 @@
38
38
  .drop-image-uploader {
39
39
  &.dragging { background-color: #deedff; }
40
40
  }
41
+
42
+ input.form-control[type="checkbox"] {
43
+ -webkit-box-shadow: none;
44
+ box-shadow: none;
45
+ }
41
46
  }
@@ -1,3 +1,3 @@
1
1
  module BiolaWcmsComponents
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  end
@@ -44,6 +44,10 @@ class PresentationDataEditor
44
44
  build_image_uploader(attribute, parent_keys)
45
45
  when 'html'
46
46
  build_html(attribute, parent_keys)
47
+ when 'checkbox'
48
+ build_check_box(attribute, parent_keys)
49
+ when 'number'
50
+ build_number(attribute, parent_keys)
47
51
  end
48
52
  end
49
53
 
@@ -109,6 +113,37 @@ class PresentationDataEditor
109
113
  end
110
114
  end
111
115
 
116
+ def build_check_box(attribute, parent_keys)
117
+ view.content_tag :div, class: 'form-group' do
118
+ view.label_tag(attribute[:name]) +
119
+ view.check_box_tag(
120
+ form_name(parent_keys, attribute[:name]), # name
121
+ 1, # value
122
+ data_grab(parent_keys, attribute[:name]).to_i == 1,# checked or not
123
+ { # options
124
+ class: "form-control #{attribute[:class]}",
125
+ id: attribute_id(parent_keys, attribute[:name]),
126
+ placeholder: attribute[:placeholder]
127
+ }
128
+ )
129
+ end
130
+ end
131
+
132
+ def build_number(attribute, parent_keys)
133
+ view.content_tag :div, class: 'form-group' do
134
+ view.label_tag(attribute[:name]) +
135
+ view.number_field_tag(
136
+ form_name(parent_keys, attribute[:name]),
137
+ data_grab(parent_keys, attribute[:name]),
138
+ {
139
+ class: "form-control #{attribute[:class]}",
140
+ id: attribute_id(parent_keys, attribute[:name]),
141
+ placeholder: attribute[:placeholder]
142
+ }
143
+ )
144
+ end
145
+ end
146
+
112
147
  def build_image_uploader(attribute, parent_keys)
113
148
  view.content_tag :div, class: 'form-group type-image-uploader' do
114
149
  view.label_tag(attribute[:name]) +
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biola_wcms_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-01 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ace-rails-ap