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 = $('
') - .css({ + .css({ position: 'absolute', left: -9999, // Move off-screen 'font-size': '0.85em', @@ -537,10 +537,10 @@ function Schedule(opts, resourceGroups) { } if (overlap) { - if(opts.scheduleStyle === ScheduleStandard && typeof trHeights[currentTrId] !== "undefined"){ + if (opts.scheduleStyle === ScheduleStandard && typeof trHeights[currentTrId] !== "undefined") { top += trHeights[currentTrId]; } - else{ + else { top += height; } numberOfConflicts++; @@ -557,9 +557,9 @@ function Schedule(opts, resourceGroups) { var currentTrId = current_TR.attr('id'); - if(trAdjusted[currentTrId] === false) { //no sense in setting the row height multiple times because it will always be the same so do a check and set the height once per row with reservations + if (trAdjusted[currentTrId] === false) { //no sense in setting the row height multiple times because it will always be the same so do a check and set the height once per row with reservations if (current_TR.height() <= trHeights[currentTrId]) { - if(scheduleOpts.resourceMaxConcurrentReservations[res.ResourceId] > 1 && className != "unreservable") { //takes into account possible existence of concurrent reservations + if (scheduleOpts.resourceMaxConcurrentReservations[res.ResourceId] > 1 && className != "unreservable") { //takes into account possible existence of concurrent reservations current_TD.css('height', trHeights[currentTrId] + 40 + 'px'); } else { current_TD.css('height', trHeights[currentTrId] + 'px'); diff --git a/lang/en_us.php b/lang/en_us.php index c0d75c788..3187c52bc 100755 --- a/lang/en_us.php +++ b/lang/en_us.php @@ -1062,6 +1062,11 @@ protected function _LoadStrings() $strings['NoResourcesToView'] = 'No available resources'; //End View Resource + //Datatables + $strings['Info'] = "Showing page _PAGE_ of _PAGES_ of _MAX_"; + $strings['LengthMenu'] = "Display _MENU_ records per page"; + //End Datatables + $this->Strings = $strings; return $this->Strings; diff --git a/lang/es.php b/lang/es.php index a8a81facd..bac6a8466 100644 --- a/lang/es.php +++ b/lang/es.php @@ -532,7 +532,7 @@ protected function _LoadStrings() $strings['UsersInGroups'] = 'Usuarios en grupos'; $strings['UsersWithAccessToResources'] = 'Usuarios con acceso a recursos'; $strings['AnnouncementSubject'] = '%s ha publicado un nuevo anuncio'; - $strings['AnnouncementEmailNotice'] = 'los usuarios recibirán este anuncio por correo'; + $strings['AnnouncementEmailNotice'] = 'usuarios recibirán este anuncio por correo'; $strings['Day'] = 'Día'; $strings['NotifyWhenAvailable'] = 'Notificarme cuando esté disponible'; $strings['AddingToWaitlist'] = 'Añadiéndote a la lista de espera'; @@ -679,11 +679,11 @@ protected function _LoadStrings() $strings['FullAccess'] = 'Acceso completo'; $strings['ViewOnly'] = 'Sólo Ver'; $strings['Purge'] = 'Purgar'; - $strings['UsersWillBeDeleted'] = 'los usuarios serán borrados'; - $strings['BlackoutsWillBeDeleted'] = 'se borrarán las agendas de no disponibilidad'; - $strings['ReservationsWillBePurged'] = 'se purgarán las reservas'; - $strings['ReservationsWillBeDeleted'] = 'se borrarán las reservas'; - $strings['PermanentlyDeleteUsers'] = 'Borrar definitivamente los usuarios que no se han logado desde'; + $strings['UsersWillBeDeleted'] = 'usuarios serán borrados'; + $strings['BlackoutsWillBeDeleted'] = 'agendas de no disponibilidad serán borradas'; + $strings['ReservationsWillBePurged'] = 'reservas serán purgadas'; + $strings['ReservationsWillBeDeleted'] = 'reservas serán borradas'; + $strings['PermanentlyDeleteUsers'] = 'Borrar definitivamente los usuarios que no se han iniciado sesión desde'; $strings['DeleteBlackoutsBefore'] = 'Borrar agenda de no disponibilidad antes de'; $strings['DeletedReservations'] = 'Reservas Borradas'; $strings['DeleteReservationsBefore'] = 'Borrar reservas anteriores a'; @@ -1017,6 +1017,17 @@ protected function _LoadStrings() //End Schedule Resource Permissions //END NEEDS CHECKING + //View Resource + $strings['Check'] = 'Comprobar'; + $strings['PermissionType'] = 'Tipo de permiso'; + $strings['NoResourcesToView'] = 'No hay recursos disponibles'; + //End View Resource + + //Datatables + $strings['Info'] = "Mostrando página _PAGE_ of _PAGES_ de _MAX_"; + $strings['LengthMenu'] = "Mostrar _MENU_ registros po página"; + //End Datatables + $this->Strings = $strings; return $this->Strings; diff --git a/lib/Common/SmartyPage.php b/lib/Common/SmartyPage.php index 54f00d03e..f3ccbf6f7 100644 --- a/lib/Common/SmartyPage.php +++ b/lib/Common/SmartyPage.php @@ -575,10 +575,14 @@ public function CreatePagination($params, $smarty) $sb->Append('
diff --git a/tpl/Admin/Configuration/manage_configuration.tpl b/tpl/Admin/Configuration/manage_configuration.tpl index 71a713964..c64c7194b 100644 --- a/tpl/Admin/Configuration/manage_configuration.tpl +++ b/tpl/Admin/Configuration/manage_configuration.tpl @@ -34,12 +34,12 @@ {if $setting->Key == ConfigKeys::DEFAULT_TIMEZONE} - {html_options values=$TimezoneValues output=$TimezoneOutput selected=$setting->Value} {elseif $setting->Key == ConfigKeys::CSS_THEME} + title="default, dimgray, dark_red, dark_green, french_blue, orange"> {elseif $setting->Key == ConfigKeys::LANGUAGE} diff --git a/tpl/Admin/Resources/manage_resources.tpl b/tpl/Admin/Resources/manage_resources.tpl index 23a7f4181..cb5c67660 100644 --- a/tpl/Admin/Resources/manage_resources.tpl +++ b/tpl/Admin/Resources/manage_resources.tpl @@ -655,7 +655,7 @@
-
+
{translate key=ChooseOrDropFile}
diff --git a/tpl/Admin/manage_accessories.tpl b/tpl/Admin/manage_accessories.tpl index a89e9d713..bc697cdaa 100644 --- a/tpl/Admin/manage_accessories.tpl +++ b/tpl/Admin/manage_accessories.tpl @@ -126,9 +126,11 @@