nodebb-plugin-composer-default 10.0.21 → 10.0.23
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 +1 -1
- package/static/lib/composer/drafts.js +3 -1
- package/static/lib/composer/formatting.js +2 -2
- package/static/lib/composer/preview.js +39 -47
- package/static/lib/composer/resize.js +4 -0
- package/static/lib/composer/scheduler.js +1 -1
- package/static/lib/composer.js +10 -4
- package/static/scss/composer.scss +26 -187
- package/static/scss/medium.scss +3 -46
- package/static/scss/page-compose.scss +0 -4
- package/static/scss/zen-mode.scss +0 -4
- package/static/templates/composer.tpl +9 -3
- package/static/templates/partials/composer-formatting.tpl +43 -24
- package/static/templates/partials/composer-title-container.tpl +22 -22
- package/static/templates/partials/composer-write-preview.tpl +5 -12
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
74
74
|
function saveDraft(postContainer, draftIconEl, postData) {
|
|
75
75
|
if (canSave(app.user.uid ? 'localStorage' : 'sessionStorage') && postData && postData.save_id && postContainer.length) {
|
|
76
76
|
const titleEl = postContainer.find('input.title');
|
|
77
|
-
const title = titleEl && titleEl.val();
|
|
77
|
+
const title = titleEl && titleEl.length && titleEl.val();
|
|
78
78
|
const raw = postContainer.find('textarea').val();
|
|
79
79
|
const storage = getStorage(app.user.uid);
|
|
80
80
|
|
|
@@ -100,6 +100,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
100
100
|
draftData.toPid = postData.toPid;
|
|
101
101
|
} else if (postData.action === 'posts.edit') {
|
|
102
102
|
draftData.pid = postData.pid;
|
|
103
|
+
draftData.title = title;
|
|
103
104
|
}
|
|
104
105
|
if (!app.user.uid) {
|
|
105
106
|
draftData.handle = postContainer.find('input.handle').val();
|
|
@@ -297,6 +298,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
297
298
|
composer.editPost({
|
|
298
299
|
save_id: draft.save_id,
|
|
299
300
|
pid: draft.pid,
|
|
301
|
+
title: draft.title ? utils.escapeHTML(draft.title) : undefined,
|
|
300
302
|
body: utils.escapeHTML(draft.text),
|
|
301
303
|
});
|
|
302
304
|
}
|
|
@@ -81,7 +81,7 @@ define('composer/formatting', [
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
formatting.addButton = function (iconClass, onClick, title, name) {
|
|
84
|
-
name = name || iconClass.replace('fa fa-', '')
|
|
84
|
+
name = name || iconClass.replace('fa fa-', '');
|
|
85
85
|
formattingDispatchTable[name] = onClick;
|
|
86
86
|
buttons.push({
|
|
87
87
|
name,
|
|
@@ -99,7 +99,7 @@ define('composer/formatting', [
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
formatting.addHandler = function (postContainer) {
|
|
102
|
-
postContainer.on('click', '.formatting-bar li', function (event) {
|
|
102
|
+
postContainer.on('click', '.formatting-bar li a', function (event) {
|
|
103
103
|
var format = $(this).attr('data-format');
|
|
104
104
|
var textarea = $(this).parents('[component="composer"]').find('textarea')[0];
|
|
105
105
|
|
|
@@ -43,63 +43,55 @@ define('composer/preview', ['hooks'], function (hooks) {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
preview.handleToggler = function (postContainer) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
function showPreview() {
|
|
61
|
-
togglePreview(true);
|
|
62
|
-
if (preview.env !== 'xs' && preview.env !== 'sm') {
|
|
63
|
-
localStorage.removeItem('composer:previewToggled');
|
|
64
|
-
}
|
|
46
|
+
preview.handleToggler = function ($postContainer) {
|
|
47
|
+
const postContainer = $postContainer.get(0);
|
|
48
|
+
|
|
49
|
+
const isMobile = ['xs', 'sm'].includes(utils.findBootstrapEnvironment());
|
|
50
|
+
const toggler = postContainer.querySelector('.formatting-bar [data-action="preview"]');
|
|
51
|
+
const showText = toggler.querySelector('.show-text');
|
|
52
|
+
const hideText = toggler.querySelector('.hide-text');
|
|
53
|
+
let show = localStorage.getItem('composer:previewToggled') || (preview.env === 'xs' || preview.env === 'sm');
|
|
54
|
+
const previewContainer = postContainer.querySelector('.preview-container');
|
|
55
|
+
const writeContainer = postContainer.querySelector('.write-container');
|
|
56
|
+
|
|
57
|
+
if (!toggler) {
|
|
58
|
+
return;
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
function togglePreview(show) {
|
|
68
|
-
if (
|
|
69
|
-
previewContainer.
|
|
70
|
-
writeContainer.
|
|
71
|
-
|
|
72
|
-
previewContainer.
|
|
73
|
-
writeContainer.
|
|
74
|
-
|
|
75
|
-
// Render preview once on mobile
|
|
76
|
-
if (show) {
|
|
77
|
-
preview.render(postContainer);
|
|
78
|
-
}
|
|
62
|
+
if (isMobile) {
|
|
63
|
+
previewContainer.classList.toggle('hide', false);
|
|
64
|
+
writeContainer.classList.toggle('maximized', false);
|
|
65
|
+
previewContainer.classList.toggle('d-none', !show);
|
|
66
|
+
previewContainer.classList.toggle('d-flex', show);
|
|
67
|
+
writeContainer.classList.toggle('d-flex', !show);
|
|
68
|
+
writeContainer.classList.toggle('d-none', show);
|
|
79
69
|
} else {
|
|
80
|
-
previewContainer.
|
|
81
|
-
writeContainer.
|
|
82
|
-
|
|
83
|
-
}
|
|
70
|
+
previewContainer.classList.toggle('hide', !show);
|
|
71
|
+
writeContainer.classList.toggle('w-50', show);
|
|
72
|
+
writeContainer.classList.toggle('w-100', !show);
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
localStorage[show ? 'removeItem' : 'setItem']('composer:previewToggled', true);
|
|
75
|
+
}
|
|
76
|
+
showText.classList.toggle('hide', show);
|
|
77
|
+
hideText.classList.toggle('hide', !show);
|
|
78
|
+
if (show) {
|
|
79
|
+
preview.render($postContainer);
|
|
80
|
+
}
|
|
81
|
+
preview.matchScroll($postContainer);
|
|
86
82
|
}
|
|
87
83
|
preview.toggle = togglePreview;
|
|
88
84
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
toggler.addEventListener('click', (e) => {
|
|
86
|
+
if (e.button !== 0) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
show = !show;
|
|
91
|
+
togglePreview(show);
|
|
96
92
|
});
|
|
97
93
|
|
|
98
|
-
|
|
99
|
-
hidePreview();
|
|
100
|
-
} else {
|
|
101
|
-
showPreview();
|
|
102
|
-
}
|
|
94
|
+
togglePreview(show);
|
|
103
95
|
};
|
|
104
96
|
|
|
105
97
|
return preview;
|
|
@@ -33,7 +33,7 @@ define('composer/scheduler', ['benchpress', 'bootbox', 'alerts'], function (Benc
|
|
|
33
33
|
submitBtn.defaultText = submitBtn.el.lastChild.textContent;
|
|
34
34
|
submitBtn.activeText = submitBtn.el.getAttribute('data-text-variant');
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
displayBtnCons.forEach(el => el.addEventListener('click', openModal));
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
scheduler.getTimestamp = function () {
|
package/static/lib/composer.js
CHANGED
|
@@ -291,6 +291,10 @@ define('composer', [
|
|
|
291
291
|
postData.body = data.body;
|
|
292
292
|
postData.modified = true;
|
|
293
293
|
}
|
|
294
|
+
if (data.title) {
|
|
295
|
+
postData.title = data.title;
|
|
296
|
+
postData.modified = true;
|
|
297
|
+
}
|
|
294
298
|
push(postData);
|
|
295
299
|
});
|
|
296
300
|
};
|
|
@@ -413,7 +417,7 @@ define('composer', [
|
|
|
413
417
|
|
|
414
418
|
// Hide "zen mode" if fullscreen API is not enabled/available (ahem, iOS...)
|
|
415
419
|
if (!screenfull.isEnabled) {
|
|
416
|
-
$('[data-format="zen"]').addClass('hidden');
|
|
420
|
+
$('[data-format="zen"]').parent().addClass('hidden');
|
|
417
421
|
}
|
|
418
422
|
|
|
419
423
|
hooks.fire('action:composer.enhanced', { postContainer, postData, draft });
|
|
@@ -572,12 +576,14 @@ define('composer', [
|
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
function handleHelp(postContainer) {
|
|
575
|
-
var helpBtn = postContainer.find('
|
|
579
|
+
var helpBtn = postContainer.find('[data-action="help"]');
|
|
576
580
|
socket.emit('plugins.composer.renderHelp', function (err, html) {
|
|
577
581
|
if (!err && html && html.length > 0) {
|
|
578
|
-
helpBtn.removeClass('hidden');
|
|
579
582
|
helpBtn.on('click', function () {
|
|
580
|
-
bootbox.
|
|
583
|
+
bootbox.dialog({
|
|
584
|
+
size: 'large',
|
|
585
|
+
message: html,
|
|
586
|
+
});
|
|
581
587
|
});
|
|
582
588
|
}
|
|
583
589
|
});
|
|
@@ -11,12 +11,6 @@
|
|
|
11
11
|
right: 0;
|
|
12
12
|
left: 0;
|
|
13
13
|
|
|
14
|
-
.composer-container {
|
|
15
|
-
height: 100%;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
.mobile-navbar {
|
|
21
15
|
position: static;
|
|
22
16
|
min-height: 40px;
|
|
@@ -46,29 +40,10 @@
|
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
.title-container {
|
|
49
|
-
border-bottom: 1px solid $border-color;
|
|
50
|
-
margin: 0;
|
|
51
|
-
|
|
52
|
-
> div[data-component="composer/title"] {
|
|
53
|
-
flex: 1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
43
|
> div[data-component="composer/handle"] {
|
|
57
44
|
flex: 0.33;
|
|
58
45
|
}
|
|
59
46
|
|
|
60
|
-
.title, .handle {
|
|
61
|
-
background: transparent;
|
|
62
|
-
color: $body-color;
|
|
63
|
-
display: block;
|
|
64
|
-
margin: 0;
|
|
65
|
-
padding: 8px;
|
|
66
|
-
font-size: 18px;
|
|
67
|
-
border: 0;
|
|
68
|
-
box-shadow: none;
|
|
69
|
-
overflow: hidden;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
47
|
.category-list-container {
|
|
73
48
|
|
|
74
49
|
[component="category-selector"] {
|
|
@@ -84,10 +59,6 @@
|
|
|
84
59
|
padding: 0 2rem;
|
|
85
60
|
}
|
|
86
61
|
|
|
87
|
-
.composer-submit, .composer-discard {
|
|
88
|
-
min-width: 106px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
62
|
.action-bar {
|
|
92
63
|
.dropdown-menu:empty {
|
|
93
64
|
& ~ .dropdown-toggle {
|
|
@@ -97,26 +68,6 @@
|
|
|
97
68
|
}
|
|
98
69
|
}
|
|
99
70
|
|
|
100
|
-
.display-scheduler {
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
margin-right: 1em;
|
|
104
|
-
|
|
105
|
-
> i {
|
|
106
|
-
font-size: 30px;
|
|
107
|
-
display: inline-block;
|
|
108
|
-
cursor: pointer;
|
|
109
|
-
|
|
110
|
-
&.active {
|
|
111
|
-
animation: 300ms ease forwards pulse;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.category-tag-row {
|
|
117
|
-
margin: 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
71
|
.formatting-bar {
|
|
121
72
|
margin: 0;
|
|
122
73
|
|
|
@@ -128,25 +79,7 @@
|
|
|
128
79
|
}
|
|
129
80
|
|
|
130
81
|
.formatting-group {
|
|
131
|
-
padding: 0;
|
|
132
|
-
margin: 0;
|
|
133
|
-
overflow-x: auto;
|
|
134
|
-
white-space: nowrap;
|
|
135
|
-
display: block;
|
|
136
|
-
list-style: none;
|
|
137
|
-
|
|
138
82
|
li {
|
|
139
|
-
display: inline-block;
|
|
140
|
-
padding: 10px 15px;
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
position: relative;
|
|
143
|
-
|
|
144
|
-
&:focus, &:hover {
|
|
145
|
-
outline: none;
|
|
146
|
-
color: $dropdown-link-hover-color;
|
|
147
|
-
background-color: $dropdown-link-hover-bg;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
83
|
&[data-format="thumbs"][data-count]:after {
|
|
151
84
|
content: attr(data-count);
|
|
152
85
|
background: $info;
|
|
@@ -163,69 +96,6 @@
|
|
|
163
96
|
}
|
|
164
97
|
}
|
|
165
98
|
|
|
166
|
-
.write-preview-container {
|
|
167
|
-
flex: 2;
|
|
168
|
-
display: flex;
|
|
169
|
-
overflow: hidden;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.write-container, .preview-container {
|
|
173
|
-
display: flex;
|
|
174
|
-
flex: 1;
|
|
175
|
-
position: relative;
|
|
176
|
-
|
|
177
|
-
.help-text {
|
|
178
|
-
text-transform: uppercase;
|
|
179
|
-
position: absolute;
|
|
180
|
-
right: 35px;
|
|
181
|
-
top: 8px;
|
|
182
|
-
font-size: 10px;
|
|
183
|
-
z-index: 1;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.write-container {
|
|
188
|
-
&.maximized {
|
|
189
|
-
width: 100%;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.preview-container {
|
|
194
|
-
word-wrap: break-word;
|
|
195
|
-
max-width: 50%;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.write, .preview {
|
|
199
|
-
width: 100%;
|
|
200
|
-
font-size: 16px;
|
|
201
|
-
@include border-radius(0);
|
|
202
|
-
resize: none;
|
|
203
|
-
overflow: auto;
|
|
204
|
-
padding: 25px 10px;
|
|
205
|
-
margin: 0;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.write {
|
|
209
|
-
border: none;
|
|
210
|
-
border-top: 1px solid $border-color;
|
|
211
|
-
border-bottom: 1px solid $border-color;
|
|
212
|
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.preview {
|
|
216
|
-
-webkit-touch-callout: default;
|
|
217
|
-
user-select: text;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.help {
|
|
221
|
-
@include pointer;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.toggle-preview {
|
|
225
|
-
margin-left: 20px;
|
|
226
|
-
@include pointer;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
99
|
.tags-container {
|
|
230
100
|
[component="composer/tag/dropdown"] {
|
|
231
101
|
.dropdown-menu {
|
|
@@ -271,46 +141,17 @@
|
|
|
271
141
|
}
|
|
272
142
|
|
|
273
143
|
.resizer {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
left:
|
|
277
|
-
width: 80%;
|
|
278
|
-
top: 0px;
|
|
279
|
-
height: 0;
|
|
280
|
-
|
|
281
|
-
@include pointer;
|
|
144
|
+
background: linear-gradient(transparent, #fff);
|
|
145
|
+
margin-left: calc($spacer * -0.5);
|
|
146
|
+
padding-left: $spacer;
|
|
282
147
|
|
|
283
148
|
.trigger {
|
|
284
|
-
|
|
285
|
-
display: block;
|
|
286
|
-
top: -20px;
|
|
287
|
-
margin: 0 auto;
|
|
288
|
-
margin-left: 20px;
|
|
289
|
-
line-height: 26px;
|
|
290
|
-
@include transition(filter .15s linear);
|
|
291
|
-
|
|
292
|
-
&:hover {
|
|
293
|
-
filter: invert(100%);
|
|
294
|
-
cursor: ns-resize;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
i {
|
|
298
|
-
width: 32px;
|
|
299
|
-
height: 32px;
|
|
300
|
-
background: #333;
|
|
301
|
-
border: 1px solid #333;
|
|
302
|
-
border-radius: 50%;
|
|
149
|
+
cursor: ns-resize;
|
|
303
150
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
&:before {
|
|
310
|
-
content: fa-content($fa-var-arrows-alt-v);
|
|
311
|
-
position: relative;
|
|
312
|
-
top: 25%;
|
|
313
|
-
}
|
|
151
|
+
.handle {
|
|
152
|
+
border-top-left-radius: 50%;
|
|
153
|
+
border-top-right-radius: 50%;
|
|
154
|
+
border-bottom: 0 !important;
|
|
314
155
|
}
|
|
315
156
|
}
|
|
316
157
|
}
|
|
@@ -365,33 +206,35 @@
|
|
|
365
206
|
}
|
|
366
207
|
|
|
367
208
|
&.resizable.maximized {
|
|
368
|
-
.resizer
|
|
369
|
-
|
|
370
|
-
|
|
209
|
+
.resizer {
|
|
210
|
+
top: 0 !important;
|
|
211
|
+
background: transparent;
|
|
212
|
+
|
|
213
|
+
.trigger {
|
|
214
|
+
.handle {
|
|
215
|
+
border-top-left-radius: 0%;
|
|
216
|
+
border-top-right-radius: 0%;
|
|
217
|
+
border-bottom-left-radius: 50%;
|
|
218
|
+
border-bottom-right-radius: 50%;
|
|
219
|
+
border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
i {
|
|
223
|
+
&:before {
|
|
224
|
+
content: fa-content($fa-var-chevron-down);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
371
227
|
}
|
|
372
228
|
}
|
|
373
|
-
|
|
374
|
-
box-shadow: none;
|
|
375
229
|
}
|
|
376
230
|
|
|
377
231
|
.draft-icon {
|
|
378
232
|
font-family: 'FontAwesome';
|
|
379
233
|
color: $success;
|
|
380
|
-
margin: 0 1em;
|
|
381
234
|
opacity: 0;
|
|
382
235
|
|
|
383
236
|
&::before {
|
|
384
237
|
content: fa-content($fa-var-save);
|
|
385
|
-
position: relative;
|
|
386
|
-
top: 25%;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
&::after {
|
|
390
|
-
content: fa-content($fa-var-check);
|
|
391
|
-
position: relative;
|
|
392
|
-
top: 18px;
|
|
393
|
-
font-size: 0.7em;
|
|
394
|
-
left: -15%;
|
|
395
238
|
}
|
|
396
239
|
|
|
397
240
|
&.active {
|
|
@@ -487,10 +330,6 @@
|
|
|
487
330
|
}
|
|
488
331
|
}
|
|
489
332
|
|
|
490
|
-
.toggle-preview.hide {
|
|
491
|
-
display: inline-block !important;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
333
|
.preview-container {
|
|
495
334
|
max-width: initial;
|
|
496
335
|
}
|
package/static/scss/medium.scss
CHANGED
|
@@ -14,50 +14,7 @@
|
|
|
14
14
|
display: flex;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.title, .handle {
|
|
21
|
-
font-size: 22px;
|
|
22
|
-
padding: 4px;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.formatting-bar .formatting-group {
|
|
27
|
-
display: inline-block;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.resizable {
|
|
31
|
-
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.5);
|
|
32
|
-
|
|
33
|
-
padding-top: 30px;
|
|
34
|
-
padding-left: 15px;
|
|
35
|
-
padding-right: 15px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.category-tag-row {
|
|
39
|
-
margin-top: 5px;
|
|
40
|
-
margin-bottom: 8px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.write-preview-container {
|
|
44
|
-
margin-bottom: 15px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.write, .preview {
|
|
48
|
-
padding: 20px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.write {
|
|
52
|
-
border: 1px solid $border-color;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.tags-container {
|
|
56
|
-
margin-top: 8px - 15px;
|
|
57
|
-
margin-bottom: 8px;
|
|
58
|
-
|
|
59
|
-
.bootstrap-tagsinput {
|
|
60
|
-
padding: 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
17
|
+
// &.resizable {
|
|
18
|
+
// box-shadow: 0px -20px 20px rgba(255, 255, 255);
|
|
19
|
+
// }
|
|
63
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<div component="composer" class="composer<!-- IF resizable --> resizable<!-- ENDIF resizable --><!-- IF !isTopicOrMain --> reply<!-- ENDIF !isTopicOrMain -->">
|
|
1
|
+
<div component="composer" class="composer pt-2 px-2<!-- IF resizable --> resizable<!-- ENDIF resizable --><!-- IF !isTopicOrMain --> reply<!-- ENDIF !isTopicOrMain -->">
|
|
2
2
|
|
|
3
|
-
<div class="composer-container">
|
|
3
|
+
<div class="composer-container d-flex flex-column gap-1 h-100">
|
|
4
4
|
<!-- mobile header -->
|
|
5
5
|
<nav class="navbar fixed-top mobile-navbar hidden-md hidden-lg text-bg-primary flex-nowrap">
|
|
6
6
|
<div class="btn-group">
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
|
|
36
36
|
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
37
37
|
|
|
38
|
-
<div class="resizer
|
|
38
|
+
<div class="resizer position-absolute w-100 bottom-100 pe-3 border-bottom">
|
|
39
|
+
<div class="trigger text-center">
|
|
40
|
+
<div class="handle d-inline-block px-2 py-1 border bg-body">
|
|
41
|
+
<i class="fa fa-fw fa-up-down"></i>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
39
45
|
</div>
|
|
40
46
|
</div>
|
|
@@ -1,30 +1,49 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<!--
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<div class="d-flex justify-content-between align-items-center formatting-bar">
|
|
2
|
+
<ul class="list-unstyled mb-0 d-flex formatting-group gap-2">
|
|
3
|
+
<!-- BEGIN formatting -->
|
|
4
|
+
<!-- IF formatting.spacer -->
|
|
5
|
+
<li class="small spacer"></li>
|
|
6
|
+
<!-- ELSE -->
|
|
7
|
+
{{{ if (./visibility.desktop && ((isTopicOrMain && ./visibility.main) || (!isTopicOrMain && ./visibility.reply))) }}}
|
|
8
|
+
<li class="small">
|
|
9
|
+
<a href="#" class="btn btn-sm btn-link text-reset" tabindex="-1" data-format="{formatting.name}" title="{formatting.title}">
|
|
10
|
+
<i class="{formatting.className}"></i>
|
|
11
|
+
</a>
|
|
12
|
+
</li>
|
|
13
|
+
{{{ end }}}
|
|
14
|
+
<!-- ENDIF formatting.spacer -->
|
|
15
|
+
<!-- END formatting -->
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
<!-- IF privileges.upload:post:image -->
|
|
18
|
+
<li class="img-upload-btn small">
|
|
19
|
+
<a href="#" class="btn btn-sm btn-link text-reset" data-format="picture" tabindex="-1" title="[[modules:composer.upload-picture]]">
|
|
16
20
|
<i class="fa fa-file-image-o"></i>
|
|
17
|
-
</
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
</a>
|
|
22
|
+
</li>
|
|
23
|
+
<!-- ENDIF privileges.upload:post:image -->
|
|
24
|
+
<!-- IF privileges.upload:post:file -->
|
|
25
|
+
<li class="file-upload-btn small">
|
|
26
|
+
<a href="#" class="btn btn-sm btn-link text-reset" data-format="upload" tabindex="-1" title="[[modules:composer.upload-file]]">
|
|
21
27
|
<i class="fa fa-file-o"></i>
|
|
22
|
-
</
|
|
23
|
-
|
|
28
|
+
</a>
|
|
29
|
+
</li>
|
|
30
|
+
<!-- ENDIF privileges.upload:post:file -->
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
<form id="fileForm" method="post" enctype="multipart/form-data">
|
|
33
|
+
<input type="file" id="files" name="files[]" multiple class="gte-ie9 hide"/>
|
|
34
|
+
</form>
|
|
35
|
+
</ul>
|
|
36
|
+
<div class="d-flex gap-1">
|
|
37
|
+
<div class="draft-icon mx-2 hidden-xs hidden-sm"></div>
|
|
38
|
+
<button class="btn btn-sm btn-link py-2 text-body fw-semibold" data-action="preview">
|
|
39
|
+
<i class="fa fa-eye"></i>
|
|
40
|
+
<span class="d-none d-md-inline show-text">[[modules:composer.show_preview]]</span>
|
|
41
|
+
<span class="d-none d-md-inline hide-text">[[modules:composer.hide_preview]]</span>
|
|
42
|
+
</button>
|
|
43
|
+
<button class="btn btn-sm btn-link py-2 text-body fw-semibold" data-action="help">
|
|
44
|
+
<i class="fa fa-question"></i>
|
|
45
|
+
<span class="d-none d-md-inline">[[modules:composer.help]]</span>
|
|
46
|
+
</button>
|
|
29
47
|
</div>
|
|
30
48
|
</div>
|
|
49
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="title-container d-flex">
|
|
1
|
+
<div class="title-container align-items-center gap-2 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 -->
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
{{{ if showHandleInput }}}
|
|
9
9
|
<div data-component="composer/handle">
|
|
10
|
-
<input class="handle form-control h-100" type="text" tabindex="1" placeholder="[[topic:composer.handle_placeholder]]" value="{handle}" />
|
|
10
|
+
<input class="handle form-control h-100 border-0 shadow-none" 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" style="min-width:0;">
|
|
13
|
+
<div data-component="composer/title" class="position-relative flex-1" style="min-width: 0;">
|
|
14
14
|
{{{ if isTopicOrMain }}}
|
|
15
|
-
<input class="title form-control h-100" type="text" tabindex="1" placeholder="[[topic:composer.title_placeholder]]" value="{topicTitle}"/>
|
|
15
|
+
<input class="title form-control h-100 rounded-1 shadow-none" type="text" tabindex="1" placeholder="[[topic:composer.title_placeholder]]" value="{topicTitle}"/>
|
|
16
16
|
{{{ else }}}
|
|
17
|
-
<span class="title h-100 text-truncate">{{{ if isEditing }}}[[topic:composer.editing]]{{{ else }}}[[topic:composer.replying_to, "{topicTitle}"]]{{{ end }}}</span>
|
|
17
|
+
<span class="d-block 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,22 +22,22 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div class="
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
<div class="d-flex action-bar gap-1 hidden-sm hidden-xs align-items-center">
|
|
26
|
+
<button class="btn btn-sm btn-link text-body fw-semibold" data-action="hide" tabindex="-1"><i class="fa fa-angle-down"></i> [[topic:composer.hide]]</button>
|
|
27
|
+
<button class="btn btn-sm btn-link composer-discard text-body fw-semibold" data-action="discard" tabindex="-1"><i class="fa fa-trash"></i> [[topic:composer.discard]]</button>
|
|
28
|
+
<div class="btn-group btn-group-sm">
|
|
29
|
+
<button class="btn btn-primary composer-submit fw-bold" data-action="post" tabindex="6" data-text-variant=" [[topic:composer.schedule]]"><i class="fa fa-check"></i> [[topic:composer.submit]]</button>
|
|
30
|
+
{{{ if (submitOptions.length || canSchedule) }}}
|
|
31
|
+
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
32
|
+
<i class="fa fa-caret-down"></i>
|
|
33
|
+
<span class="sr-only">[[topic:composer.additional-options]]</span>
|
|
34
|
+
</button>
|
|
35
|
+
<ul class="dropdown-menu">
|
|
36
|
+
<li><a class="dropdown-item display-scheduler ">Post Later</a></li>
|
|
37
|
+
{{{ each submitOptions }}}
|
|
38
|
+
<li><a class="dropdown-item" href="#" data-action="{./action}">{./text}</a></li>
|
|
39
|
+
{{{ end }}}</ul>
|
|
40
|
+
{{{ end }}}
|
|
41
|
+
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
<div class="write-preview-container">
|
|
2
|
-
<div class="write-container
|
|
3
|
-
<div class="help-text text-black-50 ">
|
|
4
|
-
<span class="help hidden">[[modules:composer.compose]] <i class="fa fa-question-circle"></i></span>
|
|
5
|
-
<span class="toggle-preview hide">[[modules:composer.show_preview]]</span>
|
|
6
|
-
</div>
|
|
1
|
+
<div class="write-preview-container d-flex gap-2 flex-grow-1">
|
|
2
|
+
<div class="write-container d-flex d-md-flex w-50">
|
|
7
3
|
<div class="float-end draft-icon hidden-md hidden-lg"></div>
|
|
8
|
-
<textarea class="write" tabindex="4" placeholder="[[modules:composer.textarea.placeholder]]">{body}</textarea>
|
|
4
|
+
<textarea class="write shadow-none rounded-1 w-100 form-control" tabindex="4" placeholder="[[modules:composer.textarea.placeholder]]">{body}</textarea>
|
|
9
5
|
</div>
|
|
10
|
-
<div class="
|
|
11
|
-
<div class="
|
|
12
|
-
<span class="toggle-preview">[[modules:composer.hide_preview]]</span>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="preview card card-body bg-light"></div>
|
|
6
|
+
<div class="preview-container d-none d-md-flex w-50">
|
|
7
|
+
<div class="preview card card-body bg-light rounded-1"></div>
|
|
15
8
|
</div>
|
|
16
9
|
</div>
|