From b9dee1d488191b4a21de74671ef082896e3783cc Mon Sep 17 00:00:00 2001
From: labmecanicatec <58854556+labmecanicatec@users.noreply.github.com>
Date: Fri, 6 Sep 2024 13:30:57 -0500
Subject: [PATCH 18/23] Pending status is highlighted in respopup and
manage_reservations
---
tpl/Admin/Reservations/manage_reservations.tpl | 15 +++++++--------
tpl/Ajax/respopup.tpl | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/tpl/Admin/Reservations/manage_reservations.tpl b/tpl/Admin/Reservations/manage_reservations.tpl
index a738c207b..7dec5a2ec 100644
--- a/tpl/Admin/Reservations/manage_reservations.tpl
+++ b/tpl/Admin/Reservations/manage_reservations.tpl
@@ -219,7 +219,7 @@
{foreach from=$reservations item=reservation}
{cycle values='row0,row1' assign=rowCss}
{if $reservation->RequiresApproval}
- {assign var=rowCss value='pending'}
+ {assign var=rowCss value='table-warning pending'}
{/if}
{assign var=reservationId value=$reservation->ReservationId}
{if $reservation->RequiresApproval}
-
+
{else}
-
{/if}
@@ -291,23 +290,23 @@
-
+
{formatdate date=$reservation->CreatedDate timezone=$Timezone key=short_datetime}
-
+
{formatdate date=$reservation->ModifiedDate timezone=$Timezone key=short_datetime}
-
+
{formatdate date=$reservation->CheckinDate timezone=$Timezone key=short_datetime}
-
+
{formatdate date=$reservation->CheckoutDate timezone=$Timezone key=short_datetime}
-
+
{formatdate date=$reservation->OriginalEndDate timezone=$Timezone key=short_datetime}
diff --git a/tpl/Ajax/respopup.tpl b/tpl/Ajax/respopup.tpl
index 19c2d0dc3..6c1c0bd79 100644
--- a/tpl/Ajax/respopup.tpl
+++ b/tpl/Ajax/respopup.tpl
@@ -131,7 +131,7 @@
{capture "pending"}
{if $requiresApproval}
- {translate key=PendingApproval}
+ {translate key=PendingApproval}
{/if}
{/capture}
{$formatter->Add('pending', $smarty.capture.pending)}
From cc8a6d9995d9c4c22d1309eab099d820e8d3100b Mon Sep 17 00:00:00 2001
From: labmecanicatec <58854556+labmecanicatec@users.noreply.github.com>
Date: Fri, 6 Sep 2024 15:34:43 -0500
Subject: [PATCH 19/23] Update .htaccess
---
.htaccess | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/.htaccess b/.htaccess
index 250d363f5..56e7ec445 100644
--- a/.htaccess
+++ b/.htaccess
@@ -5,12 +5,8 @@ RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-#RewriteCond %{REQUEST_URI} !^/Web/
-#RewriteRule ^(.*)$ /Web/$1 [R]
-RewriteRule ^Web - [L,NC]
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ Web/$1 [QSA,L]
+RewriteCond %{REQUEST_URI} !^/Web/
+RewriteRule ^(.*)$ /Web/$1 [R]
#Header Set Access-Control-Allow-Origin "*"
#Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
From ab6377cab45dc642c7481345c7d406090ca8a93c Mon Sep 17 00:00:00 2001
From: labmecanicatec <58854556+labmecanicatec@users.noreply.github.com>
Date: Fri, 6 Sep 2024 21:06:51 -0500
Subject: [PATCH 20/23] The no-show class is changed to d-none or
visually-hidden, the checkin and checkout buttons are styled
---
Web/scripts/admin/attributes.js | 14 ++--
Web/scripts/admin/resource.js | 24 +++---
Web/scripts/dashboard.js | 80 ++++++++++---------
tpl/Admin/Attributes/manage_attributes.tpl | 12 +--
tpl/Admin/Blackouts/manage_blackouts.tpl | 11 +--
.../Reservations/manage_reservations.tpl | 2 +-
tpl/Admin/Resources/manage_resources.tpl | 10 +--
.../manage_resources_group_permissions.tpl | 2 +-
.../manage_resources_user_permissions.tpl | 2 +-
tpl/Dashboard/dashboard_reservation.tpl | 3 +-
10 files changed, 84 insertions(+), 76 deletions(-)
diff --git a/Web/scripts/admin/attributes.js b/Web/scripts/admin/attributes.js
index 3d4bc4650..2e3a65603 100644
--- a/Web/scripts/admin/attributes.js
+++ b/Web/scripts/admin/attributes.js
@@ -37,11 +37,11 @@ function AttributeManagement(opts) {
$.ajax({
url: opts.changeCategoryUrl + categoryId, cache: false, beforeSend: function () {
- $('#indicator').removeClass('no-show').insertBefore(elements.attributeList);
+ $('#indicator').removeClass('d-none').insertBefore(elements.attributeList);
$(elements.attributeList).html('');
}
}).done(function (data) {
- $('#indicator').addClass('no-show');
+ $('#indicator').addClass('d-none');
$(elements.attributeList).html(data);
});
}
@@ -156,9 +156,9 @@ function AttributeManagement(opts) {
});
elements.limitScope.change(function () {
- elements.attributeSecondary.addClass('no-show');
+ elements.attributeSecondary.addClass('d-none');
if (elements.limitScope.is(':checked')) {
- elements.attributeSecondary.removeClass('no-show');
+ elements.attributeSecondary.removeClass('d-none');
}
});
@@ -321,14 +321,14 @@ function AttributeManagement(opts) {
if (elements.attributeCategory.val() == options.categories.reservation) {
$('.attributeUnique').hide();
$('.attributeAdminOnly').show();
- $('.secondaryEntities, .attributeSecondary').addClass('no-show');
- $('.secondaryEntities').removeClass('no-show');
+ $('.secondaryEntities, .attributeSecondary').addClass('d-none');
+ $('.secondaryEntities').removeClass('d-none');
$('.attributeIsPrivate').show();
}
else {
$('.attributeUnique').show();
//$('.attributeAdminOnly').hide();
- $('.secondaryEntities, .attributeSecondary').addClass('no-show');
+ $('.secondaryEntities, .attributeSecondary').addClass('d-none');
$('.attributeIsPrivate').hide();
}
};
diff --git a/Web/scripts/admin/resource.js b/Web/scripts/admin/resource.js
index cc3a8a1f1..50414d24b 100644
--- a/Web/scripts/admin/resource.js
+++ b/Web/scripts/admin/resource.js
@@ -326,11 +326,11 @@ function ResourceManagement(opts) {
$('#bulkEditConcurrent').change(function () {
if ($(this).val() == '1') {
- $('#bulkEditAllowConcurrentDiv').removeClass('no-show');
+ $('#bulkEditAllowConcurrentDiv').removeClass('d-none');
}
if ($(this).val() == '0') {
- $('#bulkEditAllowConcurrentDiv').addClass('no-show');
+ $('#bulkEditAllowConcurrentDiv').addClass('d-none');
}
});
@@ -461,10 +461,10 @@ function ResourceManagement(opts) {
elements.toggleStatusChangeMessage.on('change', function (e) {
if ($(this).is(":checked")) {
- elements.sendStatusChangeMessageContent.removeClass('no-show');
+ elements.sendStatusChangeMessageContent.removeClass('d-none');
}
else {
- elements.sendStatusChangeMessageContent.addClass('no-show');
+ elements.sendStatusChangeMessageContent.addClass('d-none');
}
});
@@ -833,10 +833,10 @@ function ResourceManagement(opts) {
addStatusReason.unbind();
addStatusReason.click(function (e) {
e.preventDefault();
- statusForm.find(elements.newStatusReason).toggleClass('no-show');
- statusForm.find(elements.existingStatusReason).toggleClass('no-show');
+ statusForm.find(elements.newStatusReason).toggleClass('d-none');
+ statusForm.find(elements.existingStatusReason).toggleClass('d-none');
- if (statusForm.find(elements.newStatusReason).hasClass('no-show')) {
+ if (statusForm.find(elements.newStatusReason).hasClass('d-none')) {
statusForm.find(elements.statusReasons).data('prev', statusReasons.val());
statusForm.find(elements.statusReasons).val('');
statusForm.find(elements.resourceStatusReason).focus();
@@ -857,7 +857,7 @@ function ResourceManagement(opts) {
//
elements.toggleStatusChangeMessage.prop('checked', false);
- elements.sendStatusChangeMessageContent.addClass('no-show');
+ elements.sendStatusChangeMessageContent.addClass('d-none');
elements.statusMessageContent.val('');
elements.statusDialog.modal('show');
@@ -928,12 +928,12 @@ function ResourceManagement(opts) {
var resourceId = getActiveResourceId();
$.get(opts.permissionsUrl + '?dr=users', { rid: resourceId }, function (data) {
elements.resourceUserList.html(data);
- $('.user-permission-spinner').addClass('no-show');
+ $('.user-permission-spinner').addClass('d-none');
});
};
var changeUserPermission = function (userId, type) {
- $('.user-permission-spinner').removeClass('no-show');
+ $('.user-permission-spinner').removeClass('d-none');
$('#changeUserId').val(userId);
$('#changeUserType').val(type);
elements.changeUserForm.submit();
@@ -955,12 +955,12 @@ function ResourceManagement(opts) {
var resourceId = getActiveResourceId();
$.get(opts.permissionsUrl + '?dr=groups', { rid: resourceId }, function (data) {
elements.resourceGroupList.html(data);
- $('.group-permission-spinner').addClass('no-show');
+ $('.group-permission-spinner').addClass('d-none');
});
};
var changeGroupPermission = function (groupId, type) {
- $('.group-permission-spinner').removeClass('no-show');
+ $('.group-permission-spinner').removeClass('d-none');
$('#changeGroupId').val(groupId);
$('#changeGroupType').val(type);
elements.changeGroupForm.submit();
diff --git a/Web/scripts/dashboard.js b/Web/scripts/dashboard.js
index 3af6f320f..c530d239c 100644
--- a/Web/scripts/dashboard.js
+++ b/Web/scripts/dashboard.js
@@ -103,43 +103,49 @@ function Dashboard(opts) {
var refNum = $(this).attr('id');
window.location = options.reservationUrl + refNum;
});
- /* There is no btnCheckin or btnCheckout button, it appears to be unused.
- $('.btnCheckin').click(function (e) {
- e.preventDefault();
- e.stopPropagation();
- var button = $(this);
- button.attr('disabled', 'disabled');
- button.find('i').removeClass('fa-sign-in').addClass('fa-spinner');
-
- var form = $('#form-checkin');
- var refNum = $(this).attr('data-referencenumber');
- $('#referenceNumber').val(refNum);
- $.blockUI({ message: $('#wait-box') });
- ajaxPost(form, $(this).data('url'), null, function (data) {
- $('button[data-referencenumber="' + refNum + '"]').addClass('no-show');
- $('#result').html(data);
- ShowReservationAjaxResponse();
- });
- });
-
- $('.btnCheckout').click(function (e) {
- e.preventDefault();
- e.stopPropagation();
- var button = $(this);
- button.attr('disabled', 'disabled');
- button.find('i').removeClass('fa-sign-in').addClass('fa-spinner');
-
- var form = $('#form-checkout');
- var refNum = $(this).attr('data-referencenumber');
- $('#referenceNumber').val(refNum);
- $.blockUI({ message: $('#wait-box') });
- ajaxPost(form, null, null, function (data) {
- $('button[data-referencenumber="' + refNum + '"]').addClass('no-show');
- $('#result').html(data);
- ShowReservationAjaxResponse();
- });
- });
- */
+
+ $('.btnCheckin').click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ var button = $(this);
+ button.attr('disabled', 'disabled');
+ button.find('i').removeClass('bi-box-arrow-in-right').addClass('spinner-border').css({
+ 'width': '1rem',
+ 'height': '1rem'
+ });
+
+ var form = $('#form-checkin');
+ var refNum = $(this).attr('data-referencenumber');
+ $('#referenceNumber').val(refNum);
+ $.blockUI({ message: $('#wait-box') });
+ ajaxPost(form, $(this).data('url'), null, function (data) {
+ $('button[data-referencenumber="' + refNum + '"]').addClass('d-none');
+ $('#result').html(data);
+ ShowReservationAjaxResponse();
+ });
+ });
+
+ $('.btnCheckout').click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ var button = $(this);
+ button.attr('disabled', 'disabled');
+ button.find('i').removeClass('bi-box-arrow-in-left').addClass('spinner-border').css({
+ 'width': '1rem',
+ 'height': '1rem'
+ });
+
+ var form = $('#form-checkout');
+ var refNum = $(this).attr('data-referencenumber');
+ $('#referenceNumber').val(refNum);
+ $.blockUI({ message: $('#wait-box') });
+ ajaxPost(form, null, null, function (data) {
+ $('button[data-referencenumber="' + refNum + '"]').addClass('d-none');
+ $('#result').html(data);
+ ShowReservationAjaxResponse();
+ });
+ });
+
$('#wait-box').on('click', '#btnSaveSuccessful', function (e) {
CloseSaveDialog();
diff --git a/tpl/Admin/Attributes/manage_attributes.tpl b/tpl/Admin/Attributes/manage_attributes.tpl
index 1a6d059f6..d6a5444b2 100644
--- a/tpl/Admin/Attributes/manage_attributes.tpl
+++ b/tpl/Admin/Attributes/manage_attributes.tpl
@@ -107,7 +107,7 @@
- |