nodebb-plugin-composer-default 10.1.6 → 10.1.8
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.
package/package.json
CHANGED
package/static/lib/client.js
CHANGED
|
@@ -38,26 +38,31 @@ $(document).ready(function () {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
$(window).on('action:composer.post.new', function (ev, data) {
|
|
41
|
+
// backwards compatibility
|
|
42
|
+
data.body = data.body || data.text;
|
|
43
|
+
data.title = data.title || data.topicName;
|
|
41
44
|
if (config['composer-default'].composeRouteEnabled !== 'on') {
|
|
42
45
|
require(['composer'], function (composer) {
|
|
43
46
|
composer.newReply({
|
|
44
47
|
tid: data.tid,
|
|
45
48
|
toPid: data.pid,
|
|
46
|
-
title: data.
|
|
47
|
-
body: data.
|
|
49
|
+
title: data.title,
|
|
50
|
+
body: data.body,
|
|
48
51
|
});
|
|
49
52
|
});
|
|
50
53
|
} else {
|
|
51
54
|
ajaxify.go(
|
|
52
55
|
'compose?tid=' + data.tid +
|
|
53
56
|
(data.pid ? '&toPid=' + data.pid : '') +
|
|
54
|
-
(data.
|
|
55
|
-
(data.
|
|
57
|
+
(data.title ? '&title=' + encodeURIComponent(data.title) : '') +
|
|
58
|
+
(data.body ? '&body=' + encodeURIComponent(data.body) : '')
|
|
56
59
|
);
|
|
57
60
|
}
|
|
58
61
|
});
|
|
59
62
|
|
|
60
63
|
$(window).on('action:composer.addQuote', function (ev, data) {
|
|
64
|
+
data.body = data.body || data.text;
|
|
65
|
+
data.title = data.title || data.topicName;
|
|
61
66
|
if (config['composer-default'].composeRouteEnabled !== 'on') {
|
|
62
67
|
require(['composer'], function (composer) {
|
|
63
68
|
var topicUUID = composer.findByTid(data.tid);
|
|
@@ -65,9 +70,9 @@ $(document).ready(function () {
|
|
|
65
70
|
tid: data.tid,
|
|
66
71
|
toPid: data.pid,
|
|
67
72
|
selectedPid: data.selectedPid,
|
|
68
|
-
title: data.
|
|
73
|
+
title: data.title,
|
|
69
74
|
username: data.username,
|
|
70
|
-
body: data.
|
|
75
|
+
body: data.body,
|
|
71
76
|
uuid: topicUUID,
|
|
72
77
|
});
|
|
73
78
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="tag-row">
|
|
2
2
|
<div class="tags-container d-flex align-items-center {{{ if tagWhitelist.length }}}haswhitelist{{{ end }}}">
|
|
3
3
|
<div class="btn-group dropup me-2 {{{ if !tagWhitelist.length }}}hidden{{{ end }}}" component="composer/tag/dropdown">
|
|
4
|
-
<button class="btn btn-
|
|
4
|
+
<button class="btn btn-sm btn-link text-body dropdown-toggle" data-bs-toggle="dropdown" type="button">
|
|
5
5
|
<span class="visible-sm-inline visible-md-inline visible-lg-inline"><i class="fa fa-tags"></i></span>
|
|
6
6
|
[[tags:select_tags]]
|
|
7
7
|
</button>
|