ui_bibz 2.0.0.beta2.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -7
- data/Gemfile.lock +63 -63
- data/app/assets/javascripts/interface.coffee +6 -1
- data/app/assets/javascripts/ui_bibz.coffee +1 -0
- data/app/assets/stylesheets/_custom_variables.sass +20 -0
- data/app/assets/stylesheets/_panel.scss +314 -0
- data/app/assets/stylesheets/boxes.sass +5 -0
- data/app/assets/stylesheets/containers.sass +2 -0
- data/app/assets/stylesheets/fix-bootstrap-4.sass +4 -0
- data/app/assets/stylesheets/fix-dropdown-select.sass +1 -0
- data/app/assets/stylesheets/fix_addon.sass +187 -0
- data/app/assets/stylesheets/forms.sass +60 -0
- data/app/assets/stylesheets/navigations.sass +11 -0
- data/app/assets/stylesheets/notifications.sass +10 -0
- data/app/assets/stylesheets/{table.sass → tables.sass} +0 -0
- data/app/assets/stylesheets/ui_bibz.sass +11 -91
- data/config/initializers/ui_bibz.rb +6 -4
- data/lib/ui_bibz.rb +5 -0
- data/lib/ui_bibz/helpers/ui/ux_helper.rb +4 -0
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +38 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/auto_complete_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/base_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/collection_input.rb +15 -11
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/string_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_auto_complete_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_choice_group_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_date_picker_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_dropdown_select_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_formula_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_markdown_editor_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_multi_column_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_multi_select_field_input.rb +0 -0
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_number_field_input.rb +10 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_radio_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_select_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_switch_field_input.rb +0 -0
- data/{app → lib/ui_bibz}/inputs/ui_bibz_inputs/ui_text_field_input.rb +0 -0
- data/lib/ui_bibz/rails/engine.rb +3 -9
- data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/body/card_body_link.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/body/card_body_text.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/body/card_body_title.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_footer.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_header.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_image.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/jumbotron.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +34 -3
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +11 -7
- data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +5 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/choices/switch_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_header.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/split_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +7 -2
- data/lib/ui_bibz/ui/core/forms/numbers/number_field.rb +63 -0
- data/lib/ui_bibz/ui/core/forms/selects/abstract_select.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/selects/select_field.rb +5 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_addon.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_refresh.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/texts/text_field.rb +7 -3
- data/lib/ui_bibz/ui/core/icons/glyph.rb +10 -2
- data/lib/ui_bibz/ui/core/icons/star.rb +1 -1
- data/lib/ui_bibz/ui/core/layouts/col.rb +1 -1
- data/lib/ui_bibz/ui/core/layouts/container.rb +1 -1
- data/lib/ui_bibz/ui/core/layouts/row.rb +1 -1
- data/lib/ui_bibz/ui/core/lists/components/list.rb +1 -1
- data/lib/ui_bibz/ui/core/lists/components/list/list_body.rb +1 -1
- data/lib/ui_bibz/ui/core/lists/components/list/list_header.rb +1 -1
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/breadcrumb_link.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/components/nav_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_link.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_link.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_list.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_text.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/navbar_brand.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +19 -17
- data/lib/ui_bibz/ui/core/navigations/components/navbar_text.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/pagination_link.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/link.rb +8 -2
- data/lib/ui_bibz/ui/core/navigations/nav.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +10 -5
- data/lib/ui_bibz/ui/core/navigations/pagination.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -8
- data/lib/ui_bibz/ui/core/notifications/alert.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/badge.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/components/alert_body.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/components/alert_header.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/components/bar.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +1 -1
- data/lib/ui_bibz/ui/core/windows/components/modal_body.rb +1 -1
- data/lib/ui_bibz/ui/core/windows/components/modal_footer.rb +1 -1
- data/lib/ui_bibz/ui/core/windows/components/modal_header.rb +1 -1
- data/lib/ui_bibz/ui/core/windows/modal.rb +1 -1
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +22 -4
- data/lib/ui_bibz/ui/ux/containers/components/panel_body.rb +51 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +48 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +50 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_footer.rb +52 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +46 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +61 -0
- data/lib/ui_bibz/ui/ux/containers/components/panel_toolbar.rb +38 -0
- data/lib/ui_bibz/ui/ux/containers/panel.rb +104 -0
- data/lib/ui_bibz/ui/ux/tables/components/thead.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_card.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/lib/ui_bibz/utils/internationalization.rb +3 -0
- data/lib/ui_bibz/version.rb +1 -1
- data/test/factories/user.rb +1 -1
- data/test/simple_form_test.rb +2 -2
- data/test/support/factory_bot.rb +9 -0
- data/test/test_helper.rb +0 -1
- data/test/ui/core/boxes/card_test.rb +1 -1
- data/test/ui/core/component_test.rb +8 -1
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +2 -2
- data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
- data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
- data/test/ui/core/forms/selects/dropdown_select_field_test.rb +1 -1
- data/test/ui/core/forms/selects/multi_select_field_test.rb +1 -1
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +3 -3
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/forms/texts/text_field_test.rb +1 -1
- data/test/ui/core/icons/glyph_test.rb +6 -4
- data/test/ui/core/icons/star_test.rb +6 -6
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/navbar_test.rb +1 -1
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +2 -2
- data/test/ui/ux/containers/panel_test.rb +143 -0
- data/test/ui/ux/tables/table_test.rb +3 -3
- data/ui_bibz.gemspec +3 -12
- data/vendor/assets/javascripts/bootstrap-markdown.js +12 -12
- data/vendor/assets/javascripts/jquery-ui.min.js +6 -0
- data/vendor/assets/stylesheets/jquery-ui.min.css +6 -0
- metadata +63 -27
- data/app/inputs/ui_bibz_form/ui_bibz_form_builder.rb +0 -36
- data/test/support/factory_girl.rb +0 -6
@@ -0,0 +1,38 @@
|
|
1
|
+
module UiBibzForm
|
2
|
+
if defined?(SimpleForm)
|
3
|
+
class UiBibzFormBuilder < SimpleForm::FormBuilder
|
4
|
+
include ActionView::Helpers::TagHelper
|
5
|
+
include ActionView::Helpers::TextHelper
|
6
|
+
include UiBibz::Utils
|
7
|
+
|
8
|
+
attr_accessor :output_buffer
|
9
|
+
|
10
|
+
def ui_surround_field content = nil, opts = nil, html_options = nil, &block
|
11
|
+
content = (options || {}).merge(content || {})
|
12
|
+
content = content.merge(template: @template, form: self)
|
13
|
+
|
14
|
+
input_classes = UiBibz::Utils::Screwdriver.join_classes('form-group', 'surround_field', options[:input_html].try(:[], :class))
|
15
|
+
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
16
|
+
|
17
|
+
content_tag :div, wrapper_html do
|
18
|
+
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
19
|
+
concat UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&block).render
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def ui_button_group content = nil, opts = nil, html_options = nil, &block
|
24
|
+
content = (options || {}).merge(content || {})
|
25
|
+
content = content.merge(template: @template, form: self)
|
26
|
+
|
27
|
+
input_classes = UiBibz::Utils::Screwdriver.join_classes('button_group', options[:input_html].try(:[], :class))
|
28
|
+
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
29
|
+
|
30
|
+
content_tag :div, wrapper_html do
|
31
|
+
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
32
|
+
concat UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, opts, html_options).tap(&block).render
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
File without changes
|
File without changes
|
@@ -17,17 +17,21 @@ module UiBibzInputs
|
|
17
17
|
def new_options
|
18
18
|
label_method, value_method = detect_collection_methods
|
19
19
|
|
20
|
-
if options[:
|
21
|
-
options
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
if options[:option_tags].nil?
|
21
|
+
if options[:grouped] == true
|
22
|
+
options.merge({ option_tags: option_groups_from_collection_for_select(
|
23
|
+
grouped_collection,
|
24
|
+
group_method, group_label_method,
|
25
|
+
value_method, label_method,
|
26
|
+
new_value
|
27
|
+
)})
|
28
|
+
else
|
29
|
+
options.merge({ option_tags: options_from_collection_for_select(
|
30
|
+
collection, value_method, label_method, new_value
|
31
|
+
)})
|
32
|
+
end
|
27
33
|
else
|
28
|
-
options
|
29
|
-
collection, value_method, label_method, new_value
|
30
|
-
)})
|
34
|
+
options
|
31
35
|
end
|
32
36
|
end
|
33
37
|
|
@@ -51,7 +55,7 @@ module UiBibzInputs
|
|
51
55
|
end
|
52
56
|
|
53
57
|
def input_attribute_name
|
54
|
-
"#{ @builder.object.class.to_s.underscore }[#{ attribute_name }]"
|
58
|
+
"#{ @builder.object.class.to_s.parameterize.underscore }[#{ attribute_name }]"
|
55
59
|
end
|
56
60
|
|
57
61
|
def collection
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module UiBibzInputs
|
2
|
+
class UiNumberFieldInput < UiTextFieldInput
|
3
|
+
include UiBibz::Ui::Core::Forms::Numbers
|
4
|
+
|
5
|
+
def input(wrapper_options)
|
6
|
+
UiBibz::Ui::Core::Forms::Numbers::NumberField.new(input_attribute_name, options, input_html_options).render
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/ui_bibz/rails/engine.rb
CHANGED
@@ -4,15 +4,7 @@ require 'jquery-rails'
|
|
4
4
|
require 'popper_js'
|
5
5
|
require 'bootstrap'
|
6
6
|
require "font-awesome-sass"
|
7
|
-
|
8
|
-
# Javascript requires
|
9
|
-
#require 'rails-assets-tether'
|
10
|
-
#require 'rails-assets-bootstrap-datepicker'
|
11
|
-
#require 'rails-assets-bootstrap-select'
|
12
|
-
#
|
13
|
-
# not compatible with boostrap 4
|
14
|
-
#require 'rails-assets-bootstrap-switch'
|
15
|
-
#require 'rails-assets-bootstrap-multiselect'
|
7
|
+
require 'simple_form' if system('gem list -i simple_form')
|
16
8
|
|
17
9
|
module UiBibz
|
18
10
|
module Rails
|
@@ -26,6 +18,8 @@ module UiBibz
|
|
26
18
|
ActionView::Base.send :include, UiBibz::Helpers::Ui::UxHelper
|
27
19
|
end
|
28
20
|
|
21
|
+
config.autoload_paths += Dir["#{config.root}/lib/ui_bibz/inputs/**/"] if defined?(::SimpleForm)
|
22
|
+
|
29
23
|
end
|
30
24
|
end
|
31
25
|
end
|
@@ -52,8 +52,13 @@ module UiBibz::Ui::Core
|
|
52
52
|
def initialize content = nil, options = nil, html_options = nil, &block
|
53
53
|
if !block.nil?
|
54
54
|
@html_options, @options = options, content
|
55
|
-
|
56
|
-
|
55
|
+
read_cache = Rails.cache.read(@options.try(:[], :cache))
|
56
|
+
if read_cache.nil?
|
57
|
+
context = eval("self", block.binding)
|
58
|
+
@content = context.capture(&block)
|
59
|
+
else
|
60
|
+
@content = read_cache
|
61
|
+
end
|
57
62
|
else
|
58
63
|
if content.kind_of?(Hash)
|
59
64
|
@html_options, @options = options, content
|
@@ -67,8 +72,13 @@ module UiBibz::Ui::Core
|
|
67
72
|
init_component_html_options
|
68
73
|
end
|
69
74
|
|
70
|
-
# Render html tag
|
75
|
+
# Render html tag with or without cache
|
71
76
|
def render
|
77
|
+
render_with_or_without_cache
|
78
|
+
end
|
79
|
+
|
80
|
+
# Render without cache
|
81
|
+
def pre_render
|
72
82
|
glyph_and_content_html
|
73
83
|
end
|
74
84
|
|
@@ -87,6 +97,12 @@ module UiBibz::Ui::Core
|
|
87
97
|
|
88
98
|
# Override this method to add html data
|
89
99
|
def component_html_data
|
100
|
+
# To stimulusjs
|
101
|
+
add_html_data :target, options.try(:delete, :target)
|
102
|
+
add_html_data :controller, options.try(:delete, :controller)
|
103
|
+
add_html_data :action, options.try(:delete, :action)
|
104
|
+
# To turbolinks
|
105
|
+
add_html_data :turbolinks, options.try(:delete, :turbolinks)
|
90
106
|
end
|
91
107
|
|
92
108
|
# Override this method to add html Options
|
@@ -115,6 +131,21 @@ module UiBibz::Ui::Core
|
|
115
131
|
|
116
132
|
private
|
117
133
|
|
134
|
+
def render_with_or_without_cache
|
135
|
+
if options[:cache]
|
136
|
+
cache = Rails.cache
|
137
|
+
read_cache = cache.read(options[:cache])
|
138
|
+
if read_cache
|
139
|
+
read_cache
|
140
|
+
else
|
141
|
+
cache.write(options[:cache], pre_render)
|
142
|
+
pre_render
|
143
|
+
end
|
144
|
+
else
|
145
|
+
pre_render
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
118
149
|
def init_options
|
119
150
|
@options = component_options.merge(@options)
|
120
151
|
end
|
@@ -57,7 +57,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
57
57
|
end
|
58
58
|
|
59
59
|
# Render html tag
|
60
|
-
def
|
60
|
+
def pre_render
|
61
61
|
button_html_tag
|
62
62
|
end
|
63
63
|
|
@@ -65,7 +65,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
65
65
|
|
66
66
|
def button_html_tag
|
67
67
|
content_tag :button, html_options do
|
68
|
-
concat glyph_and_content_html(options[:text].nil? ? @content : '
|
68
|
+
concat glyph_and_content_html(options[:text].nil? ? @content : '')
|
69
69
|
concat badge_html unless options[:badge].nil?
|
70
70
|
end
|
71
71
|
end
|
@@ -78,11 +78,15 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
78
78
|
opts = super
|
79
79
|
opts = opts.merge(toggle) unless options[:toggle].nil?
|
80
80
|
opts = opts.merge(active_html_options) if options[:state] == :active
|
81
|
-
opts = opts.merge(html_title) if options[:text] == false
|
82
81
|
opts = opts.merge({ disabled: 'disabled' }) if options[:state] == :disabled
|
83
82
|
opts
|
84
83
|
end
|
85
84
|
|
85
|
+
def component_html_data
|
86
|
+
super
|
87
|
+
action
|
88
|
+
end
|
89
|
+
|
86
90
|
def status
|
87
91
|
["btn", outline, options[:status]].compact.join('-')
|
88
92
|
end
|
@@ -91,10 +95,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
91
95
|
"outline" unless options[:outline].nil?
|
92
96
|
end
|
93
97
|
|
94
|
-
def html_title
|
95
|
-
{ title: content }
|
96
|
-
end
|
97
|
-
|
98
98
|
def toggle
|
99
99
|
{ "data-toggle" => 'button', "aria-pressed" => false, "autocomplete" => "off" }
|
100
100
|
end
|
@@ -111,6 +111,10 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
111
111
|
"without-text" unless options[:text].nil?
|
112
112
|
end
|
113
113
|
|
114
|
+
def action
|
115
|
+
add_html_data('action', options[:action]) unless options[:action].nil?
|
116
|
+
end
|
117
|
+
|
114
118
|
def badge_html
|
115
119
|
if options[:badge].kind_of? Hash
|
116
120
|
options[:badge][:status] = options[:badge][:status] || options[:status] || :secondary
|
@@ -51,7 +51,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# Render html tag
|
54
|
-
def
|
54
|
+
def pre_render
|
55
55
|
content_tag :div, @items.join.html_safe, html_options
|
56
56
|
end
|
57
57
|
|
@@ -86,6 +86,10 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
86
86
|
@items << @options[:form].input(attribute_name, options.merge({ label: false, wrapper: false }), &block)
|
87
87
|
end
|
88
88
|
|
89
|
+
def html content = nil, options = nil, html_options = nil, &block
|
90
|
+
@items << UiBibz::Ui::Core::Component.new(content, options, html_options, &block).render
|
91
|
+
end
|
92
|
+
|
89
93
|
private
|
90
94
|
|
91
95
|
def component_html_classes
|
@@ -56,7 +56,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
56
56
|
super
|
57
57
|
end
|
58
58
|
|
59
|
-
def
|
59
|
+
def pre_render
|
60
60
|
button_refresh_html_tag
|
61
61
|
end
|
62
62
|
|
@@ -68,7 +68,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
68
68
|
|
69
69
|
def component_options
|
70
70
|
options[:connect] = cnt_opts
|
71
|
-
super.merge({ glyph: '
|
71
|
+
super.merge({ glyph: 'sync-alt', status: options[:status] })
|
72
72
|
end
|
73
73
|
|
74
74
|
def component_html_classes
|