Newer
Older
cas-server / cas / WEB-INF / classes / templates / monitoring / fragments / scripts.html
zhout on 17 Jun 2021 941 bytes first commit
<script th:src="@{#{webjars.headmin.js}}"></script>
<script type="text/javascript" th:src="@{${#themes.code('cas.javascript.file')}}"></script>

<script th:inline="javascript">
    head.ready(document, function () {
        if (!window.jQuery) {
            var jqueryUrl = /*[[@{#{webjars.jquerymin.js}}]]*/;
            head.load(jqueryUrl, loadjQueryUI);
        } else {
            notifyResourcesAreLoaded(resourceLoadedSuccessfully);
        }
    });

    function loadjQueryUI() {
        var jqueryUrl = /*[[@{#{webjars.jqueryui.js}}]]*/;
        head.load(jqueryUrl, loadjQueryCookies);
    }

    function loadjQueryCookies() {
        var jqueryUrl = /*[[@{#{webjars.jquerycookie.js}}]]*/;
        head.load(jqueryUrl, notifyResourcesAreLoaded(resourceLoadedSuccessfully));
    }

    function notifyResourcesAreLoaded(callback) {
        if (typeof callback === "function") {
            callback();
        }
    }
</script>