nodebb-plugin-onekite-calendar 2.0.78 → 2.0.79
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 +15 -1
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -1241,7 +1241,10 @@ function toDatetimeLocalValue(date) {
|
|
|
1241
1241
|
<div class="mb-2" id="onekite-period"><strong>Période</strong><br>${formatDt(start)} → ${formatDt(endDisplay)} <span class="text-muted" id="onekite-days">(${days} jour${days > 1 ? 's' : ''})</span></div>
|
|
1242
1242
|
${shortcutsHtml}
|
|
1243
1243
|
${forUserHtml}
|
|
1244
|
-
<div class="mb-
|
|
1244
|
+
<div class="mb-1"><strong>Matériel</strong></div>
|
|
1245
|
+
<div class="mb-2">
|
|
1246
|
+
<input type="text" id="onekite-item-search" class="form-control form-control-sm" placeholder="Rechercher un matériel…" autocomplete="off">
|
|
1247
|
+
</div>
|
|
1245
1248
|
<div id="onekite-items" class="mb-2" style="max-height: 320px; overflow: auto; border: 1px solid var(--bs-border-color, #ddd); border-radius: 6px; padding: 6px;">
|
|
1246
1249
|
${rows}
|
|
1247
1250
|
</div>
|
|
@@ -1359,6 +1362,17 @@ function toDatetimeLocalValue(date) {
|
|
|
1359
1362
|
document.querySelectorAll('.onekite-item-cb').forEach(cb => cb.addEventListener('change', refreshTotal));
|
|
1360
1363
|
refreshTotal();
|
|
1361
1364
|
|
|
1365
|
+
const searchEl = document.getElementById('onekite-item-search');
|
|
1366
|
+
if (searchEl) {
|
|
1367
|
+
searchEl.addEventListener('input', () => {
|
|
1368
|
+
const q = searchEl.value.trim().toLowerCase();
|
|
1369
|
+
document.querySelectorAll('#onekite-items [data-itemid]').forEach((row) => {
|
|
1370
|
+
const name = ((row.querySelector('input.onekite-item-cb') || {}).getAttribute('data-name') || '').toLowerCase();
|
|
1371
|
+
row.style.display = (!q || name.includes(q)) ? '' : 'none';
|
|
1372
|
+
});
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1362
1376
|
// Duration shortcuts (single-day selections): update end/days + refresh blocked items
|
|
1363
1377
|
const shortcutsWrap = document.getElementById('onekite-duration-shortcuts');
|
|
1364
1378
|
if (shortcutsWrap) {
|