nodebb-plugin-calendar-onekite 1.3.6 → 1.3.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-calendar-onekite",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
package/plugin.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "Calendar Onekite",
4
4
  "description": "Calendrier + réservation de matériel + validation admin + paiement HelloAsso pour NodeBB v4",
5
5
  "url": "",
6
- "version": "1.3.6",
6
+ "version": "1.3.8",
7
7
  "library": "./library.js",
8
8
  "staticDirs": {
9
9
  "static": "static"
@@ -24,14 +24,9 @@ $(document).ready(function () {
24
24
  limit: $('#calendar-onekite-widget-limit').val()
25
25
  };
26
26
 
27
- $.ajax({
28
- url: '/api/admin/plugins/nodebb-plugin-calendar-onekite',
29
- method: 'PUT',
30
- contentType: 'application/json',
31
- data: JSON.stringify(settings)
32
- })
27
+ api.put('/admin/plugins/nodebb-plugin-calendar-onekite', settings)
33
28
  .then(() => app.alertSuccess('Paramètres enregistrés'))
34
- .catch(err => app.alertError(err.responseJSON?.error || err.message));
29
+ .catch(err => app.alertError(err.message || err));
35
30
  });
36
31
  },
37
32
 
@@ -84,5 +84,5 @@
84
84
  </div>
85
85
  </div>
86
86
 
87
- <link rel="stylesheet" href="/plugins/nodebb-plugin-calendar-lite/static/style.css">
88
- <script src="/plugins/nodebb-plugin-calendar-lite/static/js/calendar.js"></script>
87
+ <link rel="stylesheet" href="/plugins/nodebb-plugin-calendar-onekite/static/style.css">
88
+ <script src="/plugins/nodebb-plugin-calendar-onekite/static/js/calendar.js"></script>
@@ -0,0 +1,22 @@
1
+ <div class="calendar-upcoming-widget">
2
+ <h4>Prochains événements</h4>
3
+
4
+ <!-- IF !events.length -->
5
+ <p>Aucun événement prévu.</p>
6
+ <!-- ELSE -->
7
+ <ul class="calendar-upcoming-list">
8
+ <!-- BEGIN events -->
9
+ <li>
10
+ <strong>{events.title}</strong><br>
11
+ <small>
12
+ <!-- tu peux custom le format date via moment côté client si tu veux -->
13
+ {events.start} → {events.end}
14
+ </small>
15
+ <!-- IF events.location -->
16
+ <br><small>{events.location}</small>
17
+ <!-- ENDIF events.location -->
18
+ </li>
19
+ <!-- END events -->
20
+ </ul>
21
+ <!-- ENDIF !events.length -->
22
+ </div>