nodebb-plugin-composer-default 10.1.1 → 10.1.3
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
|
@@ -75,9 +75,17 @@ define('composer/formatting', [
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
formatting.addComposerButtons = function () {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
const fileForm = $('.formatting-bar .formatting-group #fileForm');
|
|
79
|
+
buttons.forEach((btn) => {
|
|
80
|
+
fileForm
|
|
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>
|
|
86
|
+
</li>
|
|
87
|
+
`);
|
|
88
|
+
});
|
|
81
89
|
};
|
|
82
90
|
|
|
83
91
|
formatting.addButton = function (iconClass, onClick, title, name) {
|
|
@@ -99,7 +107,7 @@ define('composer/formatting', [
|
|
|
99
107
|
};
|
|
100
108
|
|
|
101
109
|
formatting.addHandler = function (postContainer) {
|
|
102
|
-
postContainer.on('click', '.formatting-bar li
|
|
110
|
+
postContainer.on('click', '.formatting-bar li', function (event) {
|
|
103
111
|
var format = $(this).attr('data-format');
|
|
104
112
|
var textarea = $(this).parents('[component="composer"]').find('textarea')[0];
|
|
105
113
|
|
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
|
|