Make the backend footer sticky and remove the "placeFooterToBottom" function
This commit is contained in:
parent
b62e458258
commit
4446f26399
14 changed files with 12 additions and 58 deletions
|
@ -5,7 +5,7 @@
|
|||
* @var string $user_display_name
|
||||
*/
|
||||
?>
|
||||
<div id="footer" class="d-lg-flex justify-content-lg-start align-items-lg-center p-2 text-center text-lg-left">
|
||||
<div id="footer" class="d-lg-flex justify-content-lg-start align-items-lg-center p-2 text-center text-lg-left mt-auto">
|
||||
<div class="mb-3 me-lg-5 mb-lg-0">
|
||||
<img class="me-1" src="<?= base_url('assets/img/logo-16x16.png') ?>" alt="Easy!Appointments Logo">
|
||||
|
||||
|
|
|
@ -24,12 +24,16 @@
|
|||
|
||||
<?php slot('styles') ?>
|
||||
</head>
|
||||
<body>
|
||||
<body class="d-flex flex-column h-100">
|
||||
|
||||
<main class="flex-shrink-0">
|
||||
|
||||
<?php component('backend_header', ['active_menu' => vars('active_menu')]) ?>
|
||||
|
||||
<?php slot('content') ?>
|
||||
|
||||
</main>
|
||||
|
||||
<?php component('backend_footer', ['user_display_name' => vars('user_display_name')]) ?>
|
||||
|
||||
<script src="<?= asset_url('assets/vendor/jquery/jquery.min.js') ?>"></script>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
* @since v1.5.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@-moz-document url-prefix() {
|
||||
body .checkbox input[type='checkbox'] {
|
||||
float: left;
|
||||
|
|
|
@ -37,20 +37,6 @@ window.App.Layouts.Backend = (function () {
|
|||
const PRIV_SYSTEM_SETTINGS = 'system_settings';
|
||||
const PRIV_USER_SETTINGS = 'user_settings';
|
||||
|
||||
function placeFooterToBottom() {
|
||||
if (window.innerHeight > $('body').height()) {
|
||||
$footer.css({
|
||||
'position': 'absolute',
|
||||
'width': '100%',
|
||||
'bottom': '0px'
|
||||
});
|
||||
} else {
|
||||
$footer.css({
|
||||
'position': 'static'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display backend notifications to user.
|
||||
*
|
||||
|
@ -103,12 +89,6 @@ window.App.Layouts.Backend = (function () {
|
|||
* Initialize the module.
|
||||
*/
|
||||
function initialize() {
|
||||
$(window)
|
||||
.on('resize', () => {
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
})
|
||||
.trigger('resize');
|
||||
|
||||
$(document).ajaxStart(() => {
|
||||
$loading.show();
|
||||
});
|
||||
|
@ -139,7 +119,6 @@ window.App.Layouts.Backend = (function () {
|
|||
PRIV_USERS,
|
||||
PRIV_SYSTEM_SETTINGS,
|
||||
PRIV_USER_SETTINGS,
|
||||
placeFooterToBottom,
|
||||
displayNotification
|
||||
};
|
||||
})();
|
||||
|
|
|
@ -190,8 +190,6 @@ App.Pages.Account = (function () {
|
|||
$saveSettings.on('click', onSaveSettingsClick);
|
||||
|
||||
$username.on('change', onUsernameChange);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -97,8 +97,6 @@ App.Pages.ApiSettings = (function () {
|
|||
const apiSettings = vars('api_settings');
|
||||
|
||||
deserialize(apiSettings);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -221,8 +221,6 @@ App.Pages.BookingSettings = (function () {
|
|||
deserialize(bookingSettings);
|
||||
|
||||
applyInitialState();
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -166,8 +166,6 @@ App.Pages.BusinessSettings = (function () {
|
|||
$saveSettings.on('click', onSaveSettingsClick);
|
||||
|
||||
$applyGlobalWorkingPlan.on('click', onApplyGlobalWorkingPlan);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -172,8 +172,6 @@ App.Pages.GeneralSettings = (function () {
|
|||
const generalSettings = vars('general_settings');
|
||||
|
||||
deserialize(generalSettings);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -97,8 +97,6 @@ App.Pages.GoogleAnalyticsSettings = (function () {
|
|||
const googleAnalyticsSettings = vars('google_analytics_settings');
|
||||
|
||||
deserialize(googleAnalyticsSettings);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -150,8 +150,6 @@ App.Pages.LegalSettings = (function () {
|
|||
deserialize(legalSettings);
|
||||
|
||||
$saveSettings.on('click', onSaveSettingsClick);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -97,8 +97,6 @@ App.Pages.MatomoAnalyticsSettings = (function () {
|
|||
const matomoAnalyticsSettings = vars('matomo_analytics_settings');
|
||||
|
||||
deserialize(matomoAnalyticsSettings);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initialize);
|
||||
|
|
|
@ -215,13 +215,6 @@ App.Pages.Providers = (function () {
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Event: Display Provider Details "Click"
|
||||
*/
|
||||
$providers.on('shown.bs.tab', 'a[data-bs-toggle="tab"]', () => {
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
});
|
||||
|
||||
/**
|
||||
* Event: Reset Working Plan Button "Click".
|
||||
*/
|
||||
|
@ -461,7 +454,6 @@ App.Pages.Providers = (function () {
|
|||
.find('.edit-working-plan-exception, .delete-working-plan-exception')
|
||||
.prop('disabled', true);
|
||||
$providers.find('.working-plan input:checkbox').prop('disabled', true);
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,9 +127,6 @@ App.Utils.CalendarTableView = (function () {
|
|||
|
||||
currentDate = moment(currentDate).add({days: 1}).toDate();
|
||||
}
|
||||
|
||||
// setCalendarViewSize();
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -536,8 +533,6 @@ App.Utils.CalendarTableView = (function () {
|
|||
|
||||
$('#calendar .calendar-view').remove();
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
|
||||
const $calendarView = $('<div/>', {
|
||||
'class': 'calendar-view'
|
||||
}).appendTo('#calendar');
|
||||
|
@ -559,8 +554,6 @@ App.Utils.CalendarTableView = (function () {
|
|||
|
||||
setCalendarViewSize();
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
|
||||
// Activate calendar navigation.
|
||||
$('#calendar .calendar-header .btn').removeClass('disabled').prop('disabled', false);
|
||||
|
||||
|
@ -676,8 +669,6 @@ App.Utils.CalendarTableView = (function () {
|
|||
// Add the unavailabilities to the column.
|
||||
/** @var {Array} events.unavailabilities */
|
||||
createUnavailabilities($providerColumn, events.unavailabilities);
|
||||
|
||||
App.Layouts.Backend.placeFooterToBottom();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue