nodebb-theme-persona 13.0.12 → 13.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-theme-persona",
3
- "version": "13.0.12",
3
+ "version": "13.0.14",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
@@ -1,8 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  define('persona/quickreply', [
4
- 'components', 'composer/autocomplete', 'api', 'alerts', 'uploadHelpers',
5
- ], function (components, autocomplete, api, alerts, uploadHelpers) {
4
+ 'components', 'composer', 'composer/autocomplete', 'api',
5
+ 'alerts', 'uploadHelpers', 'mousetrap',
6
+ ], function (
7
+ components, composer, autocomplete, api,
8
+ alerts, uploadHelpers, mousetrap
9
+ ) {
6
10
  var QuickReply = {};
7
11
 
8
12
  QuickReply.init = function () {
@@ -27,6 +31,11 @@ define('persona/quickreply', [
27
31
  // data.element.textcomplete(data.strategies, data.options);
28
32
  // $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
29
33
 
34
+ mousetrap.bind('ctrl+return', (e) => {
35
+ if (e.target === element.get(0)) {
36
+ components.get('topic/quickreply/button').get(0).click();
37
+ }
38
+ });
30
39
 
31
40
  uploadHelpers.init({
32
41
  dragDropAreaEl: $('[component="topic/quickreply/container"] .quickreply-message'),
@@ -79,6 +88,14 @@ define('persona/quickreply', [
79
88
  autocomplete._active.persona_qr.hide();
80
89
  });
81
90
  });
91
+
92
+ components.get('topic/quickreply/expand').on('click', (e) => {
93
+ e.preventDefault();
94
+
95
+ const textEl = components.get('topic/quickreply/text');
96
+ composer.newReply(ajaxify.data.tid, undefined, ajaxify.data.title, utils.escapeHTML(textEl.val()));
97
+ textEl.val('');
98
+ });
82
99
  };
83
100
 
84
101
  return QuickReply;
package/scss/persona.scss CHANGED
@@ -13,7 +13,6 @@
13
13
  @import "chats";
14
14
  @import "search";
15
15
  @import "topics_list";
16
- @import "outgoing";
17
16
  @import "footer";
18
17
  @import "posts_list";
19
18
  @import "register";
@@ -30,7 +29,6 @@
30
29
  @import "modules/alerts";
31
30
  @import "modules/fab";
32
31
  @import "modules/morph";
33
- @import "modules/composer-default";
34
32
  @import "modules/cookie-consent";
35
33
  @import "modules/necro-post";
36
34
 
package/scss/topic.scss CHANGED
@@ -326,7 +326,7 @@
326
326
  .posts .icon {
327
327
  min-width: 0;
328
328
  min-height: 0;
329
- margin-top: -3px;
329
+ margin-top: 0px;
330
330
 
331
331
  .avatar {
332
332
  @include user-icon-style(23px, calc(23px * 0.6), 50%);
@@ -19,8 +19,8 @@
19
19
  <i class="fa fa-clone"></i> [[flags:bulk-actions]] <span class="caret"></span>
20
20
  </button>
21
21
  <ul class="dropdown-menu">
22
- <li><a href="#" data-action="bulk-assign">[[flags:assign-to-me]]</a></li>
23
- <li><a href="#" data-action="bulk-mark-resolved">[[flags:bulk-resolve]]</a></li>
22
+ <li><a href="#" class="dropdown-item" data-action="bulk-assign">[[flags:assign-to-me]]</a></li>
23
+ <li><a href="#" class="dropdown-item" data-action="bulk-mark-resolved">[[flags:bulk-resolve]]</a></li>
24
24
  </ul>
25
25
  </div>
26
26
 
@@ -1,9 +1,9 @@
1
- <div class="form-group">
2
- <label for="agree-terms">[[register:terms_of_use]]</label>
3
- <div class="tos">{termsOfUse}</div>
4
- <div class="checkbox">
5
- <label>
6
- <input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
7
- </label>
8
- </div>
1
+ <div class="form-group">
2
+ <label for="agree-terms">[[register:terms_of_use]]</label>
3
+ <div class="tos">{termsOfUse}</div>
4
+ <div class="checkbox">
5
+ <label>
6
+ <input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
7
+ </label>
8
+ </div>
9
9
  </div>
@@ -1,11 +1,11 @@
1
- <!-- IF ../isSection -->
2
- {../name}
3
- <!-- ELSE -->
4
- <!-- IF ../link -->
5
- <a href="{../link}" itemprop="url">
6
- <!-- ELSE -->
7
- <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
- <!-- ENDIF ../link -->
9
- {../name}
10
- </a>
1
+ <!-- IF ../isSection -->
2
+ {../name}
3
+ <!-- ELSE -->
4
+ <!-- IF ../link -->
5
+ <a href="{../link}" itemprop="url">
6
+ <!-- ELSE -->
7
+ <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
+ <!-- ENDIF ../link -->
9
+ {../name}
10
+ </a>
11
11
  <!-- ENDIF ../isSection -->
@@ -12,10 +12,13 @@
12
12
  <input type="hidden" name="tid" value="{tid}" />
13
13
  <input type="hidden" name="_csrf" value="{config.csrf_token}" />
14
14
  <div class="quickreply-message">
15
- <textarea name="content" component="topic/quickreply/text" class="form-control" rows="5" placeholder="[[modules:composer.textarea.placeholder]]"></textarea>
15
+ <textarea name="content" component="topic/quickreply/text" class="form-control mousetrap" rows="5" placeholder="[[modules:composer.textarea.placeholder]]"></textarea>
16
16
  <div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
17
17
  </div>
18
- <button type="submit" component="topic/quickreply/button" class="btn btn-primary float-end">[[topic:post-quick-reply]]</button>
18
+ <div class="btn-group float-end">
19
+ <button type="submit" component="topic/quickreply/button" class="btn btn-primary">[[topic:post-quick-reply]]</button>
20
+ <button type="submit" component="topic/quickreply/expand" class="btn btn-default" formmethod="get"><i class="fa fa-expand"></i></button>
21
+ </div>
19
22
  </form>
20
23
  <form component="topic/quickreply/upload" method="post" enctype="multipart/form-data">
21
24
  <input type="file" name="files[]" multiple class="hidden"/>
package/templates/tos.tpl CHANGED
@@ -1,4 +1,4 @@
1
- <h3>[[register:terms_of_use]]</h3>
2
- <hr/>
3
-
4
- {termsOfUse}
1
+ <h3>[[register:terms_of_use]]</h3>
2
+ <hr/>
3
+
4
+ {termsOfUse}
package/theme.json CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "id": "nodebb-theme-persona",
3
- "name": "Persona",
4
- "description": "The default theme for NodeBB. Uses a standard approach to forum design.",
5
- "url": "https://github.com/psychobunny/nodebb-theme-persona",
6
- "screenshot": "screenshot.png"
1
+ {
2
+ "id": "nodebb-theme-persona",
3
+ "name": "Persona",
4
+ "description": "The default theme for NodeBB. Uses a standard approach to forum design.",
5
+ "url": "https://github.com/psychobunny/nodebb-theme-persona",
6
+ "screenshot": "screenshot.png"
7
7
  }
@@ -1,5 +0,0 @@
1
- .composer {
2
- .preview {
3
- overflow-y: auto;
4
- }
5
- }
@@ -1,9 +0,0 @@
1
- .outgoing {
2
- .btn-primary {
3
- max-width: 100%;
4
- overflow: hidden;
5
- text-overflow: ellipse;
6
- white-space: inherit;
7
- word-break: break-all;
8
- }
9
- }