nodebb-plugin-onekite-calendar 2.0.79 → 2.0.82
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/public/client.js +4 -3
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -1365,10 +1365,11 @@ function toDatetimeLocalValue(date) {
|
|
|
1365
1365
|
const searchEl = document.getElementById('onekite-item-search');
|
|
1366
1366
|
if (searchEl) {
|
|
1367
1367
|
searchEl.addEventListener('input', () => {
|
|
1368
|
-
const
|
|
1368
|
+
const normalize = (s) => String(s || '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase();
|
|
1369
|
+
const q = normalize(searchEl.value.trim());
|
|
1369
1370
|
document.querySelectorAll('#onekite-items [data-itemid]').forEach((row) => {
|
|
1370
|
-
const name = (
|
|
1371
|
-
row.
|
|
1371
|
+
const name = normalize(row.querySelector('input.onekite-item-cb')?.getAttribute('data-name'));
|
|
1372
|
+
row.classList.toggle('d-none', !(!q || name.includes(q)));
|
|
1372
1373
|
});
|
|
1373
1374
|
});
|
|
1374
1375
|
}
|