summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-02 18:44:10 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-02 18:44:10 +0300
commit16e5a1b10025c84465caf93458c40efb8a6aa87d (patch)
treee021f0c3c8c71e12012807e6ba77bc0f87210d3a
parent4c1820a2a1198cd856c0e5a315599b8b9f274121 (diff)
downloadnextcloud-server-16e5a1b10025c84465caf93458c40efb8a6aa87d.tar.gz
nextcloud-server-16e5a1b10025c84465caf93458c40efb8a6aa87d.zip
Fix lazy styles loading in IE8
-rw-r--r--core/js/js.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 3904787c4e5..5158b66d73a 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -226,8 +226,12 @@ var OC={
var path=OC.filePath(app,'css',style+'.css');
if(OC.addStyle.loaded.indexOf(path)===-1){
OC.addStyle.loaded.push(path);
- style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>');
- $('head').append(style);
+ if (document.createStyleSheet) {
+ document.createStyleSheet(path);
+ } else {
+ style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>');
+ $('head').append(style);
+ }
}
},
basename: function(path) {