nodebb-plugin-composer-default 10.2.12 → 10.2.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
|
@@ -107,7 +107,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
107
107
|
draftData.toPid = postData.toPid;
|
|
108
108
|
} else if (postData.action === 'posts.edit') {
|
|
109
109
|
draftData.pid = postData.pid;
|
|
110
|
-
draftData.title = title;
|
|
110
|
+
draftData.title = title || postData.title;
|
|
111
111
|
}
|
|
112
112
|
if (!app.user.uid) {
|
|
113
113
|
draftData.handle = postContainer.find('input.handle').val();
|
|
@@ -284,7 +284,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
284
284
|
cid: draft.cid,
|
|
285
285
|
handle: app.user && app.user.uid ? undefined : utils.escapeHTML(draft.handle),
|
|
286
286
|
title: utils.escapeHTML(draft.title),
|
|
287
|
-
body:
|
|
287
|
+
body: draft.text,
|
|
288
288
|
tags: String(draft.tags || '').split(','),
|
|
289
289
|
});
|
|
290
290
|
} else if (draft.action === 'posts.reply') {
|
|
@@ -298,7 +298,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
298
298
|
tid: draft.tid,
|
|
299
299
|
toPid: draft.toPid,
|
|
300
300
|
title: topicObj.title,
|
|
301
|
-
body:
|
|
301
|
+
body: draft.text,
|
|
302
302
|
});
|
|
303
303
|
});
|
|
304
304
|
} else if (draft.action === 'posts.edit') {
|
|
@@ -306,7 +306,7 @@ define('composer/drafts', ['api', 'alerts'], function (api, alerts) {
|
|
|
306
306
|
save_id: draft.save_id,
|
|
307
307
|
pid: draft.pid,
|
|
308
308
|
title: draft.title ? utils.escapeHTML(draft.title) : undefined,
|
|
309
|
-
body:
|
|
309
|
+
body: draft.text,
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
});
|
|
@@ -75,7 +75,8 @@ define('composer/formatting', [
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
formatting.addComposerButtons = function () {
|
|
78
|
-
const
|
|
78
|
+
const formattingBarEl = $('.formatting-bar');
|
|
79
|
+
const fileForm = formattingBarEl.find('.formatting-group #fileForm');
|
|
79
80
|
buttons.forEach((btn) => {
|
|
80
81
|
let markup = ``;
|
|
81
82
|
if (Array.isArray(btn.dropdownItems) && btn.dropdownItems.length) {
|
|
@@ -89,6 +90,12 @@ define('composer/formatting', [
|
|
|
89
90
|
}
|
|
90
91
|
fileForm.before(markup);
|
|
91
92
|
});
|
|
93
|
+
formattingBarEl.tooltip({
|
|
94
|
+
selector: '.formatting-group>li',
|
|
95
|
+
container: '#content',
|
|
96
|
+
animation: false,
|
|
97
|
+
trigger: 'hover',
|
|
98
|
+
});
|
|
92
99
|
};
|
|
93
100
|
|
|
94
101
|
function generateFormattingDropdown(btn) {
|
|
@@ -107,8 +114,8 @@ define('composer/formatting', [
|
|
|
107
114
|
`;
|
|
108
115
|
});
|
|
109
116
|
return `
|
|
110
|
-
<li class="dropdown bottom-sheet" tab-index="-1">
|
|
111
|
-
<button class="btn btn-sm btn-link text-reset" data-bs-toggle="dropdown"
|
|
117
|
+
<li class="dropdown bottom-sheet" tab-index="-1" title="${btn.title}">
|
|
118
|
+
<button class="btn btn-sm btn-link text-reset" data-bs-toggle="dropdown" >
|
|
112
119
|
<i class="${btn.iconClass}"></i>
|
|
113
120
|
</button>
|
|
114
121
|
<ul class="dropdown-menu p-1">
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
{{{ else }}}
|
|
7
7
|
{{{ if (./visibility.desktop && ((isTopicOrMain && ./visibility.main) || (!isTopicOrMain && ./visibility.reply))) }}}
|
|
8
8
|
{{{ if ./dropdownItems.length }}}
|
|
9
|
-
<li class="dropdown bottom-sheet" tabindex="-1">
|
|
10
|
-
<button class="btn btn-sm btn-link text-reset" data-bs-toggle="dropdown"
|
|
9
|
+
<li class="dropdown bottom-sheet" tabindex="-1" title="{./title}">
|
|
10
|
+
<button class="btn btn-sm btn-link text-reset" data-bs-toggle="dropdown">
|
|
11
11
|
<i class="{./className}"></i>
|
|
12
12
|
</button>
|
|
13
13
|
<ul class="dropdown-menu p-1">
|