Skip to content
Merged
32 changes: 28 additions & 4 deletions Web/css/librebooking.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand All @@ -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 {
Expand All @@ -256,6 +276,10 @@ fieldset:disabled .btn {
width: 90px;
}

.form-select.dateinput {
width: 90px;
}

#add-blackout-panel label {
min-width: 90px;
}
Expand Down
5 changes: 3 additions & 2 deletions Web/css/schedule.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
border-width: 0 0 1px;
}

/*
.navbar-collapse.collapse {
display: none !important;
}

*/
.navbar-nav {
float: none !important;
margin-top: 7.5px;
Expand Down Expand Up @@ -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;
Expand Down
Binary file modified Web/img/readme/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Web/img/readme/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 41 additions & 44 deletions Web/scripts/admin/accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

Expand All @@ -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');
};

Expand All @@ -85,87 +84,85 @@ 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);
}

elements.editUnlimited.trigger('change');
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 };
};
}
26 changes: 11 additions & 15 deletions Web/scripts/admin/blackouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
});
});

Expand Down Expand Up @@ -145,15 +144,15 @@ 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) {
e.stopPropagation();
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, {
Expand Down Expand Up @@ -185,7 +184,7 @@ function BlackoutManagement(opts) {
}

function showWaitBox() {
$.blockUI({message: $('#wait-box')});
$.blockUI({ message: $('#wait-box') });

$('#result').hide();
$('#creatingNotification').show();
Expand All @@ -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;
Expand Down Expand Up @@ -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');
}
Expand Down
Loading