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
|
@@ -79,10 +79,8 @@ define('composer/formatting', [
|
|
|
79
79
|
buttons.forEach((btn) => {
|
|
80
80
|
fileForm
|
|
81
81
|
.before(`
|
|
82
|
-
<li class="
|
|
83
|
-
<
|
|
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
|
|
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
|
|
package/static/lib/composer.js
CHANGED
|
@@ -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"]').
|
|
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="
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
22
|
-
<
|
|
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
|
|
29
|
-
<
|
|
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
|
|