ui_bibz 2.3.5 → 2.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +44 -44
- data/app/assets/javascripts/interface.coffee +0 -3
- data/app/assets/stylesheets/navigations.sass +1 -1
- data/app/assets/stylesheets/notifications.sass +1 -1
- data/lib/ui_bibz/infos.rb +1 -1
- data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +3 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +9 -8
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +14 -15
- data/lib/ui_bibz/ui/core/navigations/components/navbar_brand.rb +5 -1
- data/lib/ui_bibz/ui/core/navigations/link.rb +10 -5
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +1 -1
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +8 -4
- data/lib/ui_bibz/utils/glyph_changer.rb +3 -3
- data/test/ui/core/component_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +4 -4
- data/test/ui/core/navigations/link_test.rb +2 -2
- data/test/ui/core/navigations/navbar_test.rb +4 -4
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-markdown.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3a05f2192bfbfe9c05a250aa2957e546d94057dc57c7af3853ea466644b0e9e
|
4
|
+
data.tar.gz: b40362d959e08bffa4a5e8b49f6fcb27dbc9f9da5eb0948513532f5a475a5b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d63248786dcaf8e956db8d0bb88b2e90a5198ad2e7dd18fda9fb680aa4bf6d6dac373e6f0dc2145fb95ba02f8391603aa676624f6c0080cefe32ad42d3a5f9c
|
7
|
+
data.tar.gz: 21e3af3c7b02b8c730439ee40d644c10832f41f76f9e390464c3066c7c9ab878406d64b65a9e577249e20fccd958a16eada21b94e32d768e70d7e01a83ae1999
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (2.3.
|
4
|
+
ui_bibz (2.3.6)
|
5
5
|
bootstrap (= 4.3.1)
|
6
6
|
haml
|
7
7
|
haml-rails
|
@@ -16,49 +16,49 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
actioncable (5.2.
|
20
|
-
actionpack (= 5.2.
|
19
|
+
actioncable (5.2.3)
|
20
|
+
actionpack (= 5.2.3)
|
21
21
|
nio4r (~> 2.0)
|
22
22
|
websocket-driver (>= 0.6.1)
|
23
|
-
actionmailer (5.2.
|
24
|
-
actionpack (= 5.2.
|
25
|
-
actionview (= 5.2.
|
26
|
-
activejob (= 5.2.
|
23
|
+
actionmailer (5.2.3)
|
24
|
+
actionpack (= 5.2.3)
|
25
|
+
actionview (= 5.2.3)
|
26
|
+
activejob (= 5.2.3)
|
27
27
|
mail (~> 2.5, >= 2.5.4)
|
28
28
|
rails-dom-testing (~> 2.0)
|
29
|
-
actionpack (5.2.
|
30
|
-
actionview (= 5.2.
|
31
|
-
activesupport (= 5.2.
|
29
|
+
actionpack (5.2.3)
|
30
|
+
actionview (= 5.2.3)
|
31
|
+
activesupport (= 5.2.3)
|
32
32
|
rack (~> 2.0)
|
33
33
|
rack-test (>= 0.6.3)
|
34
34
|
rails-dom-testing (~> 2.0)
|
35
35
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
36
|
-
actionview (5.2.
|
37
|
-
activesupport (= 5.2.
|
36
|
+
actionview (5.2.3)
|
37
|
+
activesupport (= 5.2.3)
|
38
38
|
builder (~> 3.1)
|
39
39
|
erubi (~> 1.4)
|
40
40
|
rails-dom-testing (~> 2.0)
|
41
41
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
42
|
-
activejob (5.2.
|
43
|
-
activesupport (= 5.2.
|
42
|
+
activejob (5.2.3)
|
43
|
+
activesupport (= 5.2.3)
|
44
44
|
globalid (>= 0.3.6)
|
45
|
-
activemodel (5.2.
|
46
|
-
activesupport (= 5.2.
|
47
|
-
activerecord (5.2.
|
48
|
-
activemodel (= 5.2.
|
49
|
-
activesupport (= 5.2.
|
45
|
+
activemodel (5.2.3)
|
46
|
+
activesupport (= 5.2.3)
|
47
|
+
activerecord (5.2.3)
|
48
|
+
activemodel (= 5.2.3)
|
49
|
+
activesupport (= 5.2.3)
|
50
50
|
arel (>= 9.0)
|
51
|
-
activestorage (5.2.
|
52
|
-
actionpack (= 5.2.
|
53
|
-
activerecord (= 5.2.
|
51
|
+
activestorage (5.2.3)
|
52
|
+
actionpack (= 5.2.3)
|
53
|
+
activerecord (= 5.2.3)
|
54
54
|
marcel (~> 0.3.1)
|
55
|
-
activesupport (5.2.
|
55
|
+
activesupport (5.2.3)
|
56
56
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
57
57
|
i18n (>= 0.7, < 2)
|
58
58
|
minitest (~> 5.1)
|
59
59
|
tzinfo (~> 1.1)
|
60
60
|
arel (9.0.0)
|
61
|
-
autoprefixer-rails (9.
|
61
|
+
autoprefixer-rails (9.5.1)
|
62
62
|
execjs
|
63
63
|
awesome_print (1.8.0)
|
64
64
|
bootstrap (4.3.1)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
popper_js (>= 1.14.3, < 2)
|
67
67
|
sassc-rails (>= 2.0.0)
|
68
68
|
builder (3.2.3)
|
69
|
-
byebug (11.0.
|
69
|
+
byebug (11.0.1)
|
70
70
|
codeclimate-test-reporter (1.0.7)
|
71
71
|
simplecov
|
72
72
|
concurrent-ruby (1.1.5)
|
@@ -117,33 +117,33 @@ GEM
|
|
117
117
|
mini_portile2 (2.4.0)
|
118
118
|
minitest (5.11.3)
|
119
119
|
nio4r (2.3.1)
|
120
|
-
nokogiri (1.10.
|
120
|
+
nokogiri (1.10.2)
|
121
121
|
mini_portile2 (~> 2.4.0)
|
122
122
|
popper_js (1.14.5)
|
123
|
-
rack (2.0.
|
123
|
+
rack (2.0.7)
|
124
124
|
rack-test (1.1.0)
|
125
125
|
rack (>= 1.0, < 3)
|
126
|
-
rails (5.2.
|
127
|
-
actioncable (= 5.2.
|
128
|
-
actionmailer (= 5.2.
|
129
|
-
actionpack (= 5.2.
|
130
|
-
actionview (= 5.2.
|
131
|
-
activejob (= 5.2.
|
132
|
-
activemodel (= 5.2.
|
133
|
-
activerecord (= 5.2.
|
134
|
-
activestorage (= 5.2.
|
135
|
-
activesupport (= 5.2.
|
126
|
+
rails (5.2.3)
|
127
|
+
actioncable (= 5.2.3)
|
128
|
+
actionmailer (= 5.2.3)
|
129
|
+
actionpack (= 5.2.3)
|
130
|
+
actionview (= 5.2.3)
|
131
|
+
activejob (= 5.2.3)
|
132
|
+
activemodel (= 5.2.3)
|
133
|
+
activerecord (= 5.2.3)
|
134
|
+
activestorage (= 5.2.3)
|
135
|
+
activesupport (= 5.2.3)
|
136
136
|
bundler (>= 1.3.0)
|
137
|
-
railties (= 5.2.
|
137
|
+
railties (= 5.2.3)
|
138
138
|
sprockets-rails (>= 2.0.0)
|
139
139
|
rails-dom-testing (2.0.3)
|
140
140
|
activesupport (>= 4.2.0)
|
141
141
|
nokogiri (>= 1.6)
|
142
142
|
rails-html-sanitizer (1.0.4)
|
143
143
|
loofah (~> 2.2, >= 2.2.2)
|
144
|
-
railties (5.2.
|
145
|
-
actionpack (= 5.2.
|
146
|
-
activesupport (= 5.2.
|
144
|
+
railties (5.2.3)
|
145
|
+
actionpack (= 5.2.3)
|
146
|
+
activesupport (= 5.2.3)
|
147
147
|
method_source
|
148
148
|
rake (>= 0.8.7)
|
149
149
|
thor (>= 0.19.0, < 2.0)
|
@@ -151,9 +151,9 @@ GEM
|
|
151
151
|
rb-fsevent (0.10.3)
|
152
152
|
rb-inotify (0.10.0)
|
153
153
|
ffi (~> 1.0)
|
154
|
-
ruby_parser (3.13.
|
154
|
+
ruby_parser (3.13.1)
|
155
155
|
sexp_processor (~> 4.9)
|
156
|
-
sass (3.7.
|
156
|
+
sass (3.7.4)
|
157
157
|
sass-listen (~> 4.0.0)
|
158
158
|
sass-listen (4.0.0)
|
159
159
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
@@ -200,7 +200,7 @@ GEM
|
|
200
200
|
websocket-extensions (>= 0.1.0)
|
201
201
|
websocket-extensions (0.1.3)
|
202
202
|
will-paginate-i18n (0.1.15)
|
203
|
-
will_paginate (3.1.
|
203
|
+
will_paginate (3.1.7)
|
204
204
|
will_paginate-bootstrap4 (0.2.2)
|
205
205
|
will_paginate (~> 3.0, >= 3.0.0)
|
206
206
|
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module UiBibz
|
2
2
|
NAME = "Ui Bibz"
|
3
|
-
VERSION = "2.3.
|
3
|
+
VERSION = "2.3.6"
|
4
4
|
DESCRIPTION = "A Rails Interface Framework using Bootstrap."
|
5
5
|
SUMMARY = "Create your project with Ui Bibz. Over a thirty reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more."
|
6
6
|
LICENSE = "MIT"
|
@@ -55,7 +55,9 @@ module UiBibzInputs
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def input_attribute_name
|
58
|
-
"#{ @builder.
|
58
|
+
new_attribute_name = "#{ @builder.lookup_model_names.first }"
|
59
|
+
new_attribute_name += "[#{ @builder.lookup_model_names.second }_attributes]" if @builder.lookup_model_names.second
|
60
|
+
new_attribute_name += "[#{ attribute_name }]"
|
59
61
|
end
|
60
62
|
|
61
63
|
def collection
|
@@ -21,6 +21,8 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
21
21
|
# * +outline+ - Boolean
|
22
22
|
# * +state+ - Symbol (+:active+, +:disabled)
|
23
23
|
# * +type+ - Symbol (+:outline)
|
24
|
+
# * +collapse+ - String
|
25
|
+
# * +expand_collaspe+ - Boolean
|
24
26
|
# * +glyph+ - Add glyph with name or hash options
|
25
27
|
# * +name+ - String
|
26
28
|
# * +size+ - Integer
|
@@ -51,11 +53,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
51
53
|
# end
|
52
54
|
class Button < UiBibz::Ui::Core::Component
|
53
55
|
|
54
|
-
# See UiBibz::Ui::Core::Component.initialize
|
55
|
-
def initialize content = nil, options = nil, html_options = nil, &block
|
56
|
-
super
|
57
|
-
end
|
58
|
-
|
59
56
|
# Render html tag
|
60
57
|
def pre_render
|
61
58
|
button_html_tag
|
@@ -85,9 +82,13 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
85
82
|
end
|
86
83
|
|
87
84
|
def collapse
|
88
|
-
|
89
|
-
|
90
|
-
|
85
|
+
# Must be flat hash not deep hash
|
86
|
+
{
|
87
|
+
"data-toggle": :collapse,
|
88
|
+
"data-target": "##{ options[:collapse] }",
|
89
|
+
"aria-controls": options[:collapse],
|
90
|
+
"aria-expanded": options[:expand_collapse].nil? ? false : options[:expand_collapse]
|
91
|
+
}
|
91
92
|
end
|
92
93
|
|
93
94
|
def status
|
@@ -53,11 +53,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
53
53
|
#
|
54
54
|
class ButtonLink < UiBibz::Ui::Core::Forms::Buttons::Button
|
55
55
|
|
56
|
-
# See UiBibz::Ui::Core::Forms::Buttons::Button
|
57
|
-
def initialize content = nil, options = nil, html_options = nil, &block
|
58
|
-
super
|
59
|
-
end
|
60
|
-
|
61
56
|
# Render html tag
|
62
57
|
def pre_render
|
63
58
|
button_link_html_tag
|
@@ -65,25 +60,29 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
65
60
|
|
66
61
|
private
|
67
62
|
|
68
|
-
def component_html_options
|
69
|
-
opts = super
|
70
|
-
opts = opts.merge({ role: "button" })
|
71
|
-
opts
|
72
|
-
end
|
73
|
-
|
74
63
|
def button_link_html_tag
|
75
64
|
link_to link_url, html_options do
|
76
|
-
concat
|
65
|
+
concat spinner_html unless options[:spinner].nil?
|
66
|
+
concat glyph_and_content_html(options[:text].nil? ? @content : '')
|
77
67
|
concat badge_html unless options[:badge].nil?
|
78
68
|
end
|
79
69
|
end
|
80
70
|
|
81
71
|
def link_url
|
82
|
-
options[:url] || "
|
72
|
+
options[:url] || "##{ options[:collapse] }"
|
73
|
+
end
|
74
|
+
|
75
|
+
def component_html_options
|
76
|
+
super.merge({ role: :button })
|
83
77
|
end
|
84
78
|
|
85
|
-
def
|
86
|
-
|
79
|
+
def collapse
|
80
|
+
# Must be flat hash not deep hash
|
81
|
+
{
|
82
|
+
"data-toggle": :collapse,
|
83
|
+
"aria-controls": options[:collapse],
|
84
|
+
"aria-expanded": options[:expand_collaspe].nil? ? false : options[:expand_collaspe]
|
85
|
+
}
|
87
86
|
end
|
88
87
|
|
89
88
|
end
|
@@ -23,7 +23,11 @@ module UiBibz::Ui::Core::Navigations
|
|
23
23
|
|
24
24
|
# Render html tag
|
25
25
|
def pre_render
|
26
|
-
|
26
|
+
if options[:url]
|
27
|
+
link_to content, brand_url, html_options
|
28
|
+
else
|
29
|
+
content_tag :span, content, html_options
|
30
|
+
end
|
27
31
|
end
|
28
32
|
|
29
33
|
private
|
@@ -47,7 +47,7 @@ module UiBibz::Ui::Core::Navigations
|
|
47
47
|
|
48
48
|
# Render html tag
|
49
49
|
def pre_render
|
50
|
-
link_to glyph_and_content_html, options[:url] ||
|
50
|
+
link_to glyph_and_content_html, options[:url] || "##{ options[:collapse] }", html_options
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
@@ -58,10 +58,15 @@ module UiBibz::Ui::Core::Navigations
|
|
58
58
|
opts
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
def collapse
|
62
|
+
{
|
63
|
+
role: "button",
|
64
|
+
data: { toggle: :collapse },
|
65
|
+
aria: {
|
66
|
+
controls: options[:collapse],
|
67
|
+
expanded: options[:active_collapse].nil? ? false : options[:active_collapse]
|
68
|
+
}
|
69
|
+
}
|
65
70
|
end
|
66
71
|
|
67
72
|
def text
|
@@ -134,7 +134,7 @@ module UiBibz::Ui::Core::Navigations
|
|
134
134
|
end
|
135
135
|
|
136
136
|
def body_html
|
137
|
-
content_tag :div, class: "
|
137
|
+
content_tag :div, class: "navbar-collapse", id: id do
|
138
138
|
concat @items.map(&:render).join.html_safe
|
139
139
|
end
|
140
140
|
end
|
@@ -18,11 +18,15 @@ module PopoverExtension
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def tooltip_data_html
|
21
|
-
|
21
|
+
unless options[:tooltip].nil?
|
22
|
+
add_html_data :toggle, "tooltip"
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
if options[:tooltip].kind_of?(Hash)
|
25
|
+
TOOLTIP_METHODS.each{ |mth| add_html_data(mth, options[:tooltip].try(:[], mth)) unless options[:tooltip].try(:[], mth).nil? }
|
26
|
+
add_html_data :placement, options[:tooltip].try(:[], :position) unless options[:tooltip].try(:[], :position).nil?
|
27
|
+
else
|
28
|
+
add_html_data :title, options[:tooltip]
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
@@ -23,7 +23,7 @@ module UiBibz::Utils
|
|
23
23
|
glyph_name = @glyph_options.try(:[], :name)
|
24
24
|
glyph_opts = @glyph_options
|
25
25
|
glyph_html_opts = @options[:html_options] || {}
|
26
|
-
glyph_html_opts = glyph_html_opts.merge(@options[:text] ? {} : { title: @options[:content] })
|
26
|
+
#glyph_html_opts = glyph_html_opts.merge(@options[:text] ? {} : { title: @options[:content] })
|
27
27
|
glyph_items = @glyph_options.try(:[], :items) || []
|
28
28
|
|
29
29
|
[glyph_name, glyph_opts, glyph_html_opts, glyph_items]
|
@@ -35,9 +35,9 @@ module UiBibz::Utils
|
|
35
35
|
else
|
36
36
|
glyph_name = @glyph_options
|
37
37
|
glyph_opts = @options
|
38
|
-
title = [(@options[:content] unless @options[:text]), ("<kbd>#{ @options[:shortcut] }</kbd>" unless @options[:shortcut].nil?)].compact.join(" ")
|
38
|
+
#title = [(@options[:content] unless @options[:text]), ("<kbd>#{ @options[:shortcut] }</kbd>" unless @options[:shortcut].nil?)].compact.join(" ")
|
39
39
|
glyph_html_opts = @options[:html_options] || {}
|
40
|
-
|
40
|
+
# glyph_html_opts = glyph_html_opts.merge(title.blank? ? {} : { title: title.html_safe })
|
41
41
|
end
|
42
42
|
|
43
43
|
UiBibz::Ui::Core::Icons::Glyph.new(glyph_name, glyph_opts, glyph_html_opts).render unless glyph_name.nil?
|
@@ -20,7 +20,7 @@ class ComponentTest < ActionView::TestCase
|
|
20
20
|
|
21
21
|
test 'create component without text and glyph' do
|
22
22
|
actual = UiBibz::Ui::Core::Component.new('My text', { glyph: 'diamond', text: false }).render
|
23
|
-
expected = "<i
|
23
|
+
expected = "<i class=\"glyph fas fa-diamond\"></i>"
|
24
24
|
|
25
25
|
assert_equal expected, actual
|
26
26
|
end
|
@@ -75,14 +75,14 @@ class ButtonTest < ActionView::TestCase
|
|
75
75
|
|
76
76
|
test 'button glyph without text' do
|
77
77
|
actual = ui_button('state', glyph: 'diamond', text: false)
|
78
|
-
expected = "<button class=\"btn-secondary btn without-text\"><i
|
78
|
+
expected = "<button class=\"btn-secondary btn without-text\"><i class=\"glyph fas fa-diamond\"></i></button>"
|
79
79
|
|
80
80
|
assert_equal expected, actual
|
81
81
|
end
|
82
82
|
|
83
83
|
test 'button with collapse' do
|
84
84
|
actual = ui_button('state', collapse: 'collapse-id')
|
85
|
-
expected = "<button class=\"btn-secondary btn\" data-toggle=\"collapse\" data-target=\"#collapse-id\">state</button>"
|
85
|
+
expected = "<button class=\"btn-secondary btn\" data-toggle=\"collapse\" data-target=\"#collapse-id\" aria-controls=\"collapse-id\" aria-expanded=\"false\">state</button>"
|
86
86
|
|
87
87
|
assert_equal expected, actual
|
88
88
|
end
|
@@ -102,8 +102,8 @@ class ButtonTest < ActionView::TestCase
|
|
102
102
|
end
|
103
103
|
|
104
104
|
test "button with simple tooltip" do
|
105
|
-
actual = ui_button('My Button', { tooltip:
|
106
|
-
expected = "<button title=\"My tooltip\" data-toggle=\"tooltip\" class=\"btn-secondary btn\">My Button</button>"
|
105
|
+
actual = ui_button('My Button', { tooltip: "My Button" }, { title: 'My tooltip' })
|
106
|
+
expected = "<button title=\"My tooltip\" data-toggle=\"tooltip\" data-title=\"My Button\" class=\"btn-secondary btn\">My Button</button>"
|
107
107
|
|
108
108
|
assert_equal expected, actual
|
109
109
|
end
|
@@ -11,14 +11,14 @@ class LinkTest < ActionView::TestCase
|
|
11
11
|
|
12
12
|
test 'Link without text' do
|
13
13
|
actual = ui_link 'My link', glyph: "gem", text: false, url: "#link"
|
14
|
-
expected = "<a href=\"#link\"><i
|
14
|
+
expected = "<a href=\"#link\"><i class=\"glyph fas fa-gem\"></i></a>"
|
15
15
|
|
16
16
|
assert_equal expected, actual
|
17
17
|
end
|
18
18
|
|
19
19
|
test "Link with collapse option" do
|
20
20
|
actual = ui_link 'My link', url: "#link", collapse: 'collapse-id'
|
21
|
-
expected = "<a role=\"button\" data-toggle=\"collapse\"
|
21
|
+
expected = "<a role=\"button\" data-toggle=\"collapse\" aria-controls=\"collapse-id\" aria-expanded=\"false\" href=\"#link\">My link</a>"
|
22
22
|
|
23
23
|
assert_equal expected, actual
|
24
24
|
end
|
@@ -4,7 +4,7 @@ class NavbarTest < ActionView::TestCase
|
|
4
4
|
test 'Navbar' do
|
5
5
|
actual = UiBibz::Ui::Core::Navigations::Navbar.new.tap do |nb|
|
6
6
|
end
|
7
|
-
expected = "<nav class=\"navbar navbar-light navbar-expand-lg\"><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><div class=\"
|
7
|
+
expected = "<nav class=\"navbar navbar-light navbar-expand-lg\"><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><div class=\"navbar-collapse\" id=\"#{ actual.id }\"></div></nav>"
|
8
8
|
|
9
9
|
assert_equal expected, actual.render
|
10
10
|
end
|
@@ -12,7 +12,7 @@ class NavbarTest < ActionView::TestCase
|
|
12
12
|
test 'Navbar with options' do
|
13
13
|
actual = UiBibz::Ui::Core::Navigations::Navbar.new(title: 'Brand', expand_size: :xs, status: :primary, position: :top, brand_position: :right).tap do |nb|
|
14
14
|
end
|
15
|
-
expected = "<nav class=\"bg-primary navbar navbar-light fixed-top navbar-expand-xs\"><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><
|
15
|
+
expected = "<nav class=\"bg-primary navbar navbar-light fixed-top navbar-expand-xs\"><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><span class=\"navbar-brand\">Brand</span><div class=\"navbar-collapse\" id=\"#{ actual.id }\"></div></nav>"
|
16
16
|
|
17
17
|
assert_equal expected, actual.render
|
18
18
|
end
|
@@ -31,7 +31,7 @@ class NavbarTest < ActionView::TestCase
|
|
31
31
|
end
|
32
32
|
nb.text 'test'
|
33
33
|
end
|
34
|
-
expected = "<nav class=\"navbar navbar-light navbar-expand-lg\"><
|
34
|
+
expected = "<nav class=\"navbar navbar-light navbar-expand-lg\"><span class=\"navbar-brand\">Brand</span><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><div class=\"navbar-collapse\" id=\"#{ actual.id }\"><ul class=\"navbar-nav\"><li class=\"nav-item\"><a class=\"active nav-link\" href=\"#Home\">Home</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"#profile\">Profile</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"#messages\">Messages</a></li></ul><form type=\"form_tag\" position=\"right\" class=\"navbar-form form-inline my-lg-0 my-2\" action=\"#\" accept-charset=\"UTF-8\" method=\"post\"><input name=\"utf8\" type=\"hidden\" value=\"✓\" /><button class=\"btn-secondary btn\">Search</button></form><span class=\"navbar-text\">test</span></div></nav>"
|
35
35
|
|
36
36
|
assert_equal expected, actual.render
|
37
37
|
end
|
@@ -43,7 +43,7 @@ class NavbarTest < ActionView::TestCase
|
|
43
43
|
n.link 'Link', url: '#link'
|
44
44
|
end
|
45
45
|
end
|
46
|
-
expected = "<nav class=\"bg-dark navbar navbar-dark navbar-expand-lg\"><
|
46
|
+
expected = "<nav class=\"bg-dark navbar navbar-dark navbar-expand-lg\"><span class=\"navbar-brand\"><img src=\"/images/ruby-white\" /></span><button class=\"navbar-toggler hidden-sm-up\" type=\"button\" data-toggle=\"collapse\" data-target=\"##{ actual.id }\">☰</button><div class=\"navbar-collapse\" id=\"#{ actual.id }\"><ul class=\"navbar-nav\"><li class=\"nav-item\"><a class=\"nav-link\" href=\"#link\">Link</a></li></ul></div></nav>"
|
47
47
|
|
48
48
|
assert_equal expected, actual.render
|
49
49
|
end
|
@@ -33,7 +33,7 @@ class CardTest < ActionView::TestCase
|
|
33
33
|
end
|
34
34
|
p.footer 'Footer'
|
35
35
|
end
|
36
|
-
expected = "<div class=\"panel\"><div class=\"panel-header justify-content-between\"><div class=\"panel-title\">My header</div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-outline-secondary btn btn-sm without-text\"><i
|
36
|
+
expected = "<div class=\"panel\"><div class=\"panel-header justify-content-between\"><div class=\"panel-title\">My header</div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-caret-up\"></i></button><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-cog\"></i></button><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-Close\"></i></button></div></div><div class=\"btn-toolbar justify-content-between panel-toolbar\" role=\"toolbar\"><div role=\"group\" class=\"btn-group btn-group-sm mr-2\"><button class=\"btn-secondary btn btn-sm\">Copy</button><button class=\"btn-secondary btn btn-sm\">Cut</button><button class=\"btn-secondary btn btn-sm\">Paste</button></div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-secondary btn btn-sm\">Delete</button></div></div><div class=\"panel-body\">Body</div><div class=\"btn-toolbar panel-toolbar\" role=\"toolbar\"><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-success btn btn-sm without-text\"><i class=\"glyph fas fa-plus-circle\"></i></button><button class=\"btn-danger btn btn-sm without-text\"><i class=\"glyph fas fa-minus-circle\"></i></button></div></div><div class=\"panel-footer\">Footer</div></div>"
|
37
37
|
|
38
38
|
assert_equal expected, actual
|
39
39
|
end
|
@@ -225,8 +225,8 @@
|
|
225
225
|
__getIcon: function(src) {
|
226
226
|
if(typeof src == 'object'){
|
227
227
|
var customIcon = this.$options.customIcons[src.name];
|
228
|
-
console.log(customIcon)
|
229
|
-
console.log(this.$options)
|
228
|
+
// console.log(customIcon)
|
229
|
+
// console.log(this.$options)
|
230
230
|
return typeof customIcon == 'undefined' ? src.icon[this.$options.iconlibrary] : customIcon;
|
231
231
|
} else {
|
232
232
|
return src;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ui_bibz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thooams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|