satis 2.1.10 → 2.1.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c26f92789c969a70a78e755e1e4524ce60eb66e4072e668347a043dfbec44035
|
4
|
+
data.tar.gz: fd1bcf71ddb41868eef1f4832851a7cfd5c0a9d758c1fabff852cae2ef20b140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a05e0503425e84529bf1a0c07a0de2d5a2704178a745854ea1a10c29345c580cedff250ed16a3e6839ce91a0d2e45f43b400000666ce3f56bfb7bd49097400b6
|
7
|
+
data.tar.gz: 1775ac23357c5d75fe779c2514fa54a7458be686796a07f17a79a8ee14f8d626797eb18a34d5b13caac8a4e0c114dfbbb971eda24223bd22232233435d45dbdd
|
@@ -36,13 +36,11 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
36
36
|
this.showSubmenu()
|
37
37
|
event.preventDefault()
|
38
38
|
} else {
|
39
|
-
this.hideSubmenu()
|
39
|
+
if(!this.hasLink || this.linkInUrl()) this.hideSubmenu()
|
40
40
|
}
|
41
41
|
|
42
|
-
if
|
42
|
+
if(this.linkInUrl()){
|
43
43
|
event.preventDefault()
|
44
|
-
} else {
|
45
|
-
this.linkTarget.classList.toggle("focus", true)
|
46
44
|
}
|
47
45
|
}
|
48
46
|
}
|
@@ -70,8 +68,12 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
70
68
|
this.element.classList.toggle("active", false)
|
71
69
|
}
|
72
70
|
|
71
|
+
get hasLink(){
|
72
|
+
return this.hasLinkTarget && this.linkTarget.hasAttribute("href")
|
73
|
+
}
|
74
|
+
|
73
75
|
updateFocus(scroll = false) {
|
74
|
-
if (!this.
|
76
|
+
if (!this.hasLink) return
|
75
77
|
const focusedItem = this.element.closest('nav.sidebar').querySelector('a.focus')
|
76
78
|
const linkInUrl = this.linkInUrl()
|
77
79
|
if (linkInUrl && (!focusedItem || linkInUrl > this.linkInUrl(focusedItem))) {
|
@@ -83,7 +85,7 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
83
85
|
}
|
84
86
|
|
85
87
|
linkInUrl(target = this.linkTarget) {
|
86
|
-
if(!target || target.href
|
88
|
+
if(!target || target.getAttribute('href') === null || target.pathname !== window.location.pathname || target.origin !== window.location.origin)
|
87
89
|
return 0
|
88
90
|
|
89
91
|
let c = 1;
|
data/lib/satis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|