card-mod-bootstrap 0.17.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e75d49334750d08d7281d83ae2df00c09b9efa388ce1de84912d6530cd7e8813
4
- data.tar.gz: 16435f680eac6f6eab99cefb7fa05687726a27d124ab98de8acf2e632208b808
3
+ metadata.gz: c31511cfd0da92aab931377fa7fe620fe5e4dc52e3e4ed1690174a2a2bbb911f
4
+ data.tar.gz: 4a8e03c11693359eaacf38f6694ea59075aef2e4e9446628ac51352577d2070e
5
5
  SHA512:
6
- metadata.gz: 7f8088224e8c574c4087bb432a642ed2fb38313268f3fc41095a51256c2dbb0ed1fe5f13c65026579f66bcc5e7eaa8c336ec23f09eaa3a7ad9fb7bc11bcfa658
7
- data.tar.gz: 73cc985c31dd5692fba9525e7341ed9399619a888d37c30d88c686f7ad63f5c20582db5da3072af158cdcc10b3cd8a273ddfaf26e7a321981ead35343092123f
6
+ metadata.gz: f4200d94a9802111e90f12b72246aacad7e1f8390e740c231f6b765081dcbc3ed1a6c9bcc16f9e836e4463e0cd59b801a9a301a5ee898c6eb3fbebf39f0c7e7e
7
+ data.tar.gz: 544ff54e8ec2cd5413ab3e3ea2af794dbc12385c105dd7e7848c627b68f0041487479be4f02db8db5935149fb67c02d95795d569ba56e340c89c1fc61d3dce9a
@@ -17,8 +17,6 @@ $.extend decko,
17
17
  else
18
18
  initSingleSelect2 elem
19
19
 
20
-
21
-
22
20
  uniqSelect2Id: (id) ->
23
21
  return id unless $("[data-select2-id=" + id + "]").length > 0
24
22
  decko.uniqSelect2Id id + "1"
@@ -73,15 +71,16 @@ initSingleSelect2 = (elem) ->
73
71
  delay: 200
74
72
  cache: true
75
73
  url: decko.path elem.data("options-card")
76
- processResults: (data) ->
77
- results: $.map(data, (card, i) ->
78
- { id: "~" + card.id, text: card.name }
79
- )
74
+ processResults: (data) -> results: data
80
75
  data: (params) ->
81
76
  term: params.term
82
77
  format: "json"
83
- view: "name_match"
84
- slot: { items: { view: "nucleus" } }
85
-
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
86
85
 
87
86
  elem.select2(opts)
@@ -16,3 +16,7 @@
16
16
  .dropdown-menu {
17
17
  z-index: 1005;
18
18
  }
19
+
20
+ .select2-dropdown a {
21
+ text-decoration: none !important;
22
+ }
@@ -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(){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,c,o;if(0!==e.length){if(e.length>1){for(c=[],n=0,i=e.length;n<i;n++)o=e[n],c.push(t($(o)));return c}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:$.map(t,function(t){return{id:"~"+t.id,text:t.name}})}},data:function(t){return{term:t.term,format:"json",view:"name_match",slot:{items:{view:"nucleus"}}}}}),t.select2(e)}}).call(this);
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
@@ -20,7 +20,7 @@ class CustomizableSkin < Cardio::Migration::Transform
20
20
  end
21
21
 
22
22
  def create_or_update
23
- Card.exists?(@skin_name) ? update_skin : create_skin
23
+ Card.exist?(@skin_name) ? update_skin : create_skin
24
24
  end
25
25
 
26
26
  private
@@ -33,7 +33,7 @@ class Skin
33
33
  end
34
34
 
35
35
  def create_or_update
36
- Card.exists?(@skin_name) ? update_skin : create_skin
36
+ Card.exist?(@skin_name) ? update_skin : create_skin
37
37
  end
38
38
 
39
39
  def create_skin
@@ -13,6 +13,6 @@ format :html do
13
13
  if count.try(:zero?) && !opts[:zero_ok]
14
14
  opts[:klass] = [opts[:klass], "disabled-o"].compact.join " "
15
15
  end
16
- opts[:color] ||= "secondary"
16
+ opts[:color] ||= "light"
17
17
  end
18
18
  end
@@ -130,6 +130,7 @@ format :html do
130
130
  end
131
131
 
132
132
  def universal_icon_tag library, icon, opts={}
133
+ add_class opts, "notranslate"
133
134
  with_icon_tag_opts(opts) do |tag_opts|
134
135
  send "#{library}_icon_tag", icon, tag_opts
135
136
  end
@@ -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
- Card.fetch_name(n)
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| Card.fetch_name name, s }
84
+ %i[colors variables].map { |s| [name, s].cardname }
85
85
  end
86
86
 
87
87
  def stylesheets_card_names
88
- [Card.fetch_name(name, :stylesheets)]
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.17.0
4
+ version: 0.18.1
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: 2024-06-12 00:00:00.000000000 Z
13
+ date: 2024-11-22 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.107.0
21
+ version: 1.108.1
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.107.0
28
+ version: 1.108.1
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.17.0
35
+ version: 0.18.1
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.17.0
42
+ version: 0.18.1
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.17.0
49
+ version: 0.18.1
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.17.0
56
+ version: 0.18.1
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.17.0
63
+ version: 0.18.1
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.17.0
70
+ version: 0.18.1
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.17.0
77
+ version: 0.18.1
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.17.0
84
+ version: 0.18.1
85
85
  description: ''
86
86
  email:
87
87
  - info@decko.org
@@ -3936,7 +3936,7 @@ files:
3936
3936
  - vendor/select2/tests/vendor/qunit-1.23.1.js
3937
3937
  homepage: https://decko.org
3938
3938
  licenses:
3939
- - GPL-3.0
3939
+ - GPL-3.0-or-later
3940
3940
  metadata:
3941
3941
  source_code_uri: https://github.com/decko-commons/decko
3942
3942
  homepage_uri: https://decko.org