Changeset 3307433
- Timestamp:
- 06/06/2025 09:00:25 AM (10 months ago)
- File:
-
- 1 edited
-
bookyt/trunk/js/belegungsplan.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bookyt/trunk/js/belegungsplan.js
r3306149 r3307433 11 11 var stationState = {}; // { stationId: { currentDate, view } } 12 12 var defaultView = jQuery('#bookyt_belegungsplan_tabs_container').attr("view") || "month"; 13 var currentView = defaultView; 13 14 14 15 // Datum formatieren YYYY-MM-DD … … 37 38 38 39 function renderDayView(station, container) { 40 currentView = "day"; 39 41 var totalCols = 1 + 24; 40 42 var table = $('<table style="width:100%; table-layout:auto;"></table>'); 41 43 var header = $('<tr></tr>'); 42 44 header.append('<th></th>'); 43 for (var h = 8; h < 24; h++) { 45 var minHour = 8; 46 var maxHour = 23; 47 for (var h = minHour; h <= maxHour; h++) { 44 48 var hh = (h < 10) ? "0" + h : "" + h; 45 49 header.append('<th class="small-header">' + hh + '</th>'); … … 54 58 var row = $('<tr></tr>'); 55 59 row.append('<td class="resource">' + res.name + '</td>'); 56 for (var h = 0; h < 24; h++) {60 for (var h = minHour; h <= maxHour; h++) { 57 61 row.append('<td data-resource="' + res.id + '" data-hour="' + h + '"></td>'); 58 62 } … … 89 93 90 94 function renderWeekView(station, container) { 95 currentView = "week"; 91 96 var totalCols = 1 + 7; 92 97 var table = $('<table style="width:100%; table-layout:auto;"></table>'); … … 139 144 140 145 function renderMonthView(station, container) { 146 currentView = "month"; 141 147 var current = stationState[station.id].currentDate; 142 148 var year = current.getFullYear(); … … 220 226 dateObj = new Date($(this).data('date')); 221 227 } 228 //console.log("Klicke auf freie Zelle:", catId, resourceId, dateObj); 222 229 onCellClick(catId, station.id, dateObj); 223 230 }); … … 227 234 function onCellClick(categoryId, station_id, dateObj) { 228 235 229 var vURL = data["url_frontend"] + "?fahrzeugsubgruppe_id=" + categoryId + "&station_id=" + station_id + "&start=" + dateObj.toISOString(); 236 var vURL = data["url_frontend"] + "?fahrzeugsubgruppe_id=" + categoryId + "&station_id=" + station_id + "&start=" + dateObj.toISOString()+"&view=" + currentView+"&from=wordpress"; 237 //console.log(vURL); 230 238 bookytNeueBuchung(vURL); 231 239 //alert("Leere Zelle geklickt:\nKategorie-ID: " + categoryId + "\nResource-ID: " + resourceId + "\nDatum: " + dateObj.toString());
Note: See TracChangeset
for help on using the changeset viewer.