nodebb-plugin-composer-default 10.1.6 → 10.1.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.1.6",
3
+ "version": "10.1.7",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -38,21 +38,24 @@ $(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.topicName,
47
- body: data.text,
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.topicName ? '&title=' + encodeURIComponent(data.topicName) : '') +
55
- (data.text ? '&body=' + encodeURIComponent(data.text) : '')
57
+ (data.title ? '&title=' + encodeURIComponent(data.title) : '') +
58
+ (data.body ? '&body=' + encodeURIComponent(data.body) : '')
56
59
  );
57
60
  }
58
61
  });
@@ -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-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" type="button">
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>