Reworking assets
This commit is contained in:
parent
1e546f00b1
commit
30f9b0f557
201 changed files with 434 additions and 14696 deletions
|
@ -1,7 +1,5 @@
|
|||
//submit-place.js
|
||||
|
||||
import alertify from 'alertify.js';
|
||||
|
||||
export default function submitNewPlace(map) {
|
||||
//create the form data to send
|
||||
let formData = new FormData();
|
||||
|
@ -65,7 +63,6 @@ export default function submitNewPlace(map) {
|
|||
selectElement.appendChild(newlyCreatedPlaceOption);
|
||||
document.querySelector('select [value="' + placeJson.uri + '"]').selected = true;
|
||||
}).catch(function (placeError) {
|
||||
alertify.reset();
|
||||
alertify.error(placeError);
|
||||
console.error(placeError);
|
||||
});
|
||||
}
|
45
resources/es6/a11y.js
vendored
45
resources/es6/a11y.js
vendored
|
@ -1,45 +0,0 @@
|
|||
//a11y.css.js
|
||||
|
||||
let checkbox = document.querySelector('input[name="a11y.css"]');
|
||||
|
||||
checkbox.addEventListener('change', function () {
|
||||
if (this.checked) {
|
||||
addA11yCss();
|
||||
} else {
|
||||
removeA11yCss();
|
||||
}
|
||||
});
|
||||
|
||||
function addA11yCss() {
|
||||
let exists = a11yCssExists();
|
||||
if (exists == false) {
|
||||
//add a11y.css link
|
||||
let link = document.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('href', '/assets/frontend/a11y.css/a11y-en.css');
|
||||
let head = document.querySelector('head');
|
||||
head.appendChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
function removeA11yCss() {
|
||||
let exists = a11yCssExists();
|
||||
if (exists == true) {
|
||||
//remove a11y.css link
|
||||
let link = document.querySelector('link[href="/assets/frontend/a11y.css/a11y-en.css"]');
|
||||
let head = document.querySelector('head');
|
||||
head.removeChild(link);
|
||||
}
|
||||
}
|
||||
|
||||
function a11yCssExists() {
|
||||
let css = document.querySelectorAll('link[rel=stylesheet]');
|
||||
let exists = false;
|
||||
for (let link of css) {
|
||||
if (link.attributes.href.nodeValue == '/assets/frontend/a11y.css/a11y-en.css') {
|
||||
exists = true;
|
||||
}
|
||||
}
|
||||
|
||||
return exists;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue