ui_bibz 2.0.0.alpha24 → 2.0.0.alpha26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTORS.md +19 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +60 -55
  5. data/app/assets/javascripts/interface.coffee +11 -0
  6. data/app/assets/javascripts/ui_bibz.coffee +3 -1
  7. data/app/assets/stylesheets/table.sass +1 -2
  8. data/app/assets/stylesheets/ui_bibz.sass +2 -0
  9. data/app/inputs/custom_inputs/autocomplete_input.rb +3 -2
  10. data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
  11. data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
  12. data/app/inputs/custom_inputs/formula_input.rb +2 -2
  13. data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
  14. data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
  15. data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
  16. data/app/inputs/custom_inputs/radios_input.rb +20 -0
  17. data/app/inputs/custom_inputs/surround_input.rb +2 -2
  18. data/app/inputs/custom_inputs/switch_input.rb +2 -2
  19. data/config/initializers/will_paginate.rb +79 -0
  20. data/lib/ui_bibz.rb +56 -30
  21. data/lib/ui_bibz/helpers/ui_core_helper.rb +45 -37
  22. data/lib/ui_bibz/ui/core/alert.rb +1 -2
  23. data/lib/ui_bibz/ui/core/{breadcrumb/breadcrumb.rb → breadcrumb.rb} +5 -5
  24. data/lib/ui_bibz/ui/core/cards/card.rb +6 -6
  25. data/lib/ui_bibz/ui/core/cards/components/block/card_block_link.rb +1 -1
  26. data/lib/ui_bibz/ui/core/cards/components/block/card_block_text.rb +1 -1
  27. data/lib/ui_bibz/ui/core/cards/components/block/card_block_title.rb +1 -1
  28. data/lib/ui_bibz/ui/core/cards/components/card_block.rb +4 -4
  29. data/lib/ui_bibz/ui/core/cards/components/card_footer.rb +1 -1
  30. data/lib/ui_bibz/ui/core/cards/components/card_header.rb +1 -1
  31. data/lib/ui_bibz/ui/core/cards/components/card_image.rb +1 -1
  32. data/lib/ui_bibz/ui/core/cards/components/card_list_group.rb +2 -2
  33. data/lib/ui_bibz/ui/core/component.rb +4 -51
  34. data/lib/ui_bibz/ui/core/component/glyph_extension.rb +19 -0
  35. data/lib/ui_bibz/ui/core/component/klass_extension.rb +38 -0
  36. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_divider.rb +1 -1
  37. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_header.rb +2 -2
  38. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_link.rb +2 -2
  39. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/dropdown.rb +11 -12
  40. data/lib/ui_bibz/ui/core/{buttons/button_split_dropdown.rb → dropdowns/split_dropdown.rb} +6 -10
  41. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button.rb +5 -5
  42. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_choice.rb +8 -8
  43. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_group.rb +5 -5
  44. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_link.rb +13 -9
  45. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +98 -0
  46. data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +98 -0
  47. data/lib/ui_bibz/ui/core/{inputs → forms/choices}/switch_field.rb +3 -3
  48. data/lib/ui_bibz/ui/core/{inputs → forms/dates}/date_picker_field.rb +6 -6
  49. data/lib/ui_bibz/ui/core/{inputs → forms/numbers}/formula_field.rb +5 -5
  50. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/dropdown_select_field.rb +5 -5
  51. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_column_field.rb +5 -5
  52. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_select_field.rb +8 -8
  53. data/lib/ui_bibz/ui/core/{inputs → forms/textareas}/markdown_editor_field.rb +5 -5
  54. data/lib/ui_bibz/ui/core/{inputs → forms/texts}/autocomplete_field.rb +5 -5
  55. data/lib/ui_bibz/ui/core/{inputs → forms/texts}/surround_field.rb +5 -5
  56. data/lib/ui_bibz/ui/core/glyph.rb +2 -1
  57. data/lib/ui_bibz/ui/core/{list → lists}/components/list.rb +11 -11
  58. data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_body.rb +2 -2
  59. data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_header.rb +2 -2
  60. data/lib/ui_bibz/ui/core/{list → lists}/list_group.rb +4 -4
  61. data/lib/ui_bibz/ui/core/navs/components/nav_dropdown.rb +1 -1
  62. data/lib/ui_bibz/ui/core/navs/components/navbar_form.rb +3 -1
  63. data/lib/ui_bibz/ui/core/paths/breadcrumb.rb +109 -0
  64. data/lib/ui_bibz/ui/core/{breadcrumb → paths}/components/breadcrumb_link.rb +6 -6
  65. data/lib/ui_bibz/ui/core/{stars.rb → star.rb} +14 -14
  66. data/lib/ui_bibz/ui/core/tag.rb +1 -2
  67. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_body.rb +2 -2
  68. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_footer.rb +2 -2
  69. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_header.rb +2 -2
  70. data/lib/ui_bibz/ui/core/{modal → windows}/modal.rb +8 -8
  71. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +9 -9
  72. data/lib/ui_bibz/ui/ux/tables/extensions/actionable.rb +1 -1
  73. data/lib/ui_bibz/ui/ux/tables/table_pagination.rb +5 -4
  74. data/lib/ui_bibz/version.rb +1 -1
  75. data/test/dummy/app/controllers/users_controller.rb +18 -0
  76. data/test/dummy/app/models/user.rb +1 -0
  77. data/test/dummy/config/application.rb +1 -1
  78. data/test/dummy/config/initializers/simple_form_bootstrap.rb +155 -0
  79. data/test/simple_form_test.rb +123 -0
  80. data/test/test_helper.rb +2 -2
  81. data/test/ui/breadcrumb_test.rb +2 -2
  82. data/test/ui/button_test.rb +13 -39
  83. data/test/ui/dropdown_test.rb +14 -1
  84. data/test/ui/glyph_test.rb +6 -0
  85. data/test/ui/input_dropdown_select_field_test.rb +9 -9
  86. data/test/ui/input_switch_field_test.rb +11 -11
  87. data/test/ui/inputs_test.rb +26 -12
  88. data/test/ui/list_group_test.rb +2 -2
  89. data/test/ui/{stars_test.rb → star_test.rb} +7 -7
  90. data/test/ui/table_test.rb +3 -3
  91. data/test/ui_helper_test.rb +6 -1
  92. data/ui_bibz.gemspec +4 -3
  93. data/vendor/assets/stylesheets/awesome-bootstrap-checkbox.scss +250 -0
  94. metadata +65 -39
  95. data/lib/ui_bibz/helpers/pagination_helper.rb +0 -55
  96. data/lib/ui_bibz/ui/core/buttons/button_dropdown.rb +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abb603bf7367213714426d7a30af42928ce838b5
4
- data.tar.gz: 88038259aabb555e3a57979fedb495b73104f1ba
3
+ metadata.gz: 6e201b34591106705046a782c99ff13790c3ba97
4
+ data.tar.gz: 33322f78ac7cabfacc2f9bc6e2962b693985e19f
5
5
  SHA512:
6
- metadata.gz: 79774445d57a7c7ac3b72f92d3d6a01546c7ce1c97281e6e71013ba712216453f70c75dd4f6afaf53d110f0e1466dbf79c0e111db63a63b928cbd2d045466910
7
- data.tar.gz: 7fd7a75f885f1a893d44c04f461a019cd2d929c0ebdddba5c3c53c38957fa6f83c4417bc87885cb56d3b91c7ae71346379731db7497c31962603cf1469c95d3c
6
+ metadata.gz: 88e4bbd1372e35d65da74020f3c25ab6d30d8f81f0cf2e6b84437befc083c2e4b76bb23d4d5aacaea39671f5a121c8a4f1c151d6d01f20353687e798f177d438
7
+ data.tar.gz: 28dffc8d28d507a6bbf21223b6509b8bb4d28076a1309e81c7f27e397ec1cf7c32f8e266d2fac995b36211f8fd5138ce0d75e4367452a191e423c3df1220aed7
data/CONTRIBUTORS.md CHANGED
@@ -22,3 +22,22 @@
22
22
  * [multi-select](https://github.com/lou/multi-select/)
23
23
  * [Taufan Aditya](https://github.com/toopay)
24
24
  * [boostrap-markdown](https://github.com/toopay/bootstrap-markdown)
25
+
26
+ ## External library (ruby)
27
+
28
+ * [Delef](https://github.com/delef)
29
+ * [will_paginate-bootstrap4](https://github.com/delef/will_paginate-bootstrap4)
30
+
31
+ * [Mislav](https://github.com/mislav)
32
+ * [will_paginate](https://github.com/mislav/will_paginate)
33
+
34
+ * [Indirect](https://github.com/indirect)
35
+ * [haml-rails](https://github.com/indirect/haml-rails)
36
+
37
+ * [Haml](https://github.com/haml/haml)
38
+
39
+ * [Rails](https://github.com/rails)
40
+ * [Sass Rails](https://github.com/rails/sass-rails)
41
+
42
+ * [FortAwesome](https://github.com/FortAwesome)
43
+ * [font-awesome-sass](https://github.com/FortAwesome/font-awesome-sass)
data/Gemfile CHANGED
@@ -20,3 +20,4 @@ gemspec
20
20
  # To use a debugger
21
21
  #gem 'byebug', group: [:development, :test]
22
22
  gem 'awesome_print', group: [:development, :test]
23
+ gem 'simple_form', group: :test
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.0.0.alpha24)
5
- bootstrap (= 4.0.0.alpha4)
4
+ ui_bibz (2.0.0.alpha26)
5
+ bootstrap (= 4.0.0.alpha5)
6
6
  font-awesome-sass
7
7
  haml
8
8
  haml-rails
@@ -10,68 +10,68 @@ PATH
10
10
  sass-rails (>= 5.0.0)
11
11
  will-paginate-i18n
12
12
  will_paginate (~> 3.1.0)
13
- will_paginate-bootstrap
13
+ will_paginate-bootstrap4
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- actioncable (5.0.0.1)
19
- actionpack (= 5.0.0.1)
18
+ actioncable (5.0.1)
19
+ actionpack (= 5.0.1)
20
20
  nio4r (~> 1.2)
21
21
  websocket-driver (~> 0.6.1)
22
- actionmailer (5.0.0.1)
23
- actionpack (= 5.0.0.1)
24
- actionview (= 5.0.0.1)
25
- activejob (= 5.0.0.1)
22
+ actionmailer (5.0.1)
23
+ actionpack (= 5.0.1)
24
+ actionview (= 5.0.1)
25
+ activejob (= 5.0.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (5.0.0.1)
29
- actionview (= 5.0.0.1)
30
- activesupport (= 5.0.0.1)
28
+ actionpack (5.0.1)
29
+ actionview (= 5.0.1)
30
+ activesupport (= 5.0.1)
31
31
  rack (~> 2.0)
32
32
  rack-test (~> 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
- actionview (5.0.0.1)
36
- activesupport (= 5.0.0.1)
35
+ actionview (5.0.1)
36
+ activesupport (= 5.0.1)
37
37
  builder (~> 3.1)
38
38
  erubis (~> 2.7.0)
39
39
  rails-dom-testing (~> 2.0)
40
40
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
41
- activejob (5.0.0.1)
42
- activesupport (= 5.0.0.1)
41
+ activejob (5.0.1)
42
+ activesupport (= 5.0.1)
43
43
  globalid (>= 0.3.6)
44
- activemodel (5.0.0.1)
45
- activesupport (= 5.0.0.1)
46
- activerecord (5.0.0.1)
47
- activemodel (= 5.0.0.1)
48
- activesupport (= 5.0.0.1)
44
+ activemodel (5.0.1)
45
+ activesupport (= 5.0.1)
46
+ activerecord (5.0.1)
47
+ activemodel (= 5.0.1)
48
+ activesupport (= 5.0.1)
49
49
  arel (~> 7.0)
50
- activesupport (5.0.0.1)
50
+ activesupport (5.0.1)
51
51
  concurrent-ruby (~> 1.0, >= 1.0.2)
52
52
  i18n (~> 0.7)
53
53
  minitest (~> 5.1)
54
54
  tzinfo (~> 1.1)
55
55
  arel (7.1.4)
56
- autoprefixer-rails (6.5.0.2)
56
+ autoprefixer-rails (6.6.0)
57
57
  execjs
58
58
  awesome_print (1.7.0)
59
- bootstrap (4.0.0.alpha4)
59
+ bootstrap (4.0.0.alpha5)
60
60
  autoprefixer-rails (>= 6.0.3)
61
61
  sass (>= 3.4.19)
62
62
  builder (3.2.2)
63
- codeclimate-test-reporter (0.6.0)
64
- simplecov (>= 0.7.1, < 1.0.0)
65
- concurrent-ruby (1.0.2)
63
+ codeclimate-test-reporter (1.0.4)
64
+ simplecov
65
+ concurrent-ruby (1.0.4)
66
66
  docile (1.1.5)
67
67
  erubis (2.7.0)
68
68
  execjs (2.7.0)
69
- factory_girl (4.7.0)
69
+ factory_girl (4.8.0)
70
70
  activesupport (>= 3.0.0)
71
- factory_girl_rails (4.7.0)
72
- factory_girl (~> 4.7.0)
71
+ factory_girl_rails (4.8.0)
72
+ factory_girl (~> 4.8.0)
73
73
  railties (>= 3.0.0)
74
- font-awesome-sass (4.6.2)
74
+ font-awesome-sass (4.7.0)
75
75
  sass (>= 3.2)
76
76
  globalid (0.3.7)
77
77
  activesupport (>= 4.1.0)
@@ -99,40 +99,40 @@ GEM
99
99
  mime-types-data (~> 3.2015)
100
100
  mime-types-data (3.2016.0521)
101
101
  mini_portile2 (2.1.0)
102
- minitest (5.9.1)
102
+ minitest (5.10.1)
103
103
  nio4r (1.2.1)
104
104
  nokogiri (1.6.8.1)
105
105
  mini_portile2 (~> 2.1.0)
106
106
  rack (2.0.1)
107
107
  rack-test (0.6.3)
108
108
  rack (>= 1.0)
109
- rails (5.0.0.1)
110
- actioncable (= 5.0.0.1)
111
- actionmailer (= 5.0.0.1)
112
- actionpack (= 5.0.0.1)
113
- actionview (= 5.0.0.1)
114
- activejob (= 5.0.0.1)
115
- activemodel (= 5.0.0.1)
116
- activerecord (= 5.0.0.1)
117
- activesupport (= 5.0.0.1)
109
+ rails (5.0.1)
110
+ actioncable (= 5.0.1)
111
+ actionmailer (= 5.0.1)
112
+ actionpack (= 5.0.1)
113
+ actionview (= 5.0.1)
114
+ activejob (= 5.0.1)
115
+ activemodel (= 5.0.1)
116
+ activerecord (= 5.0.1)
117
+ activesupport (= 5.0.1)
118
118
  bundler (>= 1.3.0, < 2.0)
119
- railties (= 5.0.0.1)
119
+ railties (= 5.0.1)
120
120
  sprockets-rails (>= 2.0.0)
121
- rails-dom-testing (2.0.1)
121
+ rails-dom-testing (2.0.2)
122
122
  activesupport (>= 4.2.0, < 6.0)
123
- nokogiri (~> 1.6.0)
123
+ nokogiri (~> 1.6)
124
124
  rails-html-sanitizer (1.0.3)
125
125
  loofah (~> 2.0)
126
- railties (5.0.0.1)
127
- actionpack (= 5.0.0.1)
128
- activesupport (= 5.0.0.1)
126
+ railties (5.0.1)
127
+ actionpack (= 5.0.1)
128
+ activesupport (= 5.0.1)
129
129
  method_source
130
130
  rake (>= 0.8.7)
131
131
  thor (>= 0.18.1, < 2.0)
132
- rake (11.3.0)
132
+ rake (12.0.0)
133
133
  ruby_parser (3.8.3)
134
134
  sexp_processor (~> 4.1)
135
- sass (3.4.22)
135
+ sass (3.4.23)
136
136
  sass-rails (5.0.6)
137
137
  railties (>= 4.0.0, < 6)
138
138
  sass (~> 3.1)
@@ -140,12 +140,15 @@ GEM
140
140
  sprockets-rails (>= 2.0, < 4.0)
141
141
  tilt (>= 1.1, < 3)
142
142
  sexp_processor (4.7.0)
143
+ simple_form (3.3.1)
144
+ actionpack (> 4, < 5.1)
145
+ activemodel (> 4, < 5.1)
143
146
  simplecov (0.12.0)
144
147
  docile (~> 1.1.0)
145
148
  json (>= 1.8, < 3)
146
149
  simplecov-html (~> 0.10.0)
147
150
  simplecov-html (0.10.0)
148
- sprockets (3.7.0)
151
+ sprockets (3.7.1)
149
152
  concurrent-ruby (~> 1.0)
150
153
  rack (> 1, < 3)
151
154
  sprockets-rails (3.2.0)
@@ -153,7 +156,7 @@ GEM
153
156
  activesupport (>= 4.0)
154
157
  sprockets (>= 3.0.0)
155
158
  sqlite3 (1.3.12)
156
- thor (0.19.1)
159
+ thor (0.19.4)
157
160
  thread_safe (0.3.5)
158
161
  tilt (2.0.5)
159
162
  tzinfo (1.2.2)
@@ -162,9 +165,9 @@ GEM
162
165
  websocket-extensions (>= 0.1.0)
163
166
  websocket-extensions (0.1.2)
164
167
  will-paginate-i18n (0.1.15)
165
- will_paginate (3.1.3)
166
- will_paginate-bootstrap (1.0.1)
167
- will_paginate (>= 3.0.3)
168
+ will_paginate (3.1.5)
169
+ will_paginate-bootstrap4 (0.1.2)
170
+ will_paginate (~> 3.0, >= 3.0.9)
168
171
 
169
172
  PLATFORMS
170
173
  ruby
@@ -174,8 +177,10 @@ DEPENDENCIES
174
177
  codeclimate-test-reporter
175
178
  factory_girl_rails (~> 4.0)
176
179
  minitest
180
+ simple_form
181
+ simplecov
177
182
  sqlite3
178
183
  ui_bibz!
179
184
 
180
185
  BUNDLED WITH
181
- 1.12.5
186
+ 1.13.6
@@ -4,6 +4,7 @@
4
4
  @nav()
5
5
  @tooltip()
6
6
  @dropdown()
7
+ @checkbox()
7
8
 
8
9
  nav: ->
9
10
  $('.nav-tabs a').click (e) ->
@@ -15,3 +16,13 @@
15
16
 
16
17
  dropdown: ->
17
18
  $('.dropdown-toggle').dropdown()
19
+
20
+ checkbox: ->
21
+ $('.abc-checkbox.indeterminate input[type=checkbox]').on 'click', ->
22
+ el = $(this)
23
+ if (el.attr('readonly') == 'readonly')
24
+ el.prop('checked', false)
25
+ el.prop('readonly', false)
26
+ else if (!el.is(':checked'))
27
+ el.prop('readonly', true)
28
+ el.prop('indeterminate', true)
@@ -48,4 +48,6 @@ ready = ->
48
48
  # Fix for turbolinks
49
49
  $( "textarea[data-provide*='markdown']" ).markdown() # fix markdown js if turbolinks exists
50
50
 
51
- $(document).on('ready turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
51
+ # turbolinks:load and ready together load twice time javascript
52
+ #$(document).on('ready turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
53
+ $(document).on('turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
@@ -32,12 +32,11 @@
32
32
  //background-color: $table-bg-active
33
33
  padding: 10px 10px
34
34
  .pagination
35
- margin: 0.5rem 0 0 0
35
+ margin: 0
36
36
  li
37
37
  display: inline
38
38
  float: left
39
39
  li:not(:first-child)
40
- margin-left: 0.7rem
41
40
  .table-pagination-per-page
42
41
  float: right
43
42
  select
@@ -28,6 +28,8 @@ $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $b
28
28
  @import bootstrap-select.min
29
29
  // mardown-editor component
30
30
  @import bootstrap-markdown.min
31
+ // awesome bootstrap checkbox component
32
+ @import awesome-bootstrap-checkbox
31
33
 
32
34
  // fix plugins
33
35
  @import fix-bootstrap-4
@@ -1,6 +1,6 @@
1
1
  module CustomInputs
2
2
  class AutocompleteInput < SimpleForm::Inputs::CollectionInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Texts
4
4
  include ActionView::Helpers::FormOptionsHelper
5
5
 
6
6
  def input(wrapper_options)
@@ -8,7 +8,8 @@ module CustomInputs
8
8
  options = options || {}
9
9
  options = options.merge({ builder: @builder })
10
10
  options = options.merge(option_tags: options_from_collection_for_select(collection, label_method, label_method))
11
- UiBibz::Ui::Core::Inputs::AutocompleteField.new(attribute_name, options, input_html_options).render
11
+
12
+ UiBibz::Ui::Core::Forms::Texts::AutocompleteField.new(attribute_name, options, input_html_options).render
12
13
  end
13
14
  end
14
15
  end
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class DatePickerInput < SimpleForm::Inputs::StringInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Dates
4
4
 
5
5
  def input(wrapper_options)
6
6
  options = @options.merge({ builder: @builder })
7
- UiBibz::Ui::Core::Inputs::DatePickerField.new(attribute_name, options, input_html_options).render
7
+ UiBibz::Ui::Core::Forms::Dates::DatePickerField.new(attribute_name, options, input_html_options).render
8
8
  end
9
9
 
10
10
  end
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class DropdownSelectInput < SimpleForm::Inputs::CollectionInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Selects
4
4
 
5
5
  def input(wrapper_options)
6
6
  label_method, value_method = detect_collection_methods
7
- i = UiBibz::Ui::Core::Inputs::DropdownSelectField.new(attribute_name, options, input_html_options)
7
+ i = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(attribute_name, options, input_html_options)
8
8
 
9
9
  if options[:grouped] == true
10
10
  @builder.grouped_collection_select(
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class FormulaInput < SimpleForm::Inputs::StringInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Numbers
4
4
 
5
5
  def input(wrapper_options)
6
6
  options = @options.merge({ builder: @builder })
7
- UiBibz::Ui::Core::Inputs::FormulaField.new(attribute_name, options, input_html_options).render
7
+ UiBibz::Ui::Core::Forms::Numbers::FormulaField.new(attribute_name, options, input_html_options).render
8
8
  end
9
9
 
10
10
  end
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class MarkdownEditorInput < SimpleForm::Inputs::StringInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Textareas
4
4
 
5
5
  def input(wrapper_options)
6
6
  options = @options.merge({ builder: @builder })
7
- UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(attribute_name, options, input_html_options).render
7
+ UiBibz::Ui::Core::Forms::Textareas::MarkdownEditorField.new(attribute_name, options, input_html_options).render
8
8
  end
9
9
 
10
10
  end
@@ -1,11 +1,11 @@
1
1
  module CustomInputs
2
2
  # multi_column_input manages collection and grouped_collection
3
3
  class MultiColumnInput < SimpleForm::Inputs::CollectionInput
4
- include UiBibz::Ui::Core::Inputs
4
+ include UiBibz::Ui::Core::Forms::Selects
5
5
 
6
6
  def input(wrapper_options)
7
7
  label_method, value_method = detect_collection_methods
8
- i = UiBibz::Ui::Core::Inputs::MultiColumnField.new(attribute_name, options, input_html_options)
8
+ i = UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(attribute_name, options, input_html_options)
9
9
 
10
10
  input_options.delete(:prompt)
11
11
  input_options.merge!({include_blank: false})
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class MultiSelectInput < SimpleForm::Inputs::CollectionInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Selects
4
4
 
5
5
  def input(wrapper_options)
6
6
  label_method, value_method = detect_collection_methods
7
- i = UiBibz::Ui::Core::Inputs::MultiSelectField.new(attribute_name, options, input_html_options)
7
+ i = UiBibz::Ui::Core::Forms::Selects::MultiSelectField.new(attribute_name, options, input_html_options)
8
8
 
9
9
  @builder.collection_select(
10
10
  attribute_name, collection, value_method, label_method,
@@ -0,0 +1,20 @@
1
+ module CustomInputs
2
+ class RadiosInput < SimpleForm::Inputs::CollectionRadioButtonsInput
3
+ include UiBibz::Ui::Core::Forms::Choices
4
+
5
+ def input(wrapper_options)
6
+ i = UiBibz::Ui::Core::Forms::Choices::RadioField.new(attribute_name, options, input_html_options)
7
+ options[:item_wrapper_tag] = :div
8
+ options[:item_wrapper_class] = i.html_options[:class]
9
+
10
+ label_method, value_method = detect_collection_methods
11
+
12
+ @builder.send(:"collection_radio_buttons",
13
+ attribute_name, collection, value_method, label_method,
14
+ input_options, i.html_options,
15
+ &collection_block_for_nested_boolean_style
16
+ )
17
+ end
18
+
19
+ end
20
+ end
@@ -1,10 +1,10 @@
1
1
  module CustomInputs
2
2
  class SurroundInput < SimpleForm::Inputs::StringInput
3
- include UiBibz::Ui::Core::Inputs
3
+ include UiBibz::Ui::Core::Forms::Texts
4
4
 
5
5
  def input(wrapper_options)
6
6
  options = @options.merge({ builder: @builder })
7
- UiBibz::Ui::Core::Inputs::SurroundField.new(attribute_name, options, input_html_options).render
7
+ UiBibz::Ui::Core::Forms::Texts::SurroundField.new(attribute_name, options, input_html_options).render
8
8
  end
9
9
 
10
10
  end