nodebb-theme-persona 13.0.29 → 13.0.31
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/plugin.json +0 -1
- package/public/persona.js +0 -15
- package/templates/partials/acceptTos.tpl +8 -8
- package/templates/partials/categories/link.tpl +10 -10
- package/templates/partials/topic/event.tpl +0 -14
- package/theme.json +6 -6
- package/public/modules/quickreply.js +0 -102
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
],
|
|
15
15
|
"modules": {
|
|
16
16
|
"../admin/plugins/persona.js": "public/admin.js",
|
|
17
|
-
"persona/quickreply.js": "public/modules/quickreply.js",
|
|
18
17
|
"persona/taskbar.js": "public/modules/taskbar.js",
|
|
19
18
|
"persona/mobile-menu.js": "public/modules/mobile-menu.js",
|
|
20
19
|
"../client/account/theme.js": "public/settings.js"
|
package/public/persona.js
CHANGED
|
@@ -5,7 +5,6 @@ $(document).ready(function () {
|
|
|
5
5
|
setupTaskbar();
|
|
6
6
|
setupEditedByIcon();
|
|
7
7
|
setupMobileMenu();
|
|
8
|
-
setupQuickReply();
|
|
9
8
|
configureNavbarHiding();
|
|
10
9
|
|
|
11
10
|
$(window).on('resize', utils.debounce(configureNavbarHiding, 200));
|
|
@@ -256,18 +255,4 @@ $(document).ready(function () {
|
|
|
256
255
|
});
|
|
257
256
|
});
|
|
258
257
|
}
|
|
259
|
-
|
|
260
|
-
function setupQuickReply() {
|
|
261
|
-
$(window).on('action:ajaxify.end', function (ev, data) {
|
|
262
|
-
if (data.url && data.url.match('^topic/')) {
|
|
263
|
-
if (config.enableQuickReply) {
|
|
264
|
-
require(['persona/quickreply'], function (quickreply) {
|
|
265
|
-
if (quickreply) {
|
|
266
|
-
quickreply.init();
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
258
|
});
|
|
@@ -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 -->
|
|
@@ -3,22 +3,8 @@
|
|
|
3
3
|
<i class="fa {{{ if ./icon }}}{./icon}{{{ else }}}fa-circle{{{ end }}}"></i>
|
|
4
4
|
</div>
|
|
5
5
|
<span class="timeline-text">
|
|
6
|
-
{{{ if ./href}}}
|
|
7
|
-
<a href="{config.relative_path}{./href}">{./text}</a>
|
|
8
|
-
{{{ else }}}
|
|
9
6
|
{./text}
|
|
10
|
-
{{{ end }}}
|
|
11
|
-
|
|
12
7
|
</span>
|
|
13
|
-
{{{ if ./user }}}
|
|
14
|
-
{{{ if ./user.system }}}
|
|
15
|
-
<span class="timeline-text">[[global:system-user]]</span>
|
|
16
|
-
{{{ else }}}
|
|
17
|
-
<span><a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "16px", true)} {./user.username}</a></span>
|
|
18
|
-
{{{ end }}}
|
|
19
|
-
{{{ end }}}
|
|
20
|
-
<span class="timeago timeline-text" title="{./timestampISO}"></span>
|
|
21
|
-
|
|
22
8
|
{{{ if privileges.isAdminOrMod }}}
|
|
23
9
|
<span component="topic/event/delete" data-topic-event-id="{./id}" data-topic-event-type="{./type}" class="timeline-text pointer" title="[[topic:delete-event]]"><i class="fa fa-trash"></i></span>
|
|
24
10
|
{{{ end }}}
|
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,102 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
define('persona/quickreply', [
|
|
4
|
-
'components', 'composer', 'composer/autocomplete', 'api',
|
|
5
|
-
'alerts', 'uploadHelpers', 'mousetrap',
|
|
6
|
-
], function (
|
|
7
|
-
components, composer, autocomplete, api,
|
|
8
|
-
alerts, uploadHelpers, mousetrap
|
|
9
|
-
) {
|
|
10
|
-
var QuickReply = {};
|
|
11
|
-
|
|
12
|
-
QuickReply.init = function () {
|
|
13
|
-
var element = components.get('topic/quickreply/text');
|
|
14
|
-
var data = {
|
|
15
|
-
element: element,
|
|
16
|
-
strategies: [],
|
|
17
|
-
options: {
|
|
18
|
-
style: {
|
|
19
|
-
'z-index': 100,
|
|
20
|
-
},
|
|
21
|
-
// listPosition: function(position) {
|
|
22
|
-
// this.$el.css(this._applyPlacement(position));
|
|
23
|
-
// this.$el.css('position', 'absolute');
|
|
24
|
-
// return this;
|
|
25
|
-
// }
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
$(window).trigger('composer:autocomplete:init', data);
|
|
30
|
-
autocomplete._active.persona_qr = autocomplete.setup(data);
|
|
31
|
-
// data.element.textcomplete(data.strategies, data.options);
|
|
32
|
-
// $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
|
|
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
|
-
});
|
|
39
|
-
|
|
40
|
-
uploadHelpers.init({
|
|
41
|
-
dragDropAreaEl: $('[component="topic/quickreply/container"] .quickreply-message'),
|
|
42
|
-
pasteEl: element,
|
|
43
|
-
uploadFormEl: $('[component="topic/quickreply/upload"]'),
|
|
44
|
-
inputEl: element,
|
|
45
|
-
route: '/api/post/upload',
|
|
46
|
-
callback: function (uploads) {
|
|
47
|
-
let text = element.val();
|
|
48
|
-
uploads.forEach((upload) => {
|
|
49
|
-
text = text + (text ? '\n' : '') + (upload.isImage ? '!' : '') + `[${upload.filename}](${upload.url})`;
|
|
50
|
-
});
|
|
51
|
-
element.val(text);
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
var ready = true;
|
|
56
|
-
components.get('topic/quickreply/button').on('click', function (e) {
|
|
57
|
-
e.preventDefault();
|
|
58
|
-
if (!ready) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var replyMsg = components.get('topic/quickreply/text').val();
|
|
63
|
-
var replyData = {
|
|
64
|
-
tid: ajaxify.data.tid,
|
|
65
|
-
handle: undefined,
|
|
66
|
-
content: replyMsg,
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
ready = false;
|
|
70
|
-
api.post(`/topics/${ajaxify.data.tid}`, replyData, function (err, data) {
|
|
71
|
-
ready = true;
|
|
72
|
-
if (err) {
|
|
73
|
-
return alerts.error(err);
|
|
74
|
-
}
|
|
75
|
-
if (data && data.queued) {
|
|
76
|
-
alerts.alert({
|
|
77
|
-
type: 'success',
|
|
78
|
-
title: '[[global:alert.success]]',
|
|
79
|
-
message: data.message,
|
|
80
|
-
timeout: 10000,
|
|
81
|
-
clickfn: function () {
|
|
82
|
-
ajaxify.go(`/post-queue/${data.id}`);
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
components.get('topic/quickreply/text').val('');
|
|
88
|
-
autocomplete._active.persona_qr.hide();
|
|
89
|
-
});
|
|
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
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return QuickReply;
|
|
102
|
-
});
|