nodebb-plugin-composer-default 10.0.19 → 10.0.21
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
package/static/lib/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
4
4
|
const drafts = {};
|
|
5
|
-
const draftSaveDelay =
|
|
5
|
+
const draftSaveDelay = 1000;
|
|
6
6
|
drafts.init = function (postContainer, postData) {
|
|
7
7
|
const draftIconEl = postContainer.find('.draft-icon');
|
|
8
8
|
function doSaveDraft() {
|
|
@@ -238,7 +238,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
238
238
|
};
|
|
239
239
|
|
|
240
240
|
drafts.loadOpen = function () {
|
|
241
|
-
if (ajaxify.data.template.login || ajaxify.data.template.register ||
|
|
241
|
+
if (ajaxify.data.template.login || ajaxify.data.template.register || (config.hasOwnProperty('openDraftsOnPageLoad') && !config.openDraftsOnPageLoad)) {
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
// Load drafts if they were open
|
|
@@ -11,6 +11,7 @@ define('composer/resize', ['taskbar'], function (taskbar) {
|
|
|
11
11
|
var $body = $('body');
|
|
12
12
|
var $window = $(window);
|
|
13
13
|
var $headerMenu = $('[component="navbar"]');
|
|
14
|
+
const content = document.getElementById('content');
|
|
14
15
|
|
|
15
16
|
var body = document.body;
|
|
16
17
|
var header = $headerMenu[0];
|
|
@@ -69,10 +70,10 @@ define('composer/resize', ['taskbar'], function (taskbar) {
|
|
|
69
70
|
// Add some extra space at the bottom of the body so that
|
|
70
71
|
// the user can still scroll to the last post w/ composer open
|
|
71
72
|
var rect = elem.getBoundingClientRect();
|
|
72
|
-
|
|
73
|
+
content.style.paddingBottom = (rect.bottom - rect.top).toString() + 'px';
|
|
73
74
|
} else {
|
|
74
75
|
postContainer.removeAttr('style');
|
|
75
|
-
|
|
76
|
+
content.style.paddingBottom = 0;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
postContainer.ratio = ratio;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="title-container">
|
|
1
|
+
<div class="title-container d-flex">
|
|
2
2
|
{{{ if isTopic }}}
|
|
3
3
|
<div class="category-list-container hidden-sm hidden-xs align-self-center">
|
|
4
4
|
<!-- IMPORT partials/category-selector.tpl -->
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<input class="handle form-control h-100" type="text" tabindex="1" placeholder="[[topic:composer.handle_placeholder]]" value="{handle}" />
|
|
11
11
|
</div>
|
|
12
12
|
{{{ end }}}
|
|
13
|
-
<div data-component="composer/title" class="position-relative">
|
|
13
|
+
<div data-component="composer/title" class="position-relative" style="min-width:0;">
|
|
14
14
|
{{{ if isTopicOrMain }}}
|
|
15
15
|
<input class="title form-control h-100" type="text" tabindex="1" placeholder="[[topic:composer.title_placeholder]]" value="{topicTitle}"/>
|
|
16
16
|
{{{ else }}}
|
|
17
|
-
<span class="title h-100">{{{ if isEditing }}}[[topic:composer.editing]]{{{ else }}}[[topic:composer.replying_to, "{topicTitle}"]]{{{ end }}}</span>
|
|
17
|
+
<span class="title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing]]{{{ else }}}[[topic:composer.replying_to, "{topicTitle}"]]{{{ end }}}</span>
|
|
18
18
|
{{{ end }}}
|
|
19
19
|
<div id="quick-search-container" class="quick-search-container mt-2 dropdown-menu d-block p-2 hidden">
|
|
20
20
|
<div class="text-center loading-indicator"><i class="fa fa-spinner fa-spin"></i></div>
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div class="
|
|
25
|
+
<div class="draft-icon hidden-xs hidden-sm"></div>
|
|
26
26
|
|
|
27
|
-
<div class="display-scheduler
|
|
27
|
+
<div class="display-scheduler hidden-sm hidden-xs{{{ if !canSchedule }}} hidden{{{ end }}}">
|
|
28
28
|
<i class="fa fa-clock-o"></i>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
<div class="btn-group
|
|
31
|
+
<div class="btn-group action-bar hidden-sm hidden-xs">
|
|
32
32
|
<button class="btn btn-outline-secondary composer-discard" data-action="discard" tabindex="-1"><i class="fa fa-times"></i> [[topic:composer.discard]]</button>
|
|
33
33
|
|
|
34
34
|
<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>
|