card-mod-list 0.13.2 → 0.13.3

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: 1bb86ee48fd896283c6f8d1100ca96249087e0d80cffb5ce0acf90d6b4e187ba
4
- data.tar.gz: 105487db182f650539a3b0ec9e387cc58c41f720e5e219607abbdc5a8eacc3f4
3
+ metadata.gz: 94c458970d8f2da24a496a1bf928a1a2c20b68eb3d720f4fc2d44002aff78857
4
+ data.tar.gz: 7248bd89b096282be52fa5be68dfa4c16ab836e280ad7f774448a137c18587c7
5
5
  SHA512:
6
- metadata.gz: 165cf0bdfb93b2dd73e9f0b612a3c7964488927a8a2f86d1e59ecf13d3fde29f933bee98f8e9426141e5f140e94cf906a8cba8bfc5dd4890d69c995c38092fa6
7
- data.tar.gz: '073548d105eca9e109c53b60d5a677eb4554bd5eac74504008ba5192bdf2a0a4757e89e9997c6d6ac8d45436db5f23404616533a5b5af6cab84aaa62ac677eaf'
6
+ metadata.gz: 791e5bc6ddbbc08dabc808bfd3a44b3809a343a3b7aa56e8c43439abcbd5ee84918c283ad6c94b65c83d6bba7ff46206146e156f2ac2300490b28032a07c8503
7
+ data.tar.gz: 449a7de9383e94304e8563cfababebd00e5d0f6b2bd98cfcc9bd930c98d95f08999408acdec8917f12649166779f1037b135fdbd810b6cd9f00608688118624e
@@ -16,6 +16,6 @@
16
16
  -# "data-target": "#modal-filtered-list"
17
17
  -# = modal_slot "filtered-list", "modal-lg"
18
18
 
19
- // note: passing item and filter card because in some cases (eg Project+Metric on wikirate)
19
+ // note: passing item and filter card because in some cases (eg Dataset+Metric on wikirate)
20
20
  // the link was losing set-identifying information (type of left)
21
21
  // would be preferable to have a more general solution to retain set-identifying info.
@@ -22,7 +22,7 @@ format :html do
22
22
  view :one_line_content do
23
23
  item_view = implicit_item_view
24
24
  item_view = item_view == "name" ? "name" : "link"
25
- wrap_with :div, class: "pointer-list" do
25
+ wrap_with :div, class: "pointer-list one-line-pointer-list" do
26
26
  # limit to first 10 items to optimize
27
27
  pointer_items(view: item_view, limit: 10, offset: 0).join ", "
28
28
  end
@@ -1,35 +1,13 @@
1
1
  include_set Abstract::Pointer
2
2
 
3
- abstract_basket :item_codenames
4
-
5
- # simplify api
6
- # Self::MyCodePointerSet.add_item :my_item_codename
7
- # instead of
8
- # Self::MyCodePointerSet.add_to_basket :item_codenames, :my_item_codename
9
- module ClassMethods
10
- def add_item codename
11
- valid_codename codename do
12
- add_to_basket :item_codenames, codename
13
- end
14
- end
15
-
16
- def unshift_item codename
17
- valid_codename codename do
18
- unshift_basket :item_codenames, codename
19
- end
20
- end
3
+ def self.included host_class
4
+ basket[host_class.basket_name] = []
5
+ end
21
6
 
22
- def valid_codename codename
23
- if Card::Codename.exist? codename
24
- yield
25
- else
26
- Rails.logger.info "unknown codename '#{codename}' added to code pointer"
27
- end
28
- end
7
+ def item_codenames
8
+ basket[basket_name]
29
9
  end
30
10
 
31
11
  def content
32
- item_codenames.map do |codename|
33
- Card.fetch_name codename
34
- end.compact.to_pointer_content
12
+ item_codenames.map(&:cardname).compact.to_pointer_content
35
13
  end
@@ -1,3 +1,13 @@
1
+ basket[:list_input_options] = [
2
+ "radio",
3
+ "checkbox",
4
+ "select",
5
+ "multiselect",
6
+ "list",
7
+ "filtered list",
8
+ "autocomplete"
9
+ ]
10
+
1
11
  def supports_content_options?
2
12
  false
3
13
  end
@@ -1,14 +1,5 @@
1
1
  include_set Abstract::Pointer
2
2
 
3
- basket :options
4
- add_to_basket :options, "radio"
5
- add_to_basket :options, "checkbox"
6
- add_to_basket :options, "select"
7
- add_to_basket :options, "multiselect"
8
- add_to_basket :options, "list"
9
- add_to_basket :options, "filtered list"
10
- add_to_basket :options, "autocomplete"
11
-
12
3
  def content
13
- options.to_pointer_content
4
+ basket[:list_input_options].to_pointer_content
14
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
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: 2021-08-06 00:00:00.000000000 Z
13
+ date: 2021-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,42 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.103.2
21
+ version: 1.103.3
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.103.2
28
+ version: 1.103.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-format
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.13.2
35
+ version: 0.13.3
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.13.2
42
+ version: 0.13.3
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-collection
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.13.2
49
+ version: 0.13.3
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.13.2
56
+ version: 0.13.3
57
57
  description: ''
58
58
  email:
59
59
  - info@decko.org