nodebb-plugin-composer-default 7.0.10 → 7.0.14

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.10",
3
+ "version": "7.0.14",
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.17.2"
29
+ "compatibility": "^1.18.6"
30
30
  },
31
31
  "dependencies": {
32
32
  "screenfull": "^5.0.2",
33
- "validator": "^13.1.17"
33
+ "validator": "^13.7.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "eslint": "^7.32.0",
@@ -107,6 +107,14 @@
107
107
  .composer-submit, .composer-discard {
108
108
  min-width: 106px;
109
109
  }
110
+
111
+ .action-bar {
112
+ .dropdown-menu:empty {
113
+ & ~ .dropdown-toggle {
114
+ display: none;
115
+ }
116
+ }
117
+ }
110
118
  }
111
119
 
112
120
  .display-scheduler {
@@ -19,8 +19,12 @@ define('composer', [
19
19
  'api',
20
20
  'bootbox',
21
21
  'hooks',
22
+ 'messages',
23
+ 'search',
22
24
  ], function (taskbar, translator, uploads, formatting, drafts, tags,
23
- categoryList, preview, resize, autocomplete, scheduler, scrollStop, topicThumbs, api, bootbox, hooks) {
25
+ categoryList, preview, resize, autocomplete, scheduler, scrollStop,
26
+ topicThumbs, api, bootbox, hooks, messagesModule, search
27
+ ) {
24
28
  var composer = {
25
29
  active: undefined,
26
30
  posts: {},
@@ -482,6 +486,13 @@ define('composer', [
482
486
  tagWhitelist: postData.category ? postData.category.tagWhitelist : ajaxify.data.tagWhitelist,
483
487
  privileges: app.user.privileges,
484
488
  selectedCategory: postData.category,
489
+ submitOptions: [
490
+ // Add items using `filter:composer.create`, or just add them to the <ul> in DOM
491
+ // {
492
+ // action: 'foobar',
493
+ // text: 'Text Label',
494
+ // }
495
+ ],
485
496
  };
486
497
 
487
498
  if (data.mobile) {
@@ -602,7 +613,7 @@ define('composer', [
602
613
  return;
603
614
  }
604
615
 
605
- app.enableTopicSearch({
616
+ search.enableQuickSearch({
606
617
  searchElements: {
607
618
  inputEl: postContainer.find('input.title'),
608
619
  resultEl: postContainer.find('.quick-search-container'),
@@ -784,7 +795,7 @@ define('composer', [
784
795
  composer.load(post_uuid);
785
796
  textareaEl.prop('readonly', false);
786
797
  if (err.message === '[[error:email-not-confirmed]]') {
787
- return app.showEmailConfirmWarning(err);
798
+ return messagesModule.showEmailConfirmWarning(err.message);
788
799
  }
789
800
  composerAlert(post_uuid, err.message);
790
801
  });
@@ -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