nfg_ui 0.10.6 → 0.10.7

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: 01a76c6faab975ddfc09854c5d444ed19e4b5d7be26fcda75aa2cdc51ea202b5
4
- data.tar.gz: 3ac42aa0bc08ea79061855b822b0e0c0d59f6e1c0f7e977284cb1dab150f08b6
3
+ metadata.gz: 516ad4b3292478b87bb2261f5ca04f40a3bae1e222b329a0561838d80552c99b
4
+ data.tar.gz: 4827e26728cbac1d5eccfa8cd617d939f37920f623bdf5e5f3de1aee85c5a721
5
5
  SHA512:
6
- metadata.gz: bbf3b10543ba1920e656cdc3ea6a88d3ba880f51977743c76f196b2302d24bc4136a5d7c8096cd72f0a6f686e58748c3f1db0e8213b9e5132048a4a7899867e5
7
- data.tar.gz: f689e701c3eb39745f027ae0eb2cd1ffa4cc8762df626f4f2049c15b7f7978e4f218617d13c75b045472921ee4346203d1616bd8f1b2520458c5fc01a609975e
6
+ metadata.gz: 0c3604c90652de5a9bca3c86ed8c802fad95aafd9fdd9dc9387c09b0835e9ab7ccc9bc92152f04a37504764d6338addc689964dc56ca86cd5de712526f9416d5
7
+ data.tar.gz: 822faca199fbaeb348d56f352bd7109dbcbd2644f33ce078d7d8e17ee53eb584da5d8009fc6bfe6ab74c4b33858cdf3b2f75d7bcb35c9e73ba0e2174898fc282
@@ -12,6 +12,10 @@
12
12
  body:not(.modal-open) {
13
13
  .select2-container--default { z-index: $zindex-dropdown; }
14
14
  }
15
+ body.modal-open {
16
+ .select2-container { z-index: $zindex-modal + 2 !important; } // makes select2 dropdown higher than redactor toolbar in modals
17
+ }
18
+
15
19
 
16
20
  .select2-container--default {
17
21
  &.select2-container--focus .select2-selection--multiple { border-color: $primary; }
@@ -65,8 +65,19 @@ module NfgUi
65
65
  # Example: <div class>Text</div>
66
66
  end
67
67
 
68
+ # Use view_context url_for method to ensure that
69
+ # when objects are passed into href, e.g.
70
+ # `href: @admin` will convert it to the
71
+ # correct path
72
+ #
73
+ # Likewise that hashes are also parsed correctly
74
+ # example:
75
+ # href: { controller: 'admin', action: 'show', id: 7 }
68
76
  def href
69
- options[:href]
77
+ options_href = options[:href]
78
+
79
+ return if options_href.blank?
80
+ view_context.url_for(options_href)
70
81
  end
71
82
 
72
83
  def id
@@ -36,7 +36,7 @@ module NfgUi
36
36
 
37
37
  def href
38
38
  return if as != :a
39
- collapse ? collapse : (options[:href] || '#')
39
+ collapse || super || '#'
40
40
  end
41
41
 
42
42
  def remove_component_css_classes
@@ -18,10 +18,6 @@ module NfgUi
18
18
  options.fetch(:dropdown, false)
19
19
  end
20
20
 
21
- def href
22
- options.fetch(:href, nil)
23
- end
24
-
25
21
  def tab
26
22
  options.fetch(:tab, nil)
27
23
  end
@@ -11,7 +11,7 @@ module NfgUi
11
11
  end
12
12
 
13
13
  def href
14
- options.fetch(:href, '#')
14
+ super || '#'
15
15
  end
16
16
 
17
17
  private
@@ -18,7 +18,7 @@ module NfgUi
18
18
  end
19
19
 
20
20
  def href
21
- options[:href] || '#' # return # when nil
21
+ super || '#'
22
22
  end
23
23
 
24
24
  # Send href through to the "page link" that's embedded within
@@ -47,7 +47,7 @@ module NfgUi
47
47
  # Automatically supply an :href to the dropdown item when a modal is present
48
48
  # so that the dropdown item presents correctly and appears clickable
49
49
  def href
50
- modal ? options.fetch(:href, '#') : super
50
+ super || (modal ? '#' : nil)
51
51
  end
52
52
 
53
53
  private
@@ -62,7 +62,7 @@ module NfgUi
62
62
  # integrated action items are still
63
63
  # correctly styled
64
64
  def href
65
- options[:href] || '#'
65
+ super || '#'
66
66
  end
67
67
 
68
68
  # Passes in the rails confirm option to the slat action component.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.10.6'
4
+ VERSION = '0.10.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfg_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Roehm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-30 00:00:00.000000000 Z
12
+ date: 2020-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap