CSS separation, multi-tenancy fixes

This commit is contained in:
Shaun Walker
2019-10-12 16:32:47 -04:00
parent 7f69f76263
commit c029e70783
82 changed files with 957 additions and 811 deletions

View File

@ -28,21 +28,19 @@ window.interop = {
return "";
}
},
addCSS: function (id, url) {
if (document.getElementById(id) === null) {
var link = document.createElement("link");
includeCSS: function (id, url) {
var link = document.getElementById('yourid');
if (link === null) {
link = document.createElement("link");
link.id = id;
link.type = "text/css";
link.rel = "stylesheet";
link.href = url;
document.head.appendChild(link);
}
},
removeCSS: function (pattern) {
var links = document.getElementsByTagName("link");
for (var i = 0; i < links.length; i++) {
if (links[i].id.includes(pattern)) {
document.head.removeChild(links[i]);
else {
if (link.href !== url) {
link.setAttribute('href', url);
}
}
},