View | Details | Raw Unified | Return to bug 37363
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+6 lines)
Lines 883-888 $dayTrailBackground: #fcdcb3 !default; Link Here
883
        background: #f5f5f5 !important;  /* Light background */
883
        background: #f5f5f5 !important;  /* Light background */
884
        cursor: not-allowed !important;
884
        cursor: not-allowed !important;
885
    }
885
    }
886
887
    &.closed-day {
888
        color: #aaa !important;
889
        background: #FFFF99 !important;
890
        cursor: not-allowed !important;
891
    }
886
}
892
}
887
893
888
.input-warning {
894
.input-warning {
(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js (-4 / +14 lines)
Lines 784-798 $("#placeBookingModal").on("show.bs.modal", function (e) { Link Here
784
                        instance,
784
                        instance,
785
                        dayElem
785
                        dayElem
786
                    ) {
786
                    ) {
787
                        const currentDate = dayElem.dateObj
787
                        const currentDate = dayElem.dateObj;
788
                        const dateString = currentDate
788
                            .toISOString()
789
                            .toISOString()
789
                            .split("T")[0];
790
                            .split("T")[0];
790
791
791
                        if (bookingsByDate[currentDate]) {
792
                        // Make closed days unclickable (while keeping them part of the range)
793
                        if (currentDate.getDay() === 0 || currentDate.getDay() === 6) {
794
                            dayElem.classList.add("closed-day");
795
796
                            // Remove the click event to disable the day
797
                            dayElem.addEventListener('click', function(event) {
798
                                event.stopImmediatePropagation();
799
                            }, true);
800
                        }
801
802
                        if (bookingsByDate[dateString]) {
792
                            const dots = document.createElement("span");
803
                            const dots = document.createElement("span");
793
                            dots.className = "event-dots";
804
                            dots.className = "event-dots";
794
                            dayElem.appendChild(dots);
805
                            dayElem.appendChild(dots);
795
                            bookingsByDate[currentDate].forEach(item => {
806
                            bookingsByDate[dateString].forEach(item => {
796
                                const dot = document.createElement("span");
807
                                const dot = document.createElement("span");
797
                                dot.className = "event item_" + item;
808
                                dot.className = "event item_" + item;
798
                                dots.appendChild(dot);
809
                                dots.appendChild(dot);
799
- 

Return to bug 37363