card-mod-bootstrap 0.16.0 → 0.18.0
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.
- checksums.yaml +4 -4
- data/assets/script/script_load_select2.js.coffee +38 -18
- data/assets/style/decko_bootstrap.scss +4 -0
- data/config/admin.yml +5 -0
- data/data/files/mod_bootstrap_script_asset_output/file.js +1 -1
- data/data/transform/20171110164934_customizable_skin.rb +1 -1
- data/data/transform/20220514141025_remove_customized_bootswatch_skins.rb +1 -1
- data/data/transform/lib/skin.rb +1 -1
- data/lib/card/bootstrap/component/carousel.rb +18 -14
- data/set/abstract/bs_badge/labeled_badge.haml +1 -1
- data/set/abstract/bs_badge.rb +1 -1
- data/set/all/bootstrap/icon.rb +12 -0
- data/set/all/bootstrap/navbar.rb +3 -0
- data/set/type/bootswatch_skin.rb +3 -3
- data/set/type_plus_right/bootswatch_skin/colors.rb +2 -2
- metadata +16 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78ca197a8d574b5edc4af65d19a6856010a88ab9f3c1e53c5685c5025f02cd80
|
|
4
|
+
data.tar.gz: 618f483444d3af1e8f231ef2d6da8f80490bcbe014a6f476c71102faad993367
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2806022fa05cab04f58f07cc8e363b6c897fa8657a28778681a08b1519a21a2c87677317adf6cb66c3a85881da6991ea3277231967ac4d9bf28675ba79a155ed
|
|
7
|
+
data.tar.gz: 77ab703b2e9049d72a1dc7580102e6e86d92ce85b79a1d5c06bb3710d6c35dbbef89b8ee2347e1a2e137bca73a89892c3201b5c0ab4bf694f4c992933a9441a9
|
|
@@ -13,25 +13,9 @@ $.extend decko,
|
|
|
13
13
|
if elem.length == 0
|
|
14
14
|
return
|
|
15
15
|
else if elem.length > 1
|
|
16
|
-
|
|
16
|
+
initSingleSelect2($(single_el)) for single_el in elem
|
|
17
17
|
else
|
|
18
|
-
|
|
19
|
-
dropdownAutoWidth: "true",
|
|
20
|
-
# containerCssClass: ":all:",
|
|
21
|
-
width: "auto",
|
|
22
|
-
dropdownParent: elem.parent()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
elem.attr "id", decko.uniqSelect2Id(elem.attr("id"))
|
|
26
|
-
|
|
27
|
-
if elem.hasClass("tags")
|
|
28
|
-
opts.tags = "true"
|
|
29
|
-
if elem.data("placeholder")
|
|
30
|
-
opts.placeholder = elem.data("placeholder")
|
|
31
|
-
if elem.data("minimum-results-for-search")?
|
|
32
|
-
opts.minimumResultsForSearch = elem.data("minimum-results-for-search")
|
|
33
|
-
|
|
34
|
-
elem.select2(opts)
|
|
18
|
+
initSingleSelect2 elem
|
|
35
19
|
|
|
36
20
|
uniqSelect2Id: (id) ->
|
|
37
21
|
return id unless $("[data-select2-id=" + id + "]").length > 0
|
|
@@ -64,3 +48,39 @@ $.fn.extend
|
|
|
64
48
|
@select2 "destroy"
|
|
65
49
|
@removeAttr "data-select2-id"
|
|
66
50
|
@find("option").removeAttr "data-select2-id"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
initSingleSelect2 = (elem) ->
|
|
54
|
+
opts = {
|
|
55
|
+
dropdownAutoWidth: "true",
|
|
56
|
+
# containerCssClass: ":all:",
|
|
57
|
+
width: "auto",
|
|
58
|
+
dropdownParent: elem.parent()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
elem.attr "id", decko.uniqSelect2Id(elem.attr("id"))
|
|
62
|
+
|
|
63
|
+
if elem.hasClass("tags")
|
|
64
|
+
opts.tags = "true"
|
|
65
|
+
if elem.data("placeholder")
|
|
66
|
+
opts.placeholder = elem.data("placeholder")
|
|
67
|
+
if elem.data("minimum-results-for-search")?
|
|
68
|
+
opts.minimumResultsForSearch = elem.data("minimum-results-for-search")
|
|
69
|
+
if elem.data("options-card")
|
|
70
|
+
opts.ajax =
|
|
71
|
+
delay: 200
|
|
72
|
+
cache: true
|
|
73
|
+
url: decko.path elem.data("options-card")
|
|
74
|
+
processResults: (data) -> results: data
|
|
75
|
+
data: (params) ->
|
|
76
|
+
term: params.term
|
|
77
|
+
format: "json"
|
|
78
|
+
view: elem.data("options-view") || "name_match"
|
|
79
|
+
slot: { items: { view: elem.data("options-item-view") || "select2_option" } }
|
|
80
|
+
opts.templateResult = (data) ->
|
|
81
|
+
if data.html
|
|
82
|
+
$(data.html)
|
|
83
|
+
else
|
|
84
|
+
data.text
|
|
85
|
+
|
|
86
|
+
elem.select2(opts)
|
data/config/admin.yml
ADDED
|
@@ -12,7 +12,7 @@ const i=this._directionToOrder(t),n=Ce.findOne(ai,this._element),s=this._getItem
|
|
|
12
12
|
// decko_popover.js.coffee
|
|
13
13
|
(function(){$(window).ready(function(){return $("body").on("show.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover").removeClass("_show-on-hover").addClass("_show-on-hover-disabled")}),$("body").on("hide.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover-disabled").removeClass("_show-on-hover-disabled").addClass("_show-on-hover")})}),decko.slot.ready(function(o){return o.find('[data-tooltip="true"]').tooltip(),o.find('[data-bs-toggle="popover"]').popover({html:!0})})}).call(this);
|
|
14
14
|
// script_load_select2.js.coffee
|
|
15
|
-
(function(){
|
|
15
|
+
(function(){var t;$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(t){return t.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(t){return t.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var n,i,o,c;if(0!==e.length){if(e.length>1){for(o=[],n=0,i=e.length;n<i;n++)c=e[n],o.push(t($(c)));return o}return t(e)}},uniqSelect2Id:function(t){return $("[data-select2-id="+t+"]").length>0?decko.uniqSelect2Id(t+"1"):t}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var t;if(""!==(t=$(this).val()))return window.location=decko.path(escape(t))}),$("body").on("select2:select","._submit-on-select",function(t){return $(t.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(t,e){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(t,e),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}}),t=function(t){var e;return e={dropdownAutoWidth:"true",width:"auto",dropdownParent:t.parent()},t.attr("id",decko.uniqSelect2Id(t.attr("id"))),t.hasClass("tags")&&(e.tags="true"),t.data("placeholder")&&(e.placeholder=t.data("placeholder")),null!=t.data("minimum-results-for-search")&&(e.minimumResultsForSearch=t.data("minimum-results-for-search")),t.data("options-card")&&(e.ajax={delay:200,cache:!0,url:decko.path(t.data("options-card")),processResults:function(t){return{results:t}},data:function(e){return{term:e.term,format:"json",view:t.data("options-view")||"name_match",slot:{items:{view:t.data("options-item-view")||"select2_option"}}}}},e.templateResult=function(t){return t.html?$(t.html):t.text}),t.select2(e)}}).call(this);
|
|
16
16
|
// bootstrap-colorpicker.min.js
|
|
17
17
|
/*!
|
|
18
18
|
* Bootstrap Colorpicker v2.5.2
|
|
@@ -9,7 +9,7 @@ class RemoveCustomizedBootswatchSkins < Cardio::Migration::Transform
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def convert_bootswatch_skins
|
|
12
|
-
Card.search(
|
|
12
|
+
Card.search(type: :customized_bootswatch_skin) do |card|
|
|
13
13
|
update_args = { type_id: Card::BootswatchSkinID, skip: :asset_input_changed }
|
|
14
14
|
parent = find_parent(card.name)
|
|
15
15
|
if parent && parent.id != card.id
|
data/data/transform/lib/skin.rb
CHANGED
|
@@ -12,7 +12,7 @@ class Card
|
|
|
12
12
|
@items = []
|
|
13
13
|
instance_exec(&block)
|
|
14
14
|
|
|
15
|
-
@html.div class: "carousel slide", id: id, "data-ride" => "
|
|
15
|
+
@html.div class: "carousel slide", id: id, "data-bs-ride" => "true" do
|
|
16
16
|
indicators
|
|
17
17
|
items
|
|
18
18
|
control_prev
|
|
@@ -25,7 +25,7 @@ class Card
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def items
|
|
28
|
-
@html.div class: "carousel-inner"
|
|
28
|
+
@html.div class: "carousel-inner" do
|
|
29
29
|
@items.each_with_index do |item, index|
|
|
30
30
|
carousel_item item, carousel_item_opts(index)
|
|
31
31
|
end
|
|
@@ -46,31 +46,35 @@ class Card
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def control_prev
|
|
49
|
-
|
|
50
|
-
"data-slide" => "prev" do
|
|
51
|
-
@html.span class: "carousel-control-prev-icon", "aria-hidden" => "true"
|
|
52
|
-
@html.span "Previous", class: "sr-only"
|
|
53
|
-
end
|
|
49
|
+
control_button :prev, "Previous"
|
|
54
50
|
end
|
|
55
51
|
|
|
56
52
|
def control_next
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
control_button :next, "Next"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def control_button direction, description
|
|
57
|
+
@html.button class: "carousel-control-#{direction}",
|
|
58
|
+
"data-bs-target": "##{@id}", type: "button" do
|
|
59
|
+
@html.span class: "carousel-control-#{direction}-icon",
|
|
60
|
+
"aria-hidden": "true" do
|
|
61
|
+
""
|
|
62
|
+
end
|
|
63
|
+
@html.span description, class: "visually-hidden"
|
|
61
64
|
end
|
|
62
65
|
end
|
|
63
66
|
|
|
64
67
|
def indicators
|
|
65
|
-
@html.
|
|
68
|
+
@html.div class: "carousel-indicators" do
|
|
66
69
|
@items.size.times { |i| indicator i }
|
|
67
70
|
end
|
|
68
71
|
end
|
|
69
72
|
|
|
70
73
|
def indicator index
|
|
71
|
-
html_opts = { "data-slide-to"
|
|
74
|
+
html_opts = { "data-bs-slide-to": index, "data-bs-target": "##{@id}",
|
|
75
|
+
type: "button", "aria-label": "Slide #{index + 1}" }
|
|
72
76
|
add_class html_opts, "active" if index == @active_item_index
|
|
73
|
-
@html.
|
|
77
|
+
@html.button html_opts
|
|
74
78
|
end
|
|
75
79
|
end
|
|
76
80
|
end
|
data/set/abstract/bs_badge.rb
CHANGED
data/set/all/bootstrap/icon.rb
CHANGED
|
@@ -85,6 +85,17 @@ basket[:icons] = {
|
|
|
85
85
|
format :html do
|
|
86
86
|
view :icons, template: :haml
|
|
87
87
|
|
|
88
|
+
# Generates an HTML tag for an icon with optional parameters.
|
|
89
|
+
#
|
|
90
|
+
# @param [String] icon_key The key representing the desired icon.
|
|
91
|
+
# @param [Hash] opts The options for the icon tag.
|
|
92
|
+
# @option opts [String] :class Additional CSS classes for the icon tag.
|
|
93
|
+
# @option opts [String] :style Additional inline styles for the icon tag.
|
|
94
|
+
#
|
|
95
|
+
# @return [String] The HTML code for the icon tag.
|
|
96
|
+
#
|
|
97
|
+
# @example
|
|
98
|
+
# icon_tag(:heart, class: 'favorite-icon', style: 'color: red')
|
|
88
99
|
def icon_tag icon_key, opts={}
|
|
89
100
|
return "" unless icon_key.present?
|
|
90
101
|
|
|
@@ -119,6 +130,7 @@ format :html do
|
|
|
119
130
|
end
|
|
120
131
|
|
|
121
132
|
def universal_icon_tag library, icon, opts={}
|
|
133
|
+
add_class opts, "notranslate"
|
|
122
134
|
with_icon_tag_opts(opts) do |tag_opts|
|
|
123
135
|
send "#{library}_icon_tag", icon, tag_opts
|
|
124
136
|
end
|
data/set/all/bootstrap/navbar.rb
CHANGED
|
@@ -40,6 +40,9 @@ format :html do
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
# Generates HTML markup for a breadcrumb trail.
|
|
44
|
+
# @param items [list]: A list of items representing the breadcrumb trail.
|
|
45
|
+
# @return [String] HTML markup for the breadcrumb trail.
|
|
43
46
|
def breadcrumb items
|
|
44
47
|
wrap_with :ol, class: "breadcrumb" do
|
|
45
48
|
items.map do |item|
|
data/set/type/bootswatch_skin.rb
CHANGED
|
@@ -50,7 +50,7 @@ end
|
|
|
50
50
|
def item_names _args={}
|
|
51
51
|
(PRE_VARIABLES_CARD_NAMES + variables_card_names +
|
|
52
52
|
POST_VARIABLES_CARD_NAMES + stylesheets_card_names).compact.map do |n|
|
|
53
|
-
|
|
53
|
+
Codename.name n
|
|
54
54
|
end.compact
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -81,11 +81,11 @@ def editable_item_cards
|
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def variables_card_names
|
|
84
|
-
%i[colors variables].map { |s|
|
|
84
|
+
%i[colors variables].map { |s| [name, s].cardname }
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def stylesheets_card_names
|
|
88
|
-
[
|
|
88
|
+
[[name, :stylesheets].cardname]
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def content_from_theme field
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: card-mod-bootstrap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ethan McCutchen
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: card
|
|
@@ -18,70 +18,70 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 1.
|
|
21
|
+
version: 1.108.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - '='
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 1.
|
|
28
|
+
version: 1.108.0
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: card-mod-edit
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
33
|
- - '='
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version: 0.
|
|
35
|
+
version: 0.18.0
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
40
|
- - '='
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version: 0.
|
|
42
|
+
version: 0.18.0
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: card-mod-bar_and_box
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
47
|
- - '='
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 0.
|
|
49
|
+
version: 0.18.0
|
|
50
50
|
type: :runtime
|
|
51
51
|
prerelease: false
|
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
|
54
54
|
- - '='
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: 0.
|
|
56
|
+
version: 0.18.0
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: card-mod-style
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - '='
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: 0.
|
|
63
|
+
version: 0.18.0
|
|
64
64
|
type: :runtime
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - '='
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: 0.
|
|
70
|
+
version: 0.18.0
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: card-mod-script
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
75
|
- - '='
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: 0.
|
|
77
|
+
version: 0.18.0
|
|
78
78
|
type: :runtime
|
|
79
79
|
prerelease: false
|
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
|
82
82
|
- - '='
|
|
83
83
|
- !ruby/object:Gem::Version
|
|
84
|
-
version: 0.
|
|
84
|
+
version: 0.18.0
|
|
85
85
|
description: ''
|
|
86
86
|
email:
|
|
87
87
|
- info@decko.org
|
|
@@ -102,6 +102,7 @@ files:
|
|
|
102
102
|
- assets/style/font_awesome.css
|
|
103
103
|
- assets/style/manifest.yml
|
|
104
104
|
- assets/style/material_icons.css
|
|
105
|
+
- config/admin.yml
|
|
105
106
|
- config/locales/de.yml
|
|
106
107
|
- config/locales/en.yml
|
|
107
108
|
- data/files/cerulean_skin_image/image-icon.png
|
|
@@ -3935,7 +3936,7 @@ files:
|
|
|
3935
3936
|
- vendor/select2/tests/vendor/qunit-1.23.1.js
|
|
3936
3937
|
homepage: https://decko.org
|
|
3937
3938
|
licenses:
|
|
3938
|
-
- GPL-3.0
|
|
3939
|
+
- GPL-3.0-or-later
|
|
3939
3940
|
metadata:
|
|
3940
3941
|
source_code_uri: https://github.com/decko-commons/decko
|
|
3941
3942
|
homepage_uri: https://decko.org
|
|
@@ -3952,14 +3953,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
3952
3953
|
requirements:
|
|
3953
3954
|
- - ">="
|
|
3954
3955
|
- !ruby/object:Gem::Version
|
|
3955
|
-
version: '
|
|
3956
|
+
version: '3.0'
|
|
3956
3957
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3957
3958
|
requirements:
|
|
3958
3959
|
- - ">="
|
|
3959
3960
|
- !ruby/object:Gem::Version
|
|
3960
3961
|
version: '0'
|
|
3961
3962
|
requirements: []
|
|
3962
|
-
rubygems_version: 3.
|
|
3963
|
+
rubygems_version: 3.5.7
|
|
3963
3964
|
signing_key:
|
|
3964
3965
|
specification_version: 4
|
|
3965
3966
|
summary: Bootstrap
|