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:
David Morse
2015-04-08 08:13:58 -06:00
5 changed files with 23 additions and 14 deletions
+4 -1
View File
@@ -4161,18 +4161,21 @@
*/
fn.add_style_tag = function(css) {
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 {
}else{
tag.appendChild(document.createTextNode(css));
}
this.$style_tags = this.$style_tags.add(tag);
}
return this;
};
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -4161,18 +4161,21 @@
*/
fn.add_style_tag = function(css) {
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 {
}else{
tag.appendChild(document.createTextNode(css));
}
this.$style_tags = this.$style_tags.add(tag);
}
return this;
};
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -3284,18 +3284,21 @@
*/
fn.add_style_tag = function(css) {
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 {
}else{
tag.appendChild(document.createTextNode(css));
}
this.$style_tags = this.$style_tags.add(tag);
}
return this;
};