diff --git a/Web/css/librebooking.css b/Web/css/librebooking.css index 4857745fb..599139c44 100644 --- a/Web/css/librebooking.css +++ b/Web/css/librebooking.css @@ -43,10 +43,10 @@ --primary-disabled: #0091e6; } -[data-bs-theme="pastel_blue"] { - --primary: #5d9b9b; - --primary-hover: #4d8080; - --primary-disabled: #70a9a9; +[data-bs-theme="orange"] { + --primary: #be6e34; + --primary-hover: #a05c2c; + --primary-disabled: #e4b99b; } html { @@ -101,6 +101,16 @@ img.logo { border-color: var(--primary); } +.page-link:hover { + background-color: var(--primary-hover); + border-color: var(--primary); + color: #ffffff; +} + +.disabled>.page-link { + border-color: var(--primary); +} + .btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary-hover); @@ -234,6 +244,10 @@ fieldset:disabled .btn { border: solid var(--bs-border-color) 1px; } +.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { + background-color: var(--primary); +} + .ui-widget { font-family: inherit !important; } @@ -242,6 +256,12 @@ fieldset:disabled .btn { z-index: 5000; } +li.ui-timepicker-selected, +.ui-timepicker-list li:hover, +.ui-timepicker-list .ui-timepicker-selected:hover { + background: var(--primary); +} + .horizontal-list li, .updateCustomAttribute, .reservation-list-dates div { @@ -256,6 +276,10 @@ fieldset:disabled .btn { width: 90px; } +.form-select.dateinput { + width: 90px; +} + #add-blackout-panel label { min-width: 90px; } diff --git a/Web/css/schedule.css b/Web/css/schedule.css index fee656d21..ff55027f1 100644 --- a/Web/css/schedule.css +++ b/Web/css/schedule.css @@ -28,10 +28,11 @@ border-width: 0 0 1px; } + /* .navbar-collapse.collapse { display: none !important; } - +*/ .navbar-nav { float: none !important; margin-top: 7.5px; @@ -496,7 +497,7 @@ ul.jqtree-tree .jqtree-toggler { height: 30px; background-color: rgba(76, 175, 80, 0.7); border: solid 2px rgba(32, 65, 32, 0.7); - top: 75px; + top: 300px; left: 50%; z-index: 101; width: auto; diff --git a/Web/img/readme/01.png b/Web/img/readme/01.png index a4268bdfe..e16f4caba 100644 Binary files a/Web/img/readme/01.png and b/Web/img/readme/01.png differ diff --git a/Web/img/readme/02.png b/Web/img/readme/02.png index a6670f1b3..7168a9f01 100644 Binary files a/Web/img/readme/02.png and b/Web/img/readme/02.png differ diff --git a/Web/img/readme/03.png b/Web/img/readme/03.png index 5a86172f3..1aaaea1b6 100644 Binary files a/Web/img/readme/03.png and b/Web/img/readme/03.png differ diff --git a/Web/img/readme/04.png b/Web/img/readme/04.png index c98d3215e..be28e4a97 100644 Binary files a/Web/img/readme/04.png and b/Web/img/readme/04.png differ diff --git a/Web/img/readme/05.png b/Web/img/readme/05.png index b07d7c6d2..648c65ea2 100644 Binary files a/Web/img/readme/05.png and b/Web/img/readme/05.png differ diff --git a/Web/img/readme/06.png b/Web/img/readme/06.png index ca07a7e8d..0fd1452c5 100644 Binary files a/Web/img/readme/06.png and b/Web/img/readme/06.png differ diff --git a/Web/img/readme/07.png b/Web/img/readme/07.png index d49a96333..3181a42a0 100644 Binary files a/Web/img/readme/07.png and b/Web/img/readme/07.png differ diff --git a/Web/img/readme/08.png b/Web/img/readme/08.png index c219471ce..d46da86ee 100644 Binary files a/Web/img/readme/08.png and b/Web/img/readme/08.png differ diff --git a/Web/img/readme/09.png b/Web/img/readme/09.png index 3ca18cd41..07159c3e4 100644 Binary files a/Web/img/readme/09.png and b/Web/img/readme/09.png differ diff --git a/Web/img/readme/15.png b/Web/img/readme/15.png index aeee65826..3a77a9b46 100644 Binary files a/Web/img/readme/15.png and b/Web/img/readme/15.png differ diff --git a/Web/scripts/admin/accessory.js b/Web/scripts/admin/accessory.js index c01167b86..f5404d6c1 100644 --- a/Web/scripts/admin/accessory.js +++ b/Web/scripts/admin/accessory.js @@ -24,35 +24,35 @@ function AccessoryManagement(opts) { var accessories = new Object(); - AccessoryManagement.prototype.init = function() { + AccessoryManagement.prototype.init = function () { - elements.accessoryList.delegate('a.update', 'click', function(e) { + elements.accessoryList.delegate('a.update', 'click', function (e) { setActiveId($(this)); e.preventDefault(); }); - elements.accessoryList.delegate('.edit', 'click', function() { + elements.accessoryList.delegate('.edit', 'click', function () { editAccessory(); }); - elements.accessoryList.delegate('.delete', 'click', function() { + elements.accessoryList.delegate('.delete', 'click', function () { deleteAccessory(); }); - elements.accessoryList.delegate('.resources', 'click', function() { + elements.accessoryList.delegate('.resources', 'click', function () { showAccessoryResources(); }); - $(".save").click(function() { + $(".save").click(function () { $(this).closest('form').submit(); }); - $(".cancel").click(function() { + $(".cancel").click(function () { $(this).closest('.dialog').dialog("close"); }); - elements.accessoryResourcesDialog.delegate('.resourceCheckbox', 'click', function() { + elements.accessoryResourcesDialog.delegate('.resourceCheckbox', 'click', function () { handleAccessoryResourceClick($(this)); }); @@ -65,14 +65,13 @@ function AccessoryManagement(opts) { WireUpUnlimited(elements.editUnlimited, elements.editQuantity); }; - var getSubmitCallback = function(action) { - return function() { + var getSubmitCallback = function (action) { + return function () { return options.submitUrl + "?aid=" + getActiveId() + "&action=" + action; }; }; - var defaultSubmitCallback = function (form) - { + var defaultSubmitCallback = function (form) { return options.submitUrl + "?aid=" + getActiveId() + "&action=" + form.attr('ajaxAction'); }; @@ -85,17 +84,15 @@ function AccessoryManagement(opts) { return elements.activeId.val(); } - var editAccessory = function() { + var editAccessory = function () { var accessory = getActiveAccessory(); elements.editName.val(accessory.name); elements.editQuantity.val(accessory.quantity); - if (accessory.quantity == '') - { + if (accessory.quantity == '') { elements.editUnlimited.prop('checked', true); } - else - { + else { elements.editUnlimited.prop('checked', false); } @@ -103,69 +100,69 @@ function AccessoryManagement(opts) { elements.editDialog.modal('show'); }; - function handleAccessoryResourceClick(checkbox) - { + function handleAccessoryResourceClick(checkbox) { var quantities = checkbox.closest('div[resource-id]').find('.quantities'); - if (checkbox.is(':checked')) - { - quantities.removeClass('no-show'); + if (checkbox.is(':checked')) { + quantities.removeClass('show'); } - else - { - quantities.addClass('no-show'); + else { + quantities.addClass('show'); } } - var showAccessoryResources = function() - { + var showAccessoryResources = function () { var accessory = getActiveAccessory(); - $.get(opts.submitUrl + '?dr=accessoryResources&aid=' + accessory.id, function(data) - { + $.get(opts.submitUrl + '?dr=accessoryResources&aid=' + accessory.id, function (data) { elements.accessoryResourcesDialog.find(':checkbox').prop('checked', false); - elements.accessoryResourcesDialog.find('.hidden').hide(); + elements.accessoryResourcesDialog.find('.collapse').removeClass('show'); - $.each(data, function(idx, resource){ + $.each(data, function (idx, resource) { var div = elements.accessoryResourcesDialog.find('[resource-id="' + resource.ResourceId + '"]'); var checkbox = div.find(':checkbox'); checkbox.prop('checked', true); + + var collapseTarget = div.find('#quantitiesaccessoryResource' + resource.ResourceId); + if (checkbox.is(':checked')) { + collapseTarget.collapse('show'); + } else { + collapseTarget.collapse('hide'); + } + handleAccessoryResourceClick(checkbox); div.find('[data-type="min-quantity"]').val(resource.MinQuantity); div.find('[data-type="max-quantity"]').val(resource.MaxQuantity); }); + elements.accessoryResourcesDialog.find('.resourcesDialogLabel').val(accessory.name + ' (' + accessory.quantity + ')'); elements.accessoryResourcesDialog.modal('show'); }); }; - var deleteAccessory = function() { + + var deleteAccessory = function () { elements.deleteDialog.modal('show'); }; - var getActiveAccessory = function () - { + var getActiveAccessory = function () { return accessories[getActiveId()]; }; - var WireUpUnlimited = function(checkbox, quantity) - { - checkbox.change(function(){ - if (checkbox.is(":checked")) - { + var WireUpUnlimited = function (checkbox, quantity) { + checkbox.change(function () { + if (checkbox.is(":checked")) { quantity.val(''); quantity.attr('disabled', 'disabled'); } - else - { + else { quantity.removeAttr('disabled'); } }); }; - AccessoryManagement.prototype.addAccessory = function(id, name, quantity) - { - accessories[id] = {id: id, name: name, quantity: quantity}; + AccessoryManagement.prototype.addAccessory = function (id, name, quantity) { + accessories[id] = { id: id, name: name, quantity: quantity }; }; } diff --git a/Web/scripts/admin/blackouts.js b/Web/scripts/admin/blackouts.js index 4dcfd512c..427d15171 100644 --- a/Web/scripts/admin/blackouts.js +++ b/Web/scripts/admin/blackouts.js @@ -60,7 +60,7 @@ function BlackoutManagement(opts) { var id = tr.attr('data-blackout-id'); $.blockUI({ - message: $('#update-box'), css: {textAlign: 'left'} + message: $('#update-box'), css: { textAlign: 'left' } }); var updateDiv = $('#update-contents'); @@ -82,19 +82,18 @@ function BlackoutManagement(opts) { }); $('#cancelUpdate').click(function (e) { - $('#update-box').addClass('no-show'); - $.unblockUI(); + $('#update-box').addClass('d-none'); + $.unblockUI(); }); $('.blackoutResources').click(function (e) { - if ($(".blackoutResources input:checked").length == 0) - { + if ($(".blackoutResources input:checked").length == 0) { e.preventDefault(); } }); wireUpTimePickers(); - $('#update-box').removeClass('no-show'); + $('#update-box').removeClass('d-none'); }); }); @@ -145,7 +144,7 @@ function BlackoutManagement(opts) { e.stopPropagation(); var isChecked = elements.deleteMultipleSelectAll.is(":checked"); elements.deleteMultipleCheckboxes.prop('checked', isChecked); - elements.deleteMultiplePrompt.toggleClass('no-show', !isChecked); + elements.deleteMultiplePrompt.toggleClass('d-none', !isChecked); }); elements.deleteMultipleCheckboxes.click(function (e) { @@ -153,7 +152,7 @@ function BlackoutManagement(opts) { var numberChecked = elements.reservationTable.find('.delete-multiple:checked').length; var allSelected = numberChecked == elements.reservationTable.find('.delete-multiple').length; elements.deleteMultipleSelectAll.prop('checked', allSelected); - elements.deleteMultiplePrompt.toggleClass('no-show', numberChecked == 0); + elements.deleteMultiplePrompt.toggleClass('d-none', numberChecked == 0); }); ConfigureAsyncForm(elements.addBlackoutForm, getAddUrl, onAddSuccess, null, { @@ -185,7 +184,7 @@ function BlackoutManagement(opts) { } function showWaitBox() { - $.blockUI({message: $('#wait-box')}); + $.blockUI({ message: $('#wait-box') }); $('#result').hide(); $('#creatingNotification').show(); @@ -194,8 +193,7 @@ function BlackoutManagement(opts) { function onBeforeAddSubmit(formData, jqForm, opts) { var isValid = BeforeFormSubmit(formData, jqForm, opts); - if (isValid) - { + if (isValid) { showWaitBox(); } return isValid; @@ -251,13 +249,11 @@ function BlackoutManagement(opts) { function handleBlackoutApplicabilityChange() { elements.allResources.change(function () { - if ($(this).is(':checked')) - { + if ($(this).is(':checked')) { elements.addResourceId.attr('disabled', 'disabled'); elements.addScheduleId.removeAttr('disabled'); } - else - { + else { elements.addScheduleId.attr('disabled', 'disabled'); elements.addResourceId.removeAttr('disabled'); } diff --git a/Web/scripts/schedule.js b/Web/scripts/schedule.js index 554721934..95ed859be 100644 --- a/Web/scripts/schedule.js +++ b/Web/scripts/schedule.js @@ -230,8 +230,8 @@ function Schedule(opts, resourceGroups) { const tableEndDate = Number.parseInt(table.data("max")); return ( (reservation.StartDate >= tableStartDate && reservation.StartDate < tableEndDate) - || (reservation.EndDate > tableStartDate && reservation.EndDate <= tableEndDate) - || (reservation.StartDate <= tableStartDate && reservation.EndDate >= tableEndDate) + || (reservation.EndDate > tableStartDate && reservation.EndDate <= tableEndDate) + || (reservation.StartDate <= tableStartDate && reservation.EndDate >= tableEndDate) ); } @@ -337,7 +337,7 @@ function Schedule(opts, resourceGroups) { continue; } const startEnd = findReservationStartAndEndSlots(reservation, tr_slots); - const {startSlot, endSlot, height, width, top, left} = startEnd; + const { startSlot, endSlot, height, width, top, left } = startEnd; let div = createDivForReservation(reservation, startSlot, endSlot, height, width, top, left); if (reservation.IsReservation) { attachReservationEvents(div, reservation); @@ -346,7 +346,7 @@ function Schedule(opts, resourceGroups) { if (isDraggable) { div.on( 'dragstart', - {referenceNumber: reservation.ReferenceNumber, resourceId: reservation.ResourceId}, + { referenceNumber: reservation.ReferenceNumber, resourceId: reservation.ResourceId }, function (event) { div.qtip("hide"); $(event.target).removeClass('clicked'); @@ -369,7 +369,7 @@ function Schedule(opts, resourceGroups) { if (options.isReservable) { initReservable(); } - $("#loading-schedule").addClass("no-show"); + $("#loading-schedule").addClass("d-none"); renderingEvents = false; return; @@ -404,7 +404,7 @@ function Schedule(opts, resourceGroups) { } let $tempElement = $('