nodebb-plugin-composer-default 7.0.9 → 7.0.13
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": "7.0.
|
|
3
|
+
"version": "7.0.13",
|
|
4
4
|
"description": "Default composer for NodeBB",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"readmeFilename": "README.md",
|
|
28
28
|
"nbbpm": {
|
|
29
|
-
"compatibility": "^1.
|
|
29
|
+
"compatibility": "^1.18.6"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"screenfull": "^5.0.2",
|
|
33
|
-
"validator": "^13.
|
|
33
|
+
"validator": "^13.7.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"eslint": "^7.32.0",
|
package/static/lib/composer.js
CHANGED
|
@@ -19,8 +19,9 @@ define('composer', [
|
|
|
19
19
|
'api',
|
|
20
20
|
'bootbox',
|
|
21
21
|
'hooks',
|
|
22
|
+
'messages',
|
|
22
23
|
], function (taskbar, translator, uploads, formatting, drafts, tags,
|
|
23
|
-
categoryList, preview, resize, autocomplete, scheduler, scrollStop, topicThumbs, api, bootbox, hooks) {
|
|
24
|
+
categoryList, preview, resize, autocomplete, scheduler, scrollStop, topicThumbs, api, bootbox, hooks, messagesModule) {
|
|
24
25
|
var composer = {
|
|
25
26
|
active: undefined,
|
|
26
27
|
posts: {},
|
|
@@ -482,6 +483,13 @@ define('composer', [
|
|
|
482
483
|
tagWhitelist: postData.category ? postData.category.tagWhitelist : ajaxify.data.tagWhitelist,
|
|
483
484
|
privileges: app.user.privileges,
|
|
484
485
|
selectedCategory: postData.category,
|
|
486
|
+
submitOptions: [
|
|
487
|
+
// Add items using `filter:composer.create`, or just add them to the <ul> in DOM
|
|
488
|
+
// {
|
|
489
|
+
// action: 'foobar',
|
|
490
|
+
// text: 'Text Label',
|
|
491
|
+
// }
|
|
492
|
+
],
|
|
485
493
|
};
|
|
486
494
|
|
|
487
495
|
if (data.mobile) {
|
|
@@ -784,7 +792,7 @@ define('composer', [
|
|
|
784
792
|
composer.load(post_uuid);
|
|
785
793
|
textareaEl.prop('readonly', false);
|
|
786
794
|
if (err.message === '[[error:email-not-confirmed]]') {
|
|
787
|
-
return
|
|
795
|
+
return messagesModule.showEmailConfirmWarning(err.message);
|
|
788
796
|
}
|
|
789
797
|
composerAlert(post_uuid, err.message);
|
|
790
798
|
});
|
|
@@ -837,6 +845,12 @@ define('composer', [
|
|
|
837
845
|
onHide();
|
|
838
846
|
};
|
|
839
847
|
|
|
848
|
+
composer.minimizeActive = function () {
|
|
849
|
+
if (composer.active) {
|
|
850
|
+
composer.miminize(composer.active);
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
|
|
840
854
|
composer.updateThumbCount = function (uuid, postContainer) {
|
|
841
855
|
const composerObj = composer.posts[uuid];
|
|
842
856
|
if (composerObj.action === 'topics.post' || (composerObj.action === 'posts.edit' && composerObj.isMain)) {
|
|
@@ -54,7 +54,12 @@
|
|
|
54
54
|
<div class="btn-group pull-right action-bar hidden-sm hidden-xs">
|
|
55
55
|
<button class="btn btn-default composer-discard" data-action="discard" tabindex="-1"><i class="fa fa-times"></i> [[topic:composer.discard]]</button>
|
|
56
56
|
|
|
57
|
+
<ul class="dropdown-menu">{{{ each submitOptions }}}<li><a href="#" data-action="{./action}">{./text}</a></li>{{{ end }}}</ul>
|
|
57
58
|
<button class="btn btn-primary composer-submit" data-action="post" tabindex="6" data-text-variant=" [[topic:composer.schedule]]"><i class="fa fa-check"></i> [[topic:composer.submit]]</button>
|
|
59
|
+
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
60
|
+
<span class="caret"></span>
|
|
61
|
+
<span class="sr-only">[[topic:composer.additional-options]]</span>
|
|
62
|
+
</button>
|
|
58
63
|
</div>
|
|
59
64
|
</div>
|
|
60
65
|
|