nodebb-plugin-composer-default 10.0.41 → 10.0.43
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/library.js
CHANGED
package/package.json
CHANGED
|
@@ -71,12 +71,14 @@ define('composer/autocomplete', [
|
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
var editor;
|
|
74
|
-
if (targetEl.nodeName === 'TEXTAREA') {
|
|
74
|
+
if (targetEl.nodeName === 'TEXTAREA' || targetEl.nodeName === 'INPUT') {
|
|
75
75
|
editor = new TextareaEditor(targetEl);
|
|
76
76
|
} else if (targetEl.nodeName === 'DIV' && targetEl.getAttribute('contenteditable') === 'true') {
|
|
77
77
|
editor = new ContenteditableEditor(targetEl);
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
if (!editor) {
|
|
80
|
+
throw new Error('unknown target element type');
|
|
81
|
+
}
|
|
80
82
|
// yuku-t/textcomplete inherits directionality from target element itself
|
|
81
83
|
targetEl.setAttribute('dir', document.querySelector('html').getAttribute('data-dir'));
|
|
82
84
|
|
package/static/lib/composer.js
CHANGED
|
@@ -867,7 +867,9 @@ define('composer', [
|
|
|
867
867
|
|
|
868
868
|
if (thumbs.length) {
|
|
869
869
|
const formatEl = postContainer.find('[data-format="thumbs"]');
|
|
870
|
-
formatEl.
|
|
870
|
+
formatEl.find('.badge')
|
|
871
|
+
.text(thumbs.length)
|
|
872
|
+
.toggleClass('hidden', !thumbs.length);
|
|
871
873
|
}
|
|
872
874
|
});
|
|
873
875
|
}
|
|
@@ -77,23 +77,6 @@
|
|
|
77
77
|
color: $gray-200;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
.formatting-group {
|
|
82
|
-
li {
|
|
83
|
-
&[data-format="thumbs"][data-count]:after {
|
|
84
|
-
content: attr(data-count);
|
|
85
|
-
background: $info;
|
|
86
|
-
color: $white;
|
|
87
|
-
font-weight: 600;
|
|
88
|
-
position: absolute;
|
|
89
|
-
top: 5px;
|
|
90
|
-
left: 2.5em;
|
|
91
|
-
padding: 0px 5px;
|
|
92
|
-
border-radius: 5px;
|
|
93
|
-
font-size: 0.75em;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
80
|
}
|
|
98
81
|
|
|
99
82
|
.tags-container {
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
{{{ else }}}
|
|
7
7
|
{{{ if (./visibility.desktop && ((isTopicOrMain && ./visibility.main) || (!isTopicOrMain && ./visibility.reply))) }}}
|
|
8
8
|
<li class="small">
|
|
9
|
-
<a href="#" class="btn btn-sm btn-link text-reset" tabindex="-1" data-format="{./name}" title="{./title}">
|
|
9
|
+
<a href="#" class="btn btn-sm btn-link text-reset position-relative" tabindex="-1" data-format="{./name}" title="{./title}">
|
|
10
10
|
<i class="{./className}"></i>
|
|
11
|
+
{{{ if ./badge }}}
|
|
12
|
+
<span class="px-1 position-absolute top-0 start-100 translate-middle-x badge rounded text-bg-info"></span>
|
|
13
|
+
{{{ end }}}
|
|
11
14
|
</a>
|
|
12
15
|
</li>
|
|
13
16
|
{{{ end }}}
|