mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Merge remote-tracking branch 'andreas-trad/gridster.js.git/patch-1'
* andreas-trad/gridster.js.git/patch-1: Prevent multi <style> generation
This commit is contained in:
Vendored
+7
-4
@@ -4160,19 +4160,22 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_style_tag = function(css) {
|
||||
var d = document;
|
||||
var d = document;
|
||||
if(!document.getElementById('gridster-stylesheet')){
|
||||
var tag = d.createElement('style');
|
||||
tag.id = 'gridster-stylesheet';
|
||||
|
||||
d.getElementsByTagName('head')[0].appendChild(tag);
|
||||
tag.setAttribute('type', 'text/css');
|
||||
|
||||
if (tag.styleSheet) {
|
||||
tag.styleSheet.cssText = css;
|
||||
} else {
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
tag.styleSheet.cssText = css;
|
||||
}else{
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
}
|
||||
|
||||
this.$style_tags = this.$style_tags.add(tag);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+7
-4
@@ -4160,19 +4160,22 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_style_tag = function(css) {
|
||||
var d = document;
|
||||
var d = document;
|
||||
if(!document.getElementById('gridster-stylesheet')){
|
||||
var tag = d.createElement('style');
|
||||
tag.id = 'gridster-stylesheet';
|
||||
|
||||
d.getElementsByTagName('head')[0].appendChild(tag);
|
||||
tag.setAttribute('type', 'text/css');
|
||||
|
||||
if (tag.styleSheet) {
|
||||
tag.styleSheet.cssText = css;
|
||||
} else {
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
tag.styleSheet.cssText = css;
|
||||
}else{
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
}
|
||||
|
||||
this.$style_tags = this.$style_tags.add(tag);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -3283,19 +3283,22 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_style_tag = function(css) {
|
||||
var d = document;
|
||||
var d = document;
|
||||
if(!document.getElementById('gridster-stylesheet')){
|
||||
var tag = d.createElement('style');
|
||||
tag.id = 'gridster-stylesheet';
|
||||
|
||||
d.getElementsByTagName('head')[0].appendChild(tag);
|
||||
tag.setAttribute('type', 'text/css');
|
||||
|
||||
if (tag.styleSheet) {
|
||||
tag.styleSheet.cssText = css;
|
||||
} else {
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
tag.styleSheet.cssText = css;
|
||||
}else{
|
||||
tag.appendChild(document.createTextNode(css));
|
||||
}
|
||||
|
||||
this.$style_tags = this.$style_tags.add(tag);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user