decidim-comments 0.32.0 → 0.32.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f914a0bb7eb14fa5d81946301f908d7abc9000e9a317a18b453a1197cce1bad
|
|
4
|
+
data.tar.gz: 72b443375fdb95dda4c3448c336ab86b7257816fea68e43f353031ad14b543ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ec45128f4b7b40766a9570f9bb467064d054f4bfb3c78700ddee39254a3ce2502094ff507f3cb4f84d9f96e8298c925e7045256f496c26d695ba28f3095aca4
|
|
7
|
+
data.tar.gz: 29598456e8f13f820dda933a279b97de18dbb6e3f3906194c0eb3dc0dfdbe0b7cea61fa453f43475dceaa073abe04fea53348282aa266c9499caa6cc4230b9d9
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var $comments = $("#" + rootCommentableId);
|
|
5
5
|
var component = $comments.data("comments");
|
|
6
|
+
|
|
7
|
+
// Save the focused element id to restore focus after reload
|
|
8
|
+
var activeElementId = document.activeElement ? document.activeElement.id : null;
|
|
9
|
+
|
|
6
10
|
component.unmountComponent();
|
|
7
11
|
|
|
8
12
|
var commentsHtml = '<%== j(inline_comments_for(commentable, order:).inline).strip %>';
|
|
@@ -16,4 +20,12 @@
|
|
|
16
20
|
// Update the comments count
|
|
17
21
|
$(".comments-count", $comments).text(<%== t("decidim.components.comments.title", count: @comments_count).to_json %>);
|
|
18
22
|
|
|
23
|
+
// Restore focus to the previously focused element if it still exists
|
|
24
|
+
if (activeElementId) {
|
|
25
|
+
var newActiveElement = document.getElementById(activeElementId);
|
|
26
|
+
if (newActiveElement) {
|
|
27
|
+
newActiveElement.focus();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
}());
|
data/decidim-comments.gemspec
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
|
-
version = "0.32.
|
|
6
|
+
version = "0.32.1"
|
|
7
7
|
s.version = version
|
|
8
8
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
|
|
9
9
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: decidim-comments
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.32.
|
|
4
|
+
version: 0.32.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josep Jaume Rey Peroy
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.32.
|
|
20
|
+
version: 0.32.1
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.32.
|
|
27
|
+
version: 0.32.1
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: redcarpet
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -51,28 +51,28 @@ dependencies:
|
|
|
51
51
|
requirements:
|
|
52
52
|
- - '='
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.32.
|
|
54
|
+
version: 0.32.1
|
|
55
55
|
type: :development
|
|
56
56
|
prerelease: false
|
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - '='
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.32.
|
|
61
|
+
version: 0.32.1
|
|
62
62
|
- !ruby/object:Gem::Dependency
|
|
63
63
|
name: decidim-dev
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - '='
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.32.
|
|
68
|
+
version: 0.32.1
|
|
69
69
|
type: :development
|
|
70
70
|
prerelease: false
|
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - '='
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0.32.
|
|
75
|
+
version: 0.32.1
|
|
76
76
|
description: Pluggable comments system for some components.
|
|
77
77
|
email:
|
|
78
78
|
- josepjaume@gmail.com
|