nodebb-plugin-composer-default 10.1.2 → 10.1.4

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.2",
3
+ "version": "10.1.4",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -79,10 +79,8 @@ define('composer/formatting', [
79
79
  buttons.forEach((btn) => {
80
80
  fileForm
81
81
  .before(`
82
- <li class="small">
83
- <a data-format="${btn.name}" title="${btn.title || ''}" href="#" class="btn btn-sm btn-link text-reset position-relative" tabindex="-1">
84
- <i class="${btn.iconClass}"></i>
85
- </a>
82
+ <li data-format="${btn.name}" title="${btn.title || ''}" href="#" class="btn btn-sm btn-link text-reset position-relative" tabindex="-1">
83
+ <i class="${btn.iconClass}"></i>
86
84
  </li>
87
85
  `);
88
86
  });
@@ -107,7 +105,7 @@ define('composer/formatting', [
107
105
  };
108
106
 
109
107
  formatting.addHandler = function (postContainer) {
110
- postContainer.on('click', '.formatting-bar li a', function (event) {
108
+ postContainer.on('click', '.formatting-bar li', function (event) {
111
109
  var format = $(this).attr('data-format');
112
110
  var textarea = $(this).parents('[component="composer"]').find('textarea')[0];
113
111
 
@@ -419,7 +419,7 @@ define('composer', [
419
419
 
420
420
  // Hide "zen mode" if fullscreen API is not enabled/available (ahem, iOS...)
421
421
  if (!screenfull.isEnabled) {
422
- $('[data-format="zen"]').parent().addClass('hidden');
422
+ $('[data-format="zen"]').addClass('hidden');
423
423
  }
424
424
 
425
425
  hooks.fire('action:composer.enhanced', { postContainer, postData, draft });
@@ -5,30 +5,24 @@
5
5
  <li class="small spacer"></li>
6
6
  {{{ else }}}
7
7
  {{{ if (./visibility.desktop && ((isTopicOrMain && ./visibility.main) || (!isTopicOrMain && ./visibility.reply))) }}}
8
- <li class="small">
9
- <a href="#" class="btn btn-sm btn-link text-reset position-relative" tabindex="-1" data-format="{./name}" title="{./title}">
10
- <i class="{./className}"></i>
11
- {{{ if ./badge }}}
12
- <span class="px-1 position-absolute top-0 start-100 translate-middle-x badge rounded text-bg-info"></span>
13
- {{{ end }}}
14
- </a>
8
+ <li class="btn btn-sm btn-link text-reset position-relative" tabindex="-1" data-format="{./name}" title="{./title}">
9
+ <i class="{./className}"></i>
10
+ {{{ if ./badge }}}
11
+ <span class="px-1 position-absolute top-0 start-100 translate-middle-x badge rounded text-bg-info"></span>
12
+ {{{ end }}}
15
13
  </li>
16
14
  {{{ end }}}
17
15
  {{{ end }}}
18
16
  {{{ end }}}
19
17
 
20
18
  {{{ if privileges.upload:post:image }}}
21
- <li class="img-upload-btn small">
22
- <a href="#" class="btn btn-sm btn-link text-reset" data-format="picture" tabindex="-1" title="[[modules:composer.upload-picture]]">
23
- <i class="fa fa-file-image-o"></i>
24
- </a>
19
+ <li class="img-upload-btn btn btn-sm btn-link text-reset" data-format="picture" tabindex="-1" title="[[modules:composer.upload-picture]]">
20
+ <i class="fa fa-file-image-o"></i>
25
21
  </li>
26
22
  {{{ end }}}
27
23
  {{{ if privileges.upload:post:file }}}
28
- <li class="file-upload-btn small">
29
- <a href="#" class="btn btn-sm btn-link text-reset" data-format="upload" tabindex="-1" title="[[modules:composer.upload-file]]">
30
- <i class="fa fa-file-o"></i>
31
- </a>
24
+ <li href="#" class="file-upload-btn btn btn-sm btn-link text-reset" data-format="upload" tabindex="-1" title="[[modules:composer.upload-file]]">
25
+ <i class="fa fa-file-o"></i>
32
26
  </li>
33
27
  {{{ end }}}
34
28