ui_bibz 2.0.0.alpha10 → 2.0.0.alpha11

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 (163) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -7
  3. data/app/assets/stylesheets/table.sass +2 -0
  4. data/app/assets/stylesheets/ui_bibz.sass +0 -2
  5. data/lib/ui_bibz/ui/core/alert.rb +4 -4
  6. data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +2 -2
  7. data/lib/ui_bibz/ui/core/breadcrumb/components/breadcrumb_link.rb +2 -2
  8. data/lib/ui_bibz/ui/core/button/button.rb +10 -10
  9. data/lib/ui_bibz/ui/core/button/button_choice.rb +5 -5
  10. data/lib/ui_bibz/ui/core/button/button_dropdown.rb +3 -3
  11. data/lib/ui_bibz/ui/core/button/button_group.rb +5 -1
  12. data/lib/ui_bibz/ui/core/button/button_link.rb +2 -2
  13. data/lib/ui_bibz/ui/core/button/button_split_dropdown.rb +5 -5
  14. data/lib/ui_bibz/ui/core/card/card.rb +4 -4
  15. data/lib/ui_bibz/ui/core/card/components/block/card_block_text.rb +1 -1
  16. data/lib/ui_bibz/ui/core/component.rb +7 -7
  17. data/lib/ui_bibz/ui/core/dropdown/components/dropdown_link.rb +2 -2
  18. data/lib/ui_bibz/ui/core/dropdown/dropdown.rb +6 -6
  19. data/lib/ui_bibz/ui/core/glyph.rb +3 -3
  20. data/lib/ui_bibz/ui/core/input/autocomplete_field.rb +7 -1
  21. data/lib/ui_bibz/ui/core/input/dropdown_select_field.rb +2 -2
  22. data/lib/ui_bibz/ui/core/input/formula_field.rb +1 -1
  23. data/lib/ui_bibz/ui/core/input/multi_select_field.rb +2 -2
  24. data/lib/ui_bibz/ui/core/input/surround_field.rb +9 -1
  25. data/lib/ui_bibz/ui/core/input/switch_field.rb +4 -4
  26. data/lib/ui_bibz/ui/core/label.rb +4 -4
  27. data/lib/ui_bibz/ui/core/list/components/list.rb +7 -7
  28. data/lib/ui_bibz/ui/core/list/list_group.rb +5 -5
  29. data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +2 -2
  30. data/lib/ui_bibz/ui/core/nav/components/nav_link.rb +3 -3
  31. data/lib/ui_bibz/ui/core/nav/components/nav_link_link.rb +1 -1
  32. data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +1 -1
  33. data/lib/ui_bibz/ui/core/nav/nav.rb +1 -1
  34. data/lib/ui_bibz/ui/core/nav/navbar.rb +3 -3
  35. data/lib/ui_bibz/ui/core/progress.rb +5 -5
  36. data/lib/ui_bibz/ui/core/stars.rb +3 -3
  37. data/lib/ui_bibz/ui/ux/table/components/actions.rb +4 -0
  38. data/lib/ui_bibz/ui/ux/table/components/as.rb +8 -4
  39. data/lib/ui_bibz/ui/ux/table/components/column.rb +17 -16
  40. data/lib/ui_bibz/ui/ux/table/components/thead.rb +4 -4
  41. data/lib/ui_bibz/ui/ux/table/table.rb +8 -8
  42. data/lib/ui_bibz/ui/ux/table/table_card.rb +4 -4
  43. data/lib/ui_bibz/version.rb +1 -1
  44. data/test/dummy/db/schema.rb +1 -1
  45. data/test/ui/breadcrumb_test.rb +2 -2
  46. data/test/ui/button_test.rb +24 -24
  47. data/test/ui/card_test.rb +5 -5
  48. data/test/ui/component_test.rb +2 -2
  49. data/test/ui/dropdown_test.rb +1 -1
  50. data/test/ui/input_switch_field_test.rb +3 -3
  51. data/test/ui/inputs_test.rb +5 -5
  52. data/test/ui/list_group_test.rb +5 -5
  53. data/test/ui/nav_test.rb +3 -3
  54. data/test/ui/stars_test.rb +2 -2
  55. data/test/ui/table_test.rb +7 -7
  56. data/test/ui_helper_test.rb +16 -16
  57. data/ui_bibz.gemspec +2 -2
  58. metadata +5 -109
  59. data/doc/UiBibz.html +0 -129
  60. data/doc/UiBibz/Concerns.html +0 -115
  61. data/doc/UiBibz/Concerns/Models.html +0 -115
  62. data/doc/UiBibz/Concerns/Models/Searchable.html +0 -120
  63. data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +0 -174
  64. data/doc/UiBibz/Helpers.html +0 -115
  65. data/doc/UiBibz/Helpers/MetaHelper.html +0 -273
  66. data/doc/UiBibz/Helpers/UiCoreHelper.html +0 -1234
  67. data/doc/UiBibz/Helpers/UiUxHelper.html +0 -463
  68. data/doc/UiBibz/Helpers/UtilsHelper.html +0 -187
  69. data/doc/UiBibz/Rails.html +0 -115
  70. data/doc/UiBibz/Rails/Engine.html +0 -123
  71. data/doc/UiBibz/Ui.html +0 -119
  72. data/doc/UiBibz/Ui/Base.html +0 -304
  73. data/doc/UiBibz/Ui/Core.html +0 -128
  74. data/doc/UiBibz/Ui/Core/Alert.html +0 -383
  75. data/doc/UiBibz/Ui/Core/Bar.html +0 -372
  76. data/doc/UiBibz/Ui/Core/Breadcrumb.html +0 -442
  77. data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +0 -369
  78. data/doc/UiBibz/Ui/Core/Button.html +0 -380
  79. data/doc/UiBibz/Ui/Core/ButtonDropdown.html +0 -401
  80. data/doc/UiBibz/Ui/Core/ButtonGroup.html +0 -372
  81. data/doc/UiBibz/Ui/Core/ButtonLink.html +0 -382
  82. data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +0 -403
  83. data/doc/UiBibz/Ui/Core/Col.html +0 -373
  84. data/doc/UiBibz/Ui/Core/Component.html +0 -1087
  85. data/doc/UiBibz/Ui/Core/Dropdown.html +0 -663
  86. data/doc/UiBibz/Ui/Core/DropdownDivider.html +0 -301
  87. data/doc/UiBibz/Ui/Core/DropdownHeader.html +0 -355
  88. data/doc/UiBibz/Ui/Core/DropdownLink.html +0 -376
  89. data/doc/UiBibz/Ui/Core/DropdownList.html +0 -382
  90. data/doc/UiBibz/Ui/Core/Glyph.html +0 -385
  91. data/doc/UiBibz/Ui/Core/Jumbotron.html +0 -379
  92. data/doc/UiBibz/Ui/Core/Label.html +0 -379
  93. data/doc/UiBibz/Ui/Core/List.html +0 -528
  94. data/doc/UiBibz/Ui/Core/ListGroup.html +0 -474
  95. data/doc/UiBibz/Ui/Core/Modal.html +0 -543
  96. data/doc/UiBibz/Ui/Core/ModalBody.html +0 -353
  97. data/doc/UiBibz/Ui/Core/ModalFooter.html +0 -353
  98. data/doc/UiBibz/Ui/Core/ModalHeader.html +0 -359
  99. data/doc/UiBibz/Ui/Core/Nav.html +0 -515
  100. data/doc/UiBibz/Ui/Core/NavDropdown.html +0 -391
  101. data/doc/UiBibz/Ui/Core/NavLink.html +0 -364
  102. data/doc/UiBibz/Ui/Core/Navbar.html +0 -646
  103. data/doc/UiBibz/Ui/Core/NavbarForm.html +0 -364
  104. data/doc/UiBibz/Ui/Core/NavbarNav.html +0 -302
  105. data/doc/UiBibz/Ui/Core/NavbarText.html +0 -355
  106. data/doc/UiBibz/Ui/Core/Panel.html +0 -617
  107. data/doc/UiBibz/Ui/Core/ProgressBar.html +0 -462
  108. data/doc/UiBibz/Ui/Core/Row.html +0 -350
  109. data/doc/UiBibz/Ui/Core/Stars.html +0 -371
  110. data/doc/UiBibz/Ui/Ux.html +0 -128
  111. data/doc/UiBibz/Ui/Ux/Actionable.html +0 -478
  112. data/doc/UiBibz/Ui/Ux/Actions.html +0 -602
  113. data/doc/UiBibz/Ui/Ux/Column.html +0 -1249
  114. data/doc/UiBibz/Ui/Ux/Columns.html +0 -338
  115. data/doc/UiBibz/Ui/Ux/Grid.html +0 -485
  116. data/doc/UiBibz/Ui/Ux/Paginable.html +0 -381
  117. data/doc/UiBibz/Ui/Ux/Searchable.html +0 -376
  118. data/doc/UiBibz/Ui/Ux/Sortable.html +0 -300
  119. data/doc/UiBibz/Ui/Ux/Store.html +0 -1176
  120. data/doc/UiBibz/Ui/Ux/Table.html +0 -694
  121. data/doc/UiBibz/Ui/Ux/TableAction.html +0 -309
  122. data/doc/UiBibz/Ui/Ux/TablePagination.html +0 -342
  123. data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +0 -348
  124. data/doc/UiBibz/Ui/Ux/TablePanel.html +0 -680
  125. data/doc/UiBibz/Ui/Ux/TableSearchField.html +0 -304
  126. data/doc/UiBibz/Utils.html +0 -115
  127. data/doc/UiBibz/Utils/Internationalization.html +0 -262
  128. data/doc/_index.html +0 -706
  129. data/doc/class_list.html +0 -58
  130. data/doc/css/common.css +0 -1
  131. data/doc/css/full_list.css +0 -57
  132. data/doc/css/style.css +0 -339
  133. data/doc/file.README.html +0 -1261
  134. data/doc/file_list.html +0 -60
  135. data/doc/frames.html +0 -26
  136. data/doc/images/alert.png +0 -0
  137. data/doc/images/breadcrumb.png +0 -0
  138. data/doc/images/button.png +0 -0
  139. data/doc/images/button_dropdown.png +0 -0
  140. data/doc/images/button_group.png +0 -0
  141. data/doc/images/button_link.png +0 -0
  142. data/doc/images/button_split_dropdown.png +0 -0
  143. data/doc/images/etiquette.png +0 -0
  144. data/doc/images/glyph.png +0 -0
  145. data/doc/images/list.png +0 -0
  146. data/doc/images/modal.png +0 -0
  147. data/doc/images/nav.png +0 -0
  148. data/doc/images/navbar.png +0 -0
  149. data/doc/images/panel.png +0 -0
  150. data/doc/images/progress_bar.png +0 -0
  151. data/doc/images/stars.png +0 -0
  152. data/doc/images/table.png +0 -0
  153. data/doc/images/table_pagination_per_page.png +0 -0
  154. data/doc/images/table_panel.png +0 -0
  155. data/doc/images/table_search_field.png +0 -0
  156. data/doc/images/ui-bibz-logo-without-border.gif +0 -0
  157. data/doc/images/ui-bibz-logo.gif +0 -0
  158. data/doc/index.html +0 -1261
  159. data/doc/js/app.js +0 -219
  160. data/doc/js/full_list.js +0 -181
  161. data/doc/js/jquery.js +0 -4
  162. data/doc/method_list.html +0 -1329
  163. data/doc/top-level-namespace.html +0 -112
@@ -17,7 +17,7 @@ module UiBibz::Ui::Core
17
17
  # * +name+ - String
18
18
  # * +size+ - Integer
19
19
  # * +type+ - Symbol
20
- # * +state+ - Symbol
20
+ # * +status+ - Symbol
21
21
  # (+:secondary+, +:primary+, +:info+, +:warning+, +:danger+)
22
22
  #
23
23
  # ==== Signatures
@@ -120,8 +120,8 @@ module UiBibz::Ui::Core
120
120
  @options[:name] || @content
121
121
  end
122
122
 
123
- def state
124
- "glyph-#{ @options[:state] }" unless @options[:state].nil?
123
+ def status
124
+ "glyph-#{ @options[:status] }" unless @options[:status].nil?
125
125
  end
126
126
 
127
127
  end
@@ -67,7 +67,9 @@ module UiBibz::Ui::Core
67
67
  end
68
68
 
69
69
  def component_html_options
70
- { autocomplete: true, list: data_list_name }
70
+ args = { autocomplete: true, list: data_list_name }
71
+ args = args.merge(options[:state] == :disable ? { disabled: 'disabled' } : {})
72
+ args
71
73
  end
72
74
 
73
75
  def component_html_classes
@@ -78,5 +80,9 @@ module UiBibz::Ui::Core
78
80
  @datalist ||= "#{ html_options[:id] || content }-datalist"
79
81
  end
80
82
 
83
+ def status
84
+ "form-control-#{ options[:status] }" if options[:status]
85
+ end
86
+
81
87
  end
82
88
  end
@@ -15,7 +15,7 @@ module UiBibz::Ui::Core
15
15
  #
16
16
  # You can add HTML attributes using the +html_options+.
17
17
  # You can pass arguments in options attribute:
18
- # * +state+ - State of élement with symbol value:
18
+ # * +status+ - status of élement with symbol value:
19
19
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+, +:link+)
20
20
  # * option_tags - Array, Object [required]
21
21
  # * searchable - Boolean
@@ -91,7 +91,7 @@ module UiBibz::Ui::Core
91
91
  end
92
92
 
93
93
  def style
94
- add_html_data('style', "btn-#{ options[:state]}") if options[:style]
94
+ add_html_data('style', "btn-#{ options[:status]}") if options[:style]
95
95
  end
96
96
 
97
97
  def menu_size
@@ -77,7 +77,7 @@ module UiBibz::Ui::Core
77
77
 
78
78
  def formula_field_alert
79
79
  content_tag :span, class: 'formula_field_alert input-group-addon', data: { toggle: 'tooltip' } do
80
- UiBibz::Ui::Core::Glyph.new('exclamation-triangle', state: :danger ).render
80
+ UiBibz::Ui::Core::Glyph.new('exclamation-triangle', status: :danger ).render
81
81
  end
82
82
  end
83
83
 
@@ -86,8 +86,8 @@ module UiBibz::Ui::Core
86
86
  add_html_data('include_select_all_option') if options[:select_all_option]
87
87
  end
88
88
 
89
- def state
90
- options[:state] || 'btn-secondary'
89
+ def status
90
+ options[:status] || 'btn-secondary'
91
91
  end
92
92
 
93
93
  end
@@ -51,7 +51,7 @@ module UiBibz::Ui::Core
51
51
  if options[:append].nil? && options[:prepend].nil?
52
52
  text_field_input_tag
53
53
  else
54
- content_tag :div, class: join_classes('input-group', size) do
54
+ content_tag :div, class: join_classes('input-group', size, status) do
55
55
  concat content_tag :span, options[:append], class: 'input-group-addon' unless options[:append].nil?
56
56
  concat text_field_input_tag
57
57
  concat content_tag :span, options[:prepend], class: 'input-group-addon' unless options[:prepend].nil?
@@ -79,5 +79,13 @@ module UiBibz::Ui::Core
79
79
  "input-group-#{ options[:size] }" if options[:size]
80
80
  end
81
81
 
82
+ def status
83
+ "has-#{ options[:status] }" if options[:status]
84
+ end
85
+
86
+ def component_html_options
87
+ options[:state] == :disable ? { disabled: 'disabled' } : {}
88
+ end
89
+
82
90
  end
83
91
  end
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- # * +status+ - String
17
+ # * +state+ - String
18
18
  # * +animate+ - Boolean
19
19
  # * +on_color+ - String
20
20
  # * +off_color+ - String
@@ -70,7 +70,7 @@ module UiBibz::Ui::Core
70
70
 
71
71
  def component_html_data
72
72
  size
73
- status
73
+ state
74
74
  animate
75
75
  left_color
76
76
  right_color
@@ -94,8 +94,8 @@ module UiBibz::Ui::Core
94
94
  end
95
95
 
96
96
  # active, disabled => default : active
97
- def status
98
- html_options[:disabled] = true if options[:status] == 'disabled'
97
+ def state
98
+ html_options[:disabled] = true if options[:state] == 'disabled'
99
99
  end
100
100
 
101
101
  # 'primary', 'info', 'success', 'warning', 'danger', 'default' => default : default
@@ -15,7 +15,7 @@ module UiBibz::Ui::Core
15
15
  #
16
16
  # You can add HTML attributes using the +html_options+.
17
17
  # You can pass arguments in options attribute:
18
- # * +state+ - State of élement with symbol value:
18
+ # * +status+ - status of élement with symbol value:
19
19
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
20
20
  # * +glyph+ - Add glyph with name or hash options
21
21
  # * +name+ - String
@@ -34,7 +34,7 @@ module UiBibz::Ui::Core
34
34
  #
35
35
  # ==== Examples
36
36
  #
37
- # UiBibz::Ui::Core::Label.new(content, state: :success, type: :pill).render
37
+ # UiBibz::Ui::Core::Label.new(content, status: :success, type: :pill).render
38
38
  #
39
39
  # UiBibz::Ui::Core::Label.new() do
40
40
  # #content
@@ -66,8 +66,8 @@ module UiBibz::Ui::Core
66
66
  ['label', type]
67
67
  end
68
68
 
69
- def state
70
- sym = @options[:state] || :default
69
+ def status
70
+ sym = @options[:status] || :default
71
71
  "label-#{ sym }"
72
72
  end
73
73
 
@@ -16,11 +16,11 @@ module UiBibz::Ui::Core
16
16
  #
17
17
  # You can add HTML attributes using the +html_options+.
18
18
  # You can pass arguments in options attribute:
19
- # * +status+ - State of élement with symbol value:
19
+ # * +state+ - status of élement with symbol value:
20
20
  # (+:active+, +:disable+)
21
21
  # * +url+
22
22
  # * +tap+ - Boolean to add header and body
23
- # * +state+ - State of élement with symbol value:
23
+ # * +status+ - status of élement with symbol value:
24
24
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
25
25
  # * +glyph+ - Add glyph with name or hash options
26
26
  # * +name+ - String
@@ -42,13 +42,13 @@ module UiBibz::Ui::Core
42
42
  #
43
43
  # ==== Examples
44
44
  #
45
- # UiBibz::Ui::Core::List.new('Test', state: :success, url: '#test').render
45
+ # UiBibz::Ui::Core::List.new('Test', status: :success, url: '#test').render
46
46
  #
47
- # UiBibz::Ui::Core::List.new(state: :primary) do
47
+ # UiBibz::Ui::Core::List.new(status: :primary) do
48
48
  # 'Test 2'
49
49
  # end.render
50
50
  #
51
- # UiBibz::Ui::Core::List.new(tap: true, status: :active) do |l|
51
+ # UiBibz::Ui::Core::List.new(tap: true, state: :active) do |l|
52
52
  # l.header 'My title', nil, class: 'my-title'
53
53
  # l.body do
54
54
  # 'My content'
@@ -116,8 +116,8 @@ module UiBibz::Ui::Core
116
116
  @options[:type] == :button || @html_options[:type] == :button
117
117
  end
118
118
 
119
- def state
120
- "list-group-item-#{ @options[:state] }" unless @options[:state].nil?
119
+ def status
120
+ "list-group-item-#{ @options[:status] }" unless @options[:status].nil?
121
121
  end
122
122
 
123
123
  end
@@ -29,16 +29,16 @@ module UiBibz::Ui::Core
29
29
  # ==== Examples
30
30
  #
31
31
  # UiBibz::Ui::Core::ListGroup.new().tap do |d|
32
- # d.list 'Test', state: :success
33
- # d.list 'Test2', state: :primary
32
+ # d.list 'Test', status: :success
33
+ # d.list 'Test2', status: :primary
34
34
  # end.render
35
35
  #
36
36
  # UiBibz::Ui::Core::ListGroup.new(type: :link).tap do |d|
37
- # d.list 'Test', state: :success, url: '#test'
38
- # d.list(state: :primary) do
37
+ # d.list 'Test', status: :success, url: '#test'
38
+ # d.list(status: :primary) do
39
39
  # 'Test 2'
40
40
  # end
41
- # d.list(tap: true, status: :active) do |l|
41
+ # d.list(tap: true, state: :active) do |l|
42
42
  # l.header 'My title', nil, class: 'my-title'
43
43
  # l.body do
44
44
  # 'My content'
@@ -15,7 +15,7 @@ module UiBibz::Ui::Core
15
15
  #
16
16
  # You can add HTML attributes using the +html_options+.
17
17
  # You can pass arguments in options attribute:
18
- # * +state+ - State of élement with symbol value:
18
+ # * +status+ - status of élement with symbol value:
19
19
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
20
20
  # * +size+
21
21
  # (+:xs+, +:sm+, +:lg+)
@@ -36,7 +36,7 @@ module UiBibz::Ui::Core
36
36
  #
37
37
  # ==== Examples
38
38
  #
39
- # UiBibz::Ui::Core::NavDropdown.new(name, state: :success).tap do |d|
39
+ # UiBibz::Ui::Core::NavDropdown.new(name, status: :success).tap do |d|
40
40
  # d.list link_to('test', '#')
41
41
  # d.list link_to('test2', '#')
42
42
  # end.render
@@ -16,7 +16,7 @@ module UiBibz::Ui::Core
16
16
  #
17
17
  # You can add HTML attributes using the +html_options+.
18
18
  # You can pass arguments in options attribute:
19
- # * +status+ - State of élement with symbol value:
19
+ # * +state+ - status of élement with symbol value:
20
20
  # (+:active+)
21
21
  # * +url+ - String
22
22
  # * +badge+ - String
@@ -32,7 +32,7 @@ module UiBibz::Ui::Core
32
32
  #
33
33
  # ==== Examples
34
34
  #
35
- # UiBibz::Ui::Core::NavLink.new(content, { badge: 15, url: '/', status: :active, link_html_options: { class: 'link1' }},{ class: 'test' }).render
35
+ # UiBibz::Ui::Core::NavLink.new(content, { badge: 15, url: '/', state: :active, link_html_options: { class: 'link1' }},{ class: 'test' }).render
36
36
  #
37
37
  # UiBibz::Ui::Core::NavLink.new({glyph: { name: 'eye', size: 3 }, { class: 'test' }) do
38
38
  # 'Home'
@@ -51,7 +51,7 @@ module UiBibz::Ui::Core
51
51
  if options[:nav_type] == "nav-links"
52
52
  content_htm
53
53
  else
54
- options.delete(:status)
54
+ options.delete(:state)
55
55
  UiBibz::Ui::Core::NavLinkList.new(content_htm, options).render
56
56
  end
57
57
  end
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- # * +status+ - State of élement with symbol value:
17
+ # * +state+ - status of élement with symbol value:
18
18
  # (+:active+)
19
19
  #
20
20
  class NavLinkLink < Component
@@ -33,7 +33,7 @@ module UiBibz::Ui::Core
33
33
  #
34
34
  # UiBibz::Ui::Core::NavbarNav.new().tap do |n|
35
35
  # n.link 'Test', url: '#test'
36
- # n.link 'Test2', url: '#test2', status: :active
36
+ # n.link 'Test2', url: '#test2', state: :active
37
37
  # end.render
38
38
  #
39
39
  class NavbarNav < Nav
@@ -35,7 +35,7 @@ module UiBibz::Ui::Core
35
35
  #
36
36
  # UiBibz::Ui::Core::Nav.new(type: :pills).tap do |n|
37
37
  # n.link 'Test', url: '#test'
38
- # n.link 'Test2', url: '#test2', status: :active
38
+ # n.link 'Test2', url: '#test2', state: :active
39
39
  # n.dropdown('Action') do |d|
40
40
  # d.list content = nil, options = nil, html_options = nil, &block
41
41
  # end
@@ -21,7 +21,7 @@ module UiBibz::Ui::Core
21
21
  # * +type+ - Symbol
22
22
  # (+:light+, +:dark+)
23
23
  # * +glyph+
24
- # * +state+
24
+ # * +status+
25
25
  # (+:secondary+, +:primary+, +:info+, +:warning+, +:danger+, +inverse+)
26
26
  # * +position+ - Symbol
27
27
  # (+:top+, +:bottom+)
@@ -149,8 +149,8 @@ module UiBibz::Ui::Core
149
149
  "navbar-#{ @options[:type] || 'light' }"
150
150
  end
151
151
 
152
- def state
153
- "bg-#{ @options[:state] }" unless @options[:state].nil?
152
+ def status
153
+ "bg-#{ @options[:status] }" unless @options[:status].nil?
154
154
  end
155
155
 
156
156
  end
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:secondary+, +:primary+, +:info+, +:warning+, +:danger+)
19
19
  # * +max+ - Max value (default: 100)
20
20
  # * +value+ - Value of percentage (default: content)
@@ -34,9 +34,9 @@ module UiBibz::Ui::Core
34
34
  #
35
35
  # UiBibz::Ui::Core::Progress.new(50%, { value: 50})
36
36
  # # or
37
- # UiBibz::Ui::Core::Progress.new(10%, { value: 10, state: :success },{ class: 'test' }).render
37
+ # UiBibz::Ui::Core::Progress.new(10%, { value: 10, status: :success },{ class: 'test' }).render
38
38
  # # or
39
- # UiBibz::Ui::Core::Progress.new({ value: 10, state: :success},{ class: 'test' }) do
39
+ # UiBibz::Ui::Core::Progress.new({ value: 10, status: :success},{ class: 'test' }) do
40
40
  # 10%
41
41
  # end.render
42
42
  #
@@ -90,8 +90,8 @@ module UiBibz::Ui::Core
90
90
  options[:value] || content.to_i
91
91
  end
92
92
 
93
- def state
94
- "progress-#{ options[:state] }" unless options[:state].nil?
93
+ def status
94
+ "progress-#{ options[:status] }" unless options[:status].nil?
95
95
  end
96
96
 
97
97
  end
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
19
19
  # * +num+ - Integer, number of stars
20
20
  #
@@ -28,7 +28,7 @@ module UiBibz::Ui::Core
28
28
  #
29
29
  # ==== Examples
30
30
  #
31
- # UiBibz::Ui::Core::Stars.new(content, state: :success).render
31
+ # UiBibz::Ui::Core::Stars.new(content, status: :success).render
32
32
  #
33
33
  # UiBibz::Ui::Core::Stars.new({ num: 10 }) do
34
34
  # #content
@@ -77,7 +77,7 @@ module UiBibz::Ui::Core
77
77
 
78
78
  def glyph_opts
79
79
  opts = {}
80
- opts = opts.merge({ state: options[:state] }) unless options[:state].nil?
80
+ opts = opts.merge({ status: options[:status] }) unless options[:status].nil?
81
81
  opts = opts.merge({ size: options[:size] }) unless options[:size].nil?
82
82
  opts
83
83
  end
@@ -23,6 +23,10 @@ module UiBibz::Ui::Ux
23
23
  @actions << UiBibz::Ui::Core::DropdownHeader.new(content, options, html_options, &block).render
24
24
  end
25
25
 
26
+ def html content
27
+ @actions << content
28
+ end
29
+
26
30
  def reset
27
31
  @actions = []
28
32
  end
@@ -4,10 +4,11 @@ module UiBibz::Ui::Ux
4
4
  #
5
5
  class As
6
6
 
7
- def initialize col, record, content
7
+ def initialize col, record, content, table_options
8
8
  @col = col
9
9
  @record = record
10
10
  @content = content
11
+ @form = table_options.try(:[], :form)
11
12
  end
12
13
 
13
14
  def render
@@ -16,6 +17,9 @@ module UiBibz::Ui::Ux
16
17
  boolean_render
17
18
  when :progress
18
19
  progress_render
20
+ when :input
21
+ inp_options = (@col.input_options || {}).merge({ label: false })
22
+ @form.input @col.data_index, inp_options
19
23
  end
20
24
  end
21
25
 
@@ -23,15 +27,15 @@ module UiBibz::Ui::Ux
23
27
 
24
28
  def boolean_render
25
29
  if @content == true
26
- glyph = UiBibz::Ui::Core::Glyph.new('check-circle', state: :success)
30
+ glyph = UiBibz::Ui::Core::Glyph.new('check-circle', status: :success)
27
31
  else
28
- glyph = UiBibz::Ui::Core::Glyph.new('minus-circle', state: :danger)
32
+ glyph = UiBibz::Ui::Core::Glyph.new('minus-circle', status: :danger)
29
33
  end
30
34
  glyph.render
31
35
  end
32
36
 
33
37
  def progress_render
34
- UiBibz::Ui::Core::Progress.new(@content, state: (@col.state || :primary)).render
38
+ UiBibz::Ui::Core::Progress.new(@content, status: (@col.status || :primary)).render
35
39
  end
36
40
 
37
41
  end
@@ -1,25 +1,26 @@
1
1
  module UiBibz::Ui::Ux
2
2
  class Column < UiBibz::Ui::Core::Component
3
3
 
4
- attr_accessor :hidden, :link, :state, :name, :class, :as, :data_index, :date_format, :sort, :format, :date_format, :count, :custom_sort, :parent, :id
4
+ attr_accessor :hidden, :link, :status, :name, :input_options, :class, :as, :data_index, :date_format, :sort, :format, :date_format, :count, :custom_sort, :parent, :id
5
5
 
6
6
  def initialize content = nil, options = nil, html_options = nil, &block
7
7
  super
8
- @data_index = @content
9
- @id = @options[:column_id] || @data_index
10
- @name = @options[:name]
11
- @link = @options[:link] # for show or edit action
12
- @order = @options[:order]
13
- @date_format = @options[:date_format]
14
- @sort = @options[:sort]
15
- @custom_sort = @options[:custom_sort]
16
- @parent = @options[:parent]
17
- @count = @options[:count]
18
- @as = @options[:as]
19
- @format = @options[:format]
20
- @class = @options[:class]
21
- @hidden = @options[:hidden]
22
- @state = @options[:state]
8
+ @data_index = @content
9
+ @id = @options[:column_id] || @data_index
10
+ @name = @options[:name]
11
+ @link = @options[:link] # for show or edit action
12
+ @order = @options[:order]
13
+ @date_format = @options[:date_format]
14
+ @sort = @options[:sort]
15
+ @custom_sort = @options[:custom_sort]
16
+ @parent = @options[:parent]
17
+ @count = @options[:count]
18
+ @as = @options[:as]
19
+ @format = @options[:format]
20
+ @class = @options[:class]
21
+ @hidden = @options[:hidden]
22
+ @input_options = @options[:input_options]
23
+ @status = @options[:status]
23
24
  end
24
25
 
25
26
  def linkable?