nodebb-plugin-calendar-onekite 11.2.7 → 11.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/client.js +13 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-calendar-onekite",
3
- "version": "11.2.7",
3
+ "version": "11.2.8",
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/public/client.js CHANGED
@@ -125,10 +125,10 @@ define('forum/calendar-onekite', ['alerts', 'bootbox', 'hooks'], function (alert
125
125
  <div class="col-12 col-md-6">
126
126
  <label class="form-label">Début</label>
127
127
  <div class="row g-2">
128
- <div class="col-7">
128
+ <div class="col-6">
129
129
  <input type="date" class="form-control" id="onekite-se-start-date" value="${escapeHtml(toDateInputValue(seStart))}" />
130
130
  </div>
131
- <div class="col-5">
131
+ <div class="col-6">
132
132
  <select class="form-select onekite-time-select" id="onekite-se-start-time">${seTimeOptions(seStartTime, false)}</select>
133
133
  </div>
134
134
  </div>
@@ -136,10 +136,10 @@ define('forum/calendar-onekite', ['alerts', 'bootbox', 'hooks'], function (alert
136
136
  <div class="col-12 col-md-6">
137
137
  <label class="form-label">Fin</label>
138
138
  <div class="row g-2">
139
- <div class="col-7">
139
+ <div class="col-6">
140
140
  <input type="date" class="form-control" id="onekite-se-end-date" value="${escapeHtml(toDateInputValue(seEnd))}" />
141
141
  </div>
142
- <div class="col-5">
142
+ <div class="col-6">
143
143
  <select class="form-select onekite-time-select" id="onekite-se-end-time">${seTimeOptions(seEndTime, true)}</select>
144
144
  </div>
145
145
  </div>
@@ -785,6 +785,9 @@ function toDatetimeLocalValue(date) {
785
785
 
786
786
  function setMode(next) {
787
787
  mode = next;
788
+ if (mode === 'special') {
789
+ showAlert('info', 'Mode évènement : sélectionnez une date ou une plage');
790
+ }
788
791
  refreshDesktopModeButton();
789
792
  try {
790
793
  const mb = document.querySelector('#onekite-mobile-controls .onekite-mode-btn');
@@ -997,9 +1000,12 @@ function toDatetimeLocalValue(date) {
997
1000
  }
998
1001
  isDialogOpen = true;
999
1002
  try {
1000
- // Default to a same-day event: 00:00 -> 23:59
1001
- const end = new Date(start.getTime() + (23 * 60 + 59) * 60 * 1000);
1002
- const payload = await openSpecialEventDialog({ start, end, allDay: true });
1003
+ // Default to a same-day event in local time: 07:00 -> 23:59
1004
+ const start2 = new Date(start);
1005
+ start2.setHours(7, 0, 0, 0);
1006
+ const end2 = new Date(start);
1007
+ end2.setHours(23, 59, 0, 0);
1008
+ const payload = await openSpecialEventDialog({ start: start2, end: end2, allDay: false });
1003
1009
  setMode('reservation');
1004
1010
  if (!payload) {
1005
1011
  isDialogOpen = false;