]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix lazy styles loading in IE8
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Tue, 2 Jul 2013 15:44:10 +0000 (18:44 +0300)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Tue, 2 Jul 2013 15:44:10 +0000 (18:44 +0300)
core/js/js.js

index 3904787c4e5cff5ec0f3e8ee49f24fc1e8956411..5158b66d73a7ab849b31083d4a3a8fbba3d2bfd1 100644 (file)
@@ -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) {