Skip to content
Snippets Groups Projects
Commit 88e99536 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Reorder entire PR

parent 36a6963d
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@
{% block preload %}
<link rel="stylesheet" href="{{ asset('css/admin.css', 'admin') }}">
<link rel="preload" href="{{ asset('js/bundle.js') }}" as="script">
{% endblock %}
{% block content %}
......@@ -147,7 +146,3 @@
</fieldset>
</form>
{% endblock %}
{% block postload %}
<script src="{{ asset('js/bundle.js') }}"></script>
{% endblock %}
"use strict";
ready(function () {
var button = document.getElementById("submit_button");
button.onclick = function () {
......@@ -11,3 +9,4 @@ ready(function () {
return true;
};
});
import ClipboardJS from "clipboard/dist/clipboard";
ready(function () {
// Clipboard
var clipboard = new ClipboardJS('.copy');
clipboard.on('success', function (e) {
setTimeout(function () {
e.clearSelection();
}, 150);
});
});
ready(function () {
// Expander boxes
var expandable = document.querySelectorAll('.expandable > .expander');
for (var i = 0; i < expandable.length; i++) {
expandable[i].currentValue.onclick = function (e) {
var parent = e.currentTarget.parentNode;
if (parent.className.match(/(?:^|\s)expanded(?!\S)/)) {
parent.className = parent.className.replace(/(?:^|\s)expanded(?!\S)/g , '');
} else {
parent.className += " expanded";
}
e.currentTarget.blur();
};
}
});
"use strict";
import ClipboardJS from "clipboard/dist/clipboard";
import hljs from "highlight.js/lib/core";
import xml from "highlight.js/lib/languages/xml";
import php from "highlight.js/lib/languages/php";
import json from "highlight.js/lib/languages/json";
// Expander boxes
var expandable = document.querySelectorAll('.expandable > .expander');
expandable.forEach(function (currentValue, index, arr) {
currentValue.onclick = function (e) {
e.preventDefault();
var parent = e.currentTarget.parentNode;
if (parent.className.match(/(?:^|\s)expanded(?!\S)/)) {
parent.className = parent.className.replace(/(?:^|\s)expanded(?!\S)/g , '');
} else {
parent.className += " expanded";
}
e.currentTarget.blur();
}
});
ready(function () {
// Syntax highlight
hljs.registerLanguage('xml', xml);
......@@ -33,13 +13,4 @@ ready(function () {
codeBoxes.forEach(function (currentValue, index, arr) {
hljs.highlightElement(currentValue);
});
// Clipboard
var clipboard = new ClipboardJS('.copy');
clipboard.on('success', function (e) {
setTimeout(function () {
e.clearSelection();
}, 150);
});
});
"use strict";
import "es5-shim";
import "es6-shim";
window.readyHandlers = [];
window.ready = function ready(handler) {
window.readyHandlers.push(handler);
handleState();
};
window.handleState = function handleState () {
if (document.readyState === 'interactive' || document.readyState === "complete") {
while(window.readyHandlers.length > 0) {
(window.readyHandlers.shift())();
}
}
};
document.onreadystatechange = window.handleState;
ready(function () {
// Language selector
var languageSelector = document.getElementById("language-selector");
......@@ -54,19 +33,4 @@ ready(function () {
menuLink.className += " active";
}
};
// Expander boxes
var expandable = document.querySelectorAll('.expandable > .expander');
for (var i = 0; i < expandable.length; i++) {
expandable[i].currentValue.onclick = function (e) {
var parent = e.currentTarget.parentNode;
if (parent.className.match(/(?:^|\s)expanded(?!\S)/)) {
parent.className = parent.className.replace(/(?:^|\s)expanded(?!\S)/g , '');
} else {
parent.className += " expanded";
}
e.currentTarget.blur();
};
}
});
'use strict';
import "es5-shim";
import "es6-shim";
import * as ready from './ready';
import * as language from './language';
import * as expander from './expander';
import * as clipboard from './clipboard';
import * as highlight from './highlight';
window.readyHandlers = [];
window.ready = function ready(handler) {
window.readyHandlers.push(handler);
handleState();
};
window.handleState = function handleState () {
if (document.readyState === 'interactive' || document.readyState === "complete") {
while(window.readyHandlers.length > 0) {
(window.readyHandlers.shift())();
}
}
};
document.onreadystatechange = window.handleState;
"use strict";
'use strict';
/**
* This class is used for the logout page.
......
"use strict";
'use strict';
import SimpleSAMLLogout from './logout.js';
......
{% set pagetitle = 'Authentication status'|trans %}
{% extends 'base.twig' %}
{% block preload %}
<link rel="preload" href="{{ asset('js/main.js') }}" as="script">
{% endblock %}
{% block content %}
<h2>{{ pagetitle }}</h2>
......@@ -120,7 +116,3 @@
</div>
{% endif %}
{% endblock %}
{% block postload %}
<script src="{{ asset('js/bundle.js') }}"></script>
{% endblock %}
......@@ -12,7 +12,7 @@
<link rel="stylesheet" href="{{ asset("assets/css/src/default-rtl.css") }}">
{% endif %}
<meta name="robots" content="noindex, nofollow">
<link rel="preload" href="{{ asset('js/main.js') }}" as="script">
<link rel="preload" href="{{ asset('js/bundle.js') }}" as="script">
{% block preload %}{% endblock %}
</head>
<body id="{{ templateId }}">
......@@ -30,7 +30,7 @@
<div id="foot">
{% block footer %}{% include "_footer.twig" %}{% endblock %}
</div>
<script src="{{ asset('js/main.js') }}"></script>
<script src="{{ asset('js/bundle.js') }}"></script>
{% block postload %}{% endblock %}
</body>
</html>
......
......@@ -17,7 +17,7 @@ module.exports = environment => {
const secondaryBackground = env.hasOwnProperty('secondaryBackground') ? env.secondaryBackground : '#e8410c';
return {
entry: {
bundle: './src/js/bundle',
bundle: './src/js/bundle/main',
logout: './src/js/logout/main',
stylesheet: './src/js/style'
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment