diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-02 18:44:10 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-07-09 15:42:47 +0300 |
commit | 0916bff81d57ce2df16350164bae460946a79b4a (patch) | |
tree | c0dc5723898f9b6e0a0ac994342ae44257eac1b9 /core/js | |
parent | 36491371c8fb494e0cfbad5c6f92f552d3542177 (diff) | |
download | nextcloud-server-0916bff81d57ce2df16350164bae460946a79b4a.tar.gz nextcloud-server-0916bff81d57ce2df16350164bae460946a79b4a.zip |
Fix lazy styles loading in IE8
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index a4665b927f2..aa1bcf642ee 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) { |