nodebb-plugin-onekite-calendar 2.0.5 → 2.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog – calendar-onekite
2
2
 
3
+ ## 1.2.13
4
+ - ACP (mode sombre) : correction de la visibilité de la liste d’autocomplete d’adresse (couleurs via variables Bootstrap)
5
+
3
6
  ## 1.2.12
4
7
  - Modales (calendrier + ACP) : autocomplete adresse rendu identique et compatible Bootstrap input-group (plus de wrapper qui casse l’affichage)
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-onekite-calendar",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "FullCalendar-based equipment reservation workflow with admin approval & HelloAsso payment for NodeBB",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "acpScripts": [
40
40
  "public/admin.js"
41
41
  ],
42
- "version": "2.0.5"
42
+ "version": "2.0.6"
43
43
  }
package/public/admin.js CHANGED
@@ -2,6 +2,36 @@
2
2
  define('admin/plugins/calendar-onekite', ['alerts', 'bootbox'], function (alerts, bootbox) {
3
3
  'use strict';
4
4
 
5
+ // ACP dark mode compatibility: style the address autocomplete dropdown using
6
+ // Bootstrap CSS variables (so it remains readable in dark themes).
7
+ (function ensureOnekiteAdminStyles() {
8
+ try {
9
+ if (document.getElementById('onekite-acp-inline-styles')) return;
10
+ const style = document.createElement('style');
11
+ style.id = 'onekite-acp-inline-styles';
12
+ style.textContent = `
13
+ .onekite-autocomplete-menu {
14
+ background: var(--bs-body-bg, #fff);
15
+ color: var(--bs-body-color, #212529);
16
+ border: 1px solid var(--bs-border-color, rgba(0,0,0,.15));
17
+ box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
18
+ }
19
+ .onekite-autocomplete-item {
20
+ color: inherit;
21
+ background: transparent;
22
+ }
23
+ .onekite-autocomplete-item:hover,
24
+ .onekite-autocomplete-item:focus {
25
+ background: var(--bs-tertiary-bg, rgba(0,0,0,.05));
26
+ outline: none;
27
+ }
28
+ `;
29
+ document.head.appendChild(style);
30
+ } catch (e) {
31
+ // ignore
32
+ }
33
+ })();
34
+
5
35
  // Cache of pending reservations keyed by rid so delegated click handlers
6
36
  // can open rich modals without embedding large JSON blobs into the DOM.
7
37
  const pendingCache = new Map();
@@ -242,8 +272,7 @@ define('admin/plugins/calendar-onekite', ['alerts', 'bootbox'], function (alerts
242
272
  menu.style.right = '0';
243
273
  menu.style.top = '100%';
244
274
  menu.style.zIndex = '2000';
245
- menu.style.background = '#fff';
246
- menu.style.border = '1px solid rgba(0,0,0,.15)';
275
+ // Colors are handled via CSS variables (supports ACP dark mode).
247
276
  menu.style.borderTop = '0';
248
277
  menu.style.maxHeight = '220px';
249
278
  menu.style.overflowY = 'auto';
@@ -276,15 +305,12 @@ define('admin/plugins/calendar-onekite', ['alerts', 'bootbox'], function (alerts
276
305
  btn.style.textAlign = 'left';
277
306
  btn.style.padding = '.35rem .5rem';
278
307
  btn.style.border = '0';
279
- btn.style.background = 'transparent';
280
308
  btn.style.cursor = 'pointer';
281
309
  btn.addEventListener('click', () => {
282
310
  inputEl.value = h.displayName;
283
311
  hide();
284
312
  try { onPick && onPick(h); } catch (e) {}
285
313
  });
286
- btn.addEventListener('mouseenter', () => { btn.style.background = 'rgba(0,0,0,.05)'; });
287
- btn.addEventListener('mouseleave', () => { btn.style.background = 'transparent'; });
288
314
  menu.appendChild(btn);
289
315
  });
290
316
  menu.style.display = 'block';