aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-12 09:43:04 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-12 09:43:04 +0200
commit24b4806af4a9b485b4b9a772809d118e91c6d97f (patch)
treedf5664782eefd384bd6ed3dc363a25575da89202 /core/js/js.js
parent8793acfb4e751cfdb464d259de45249cec5d6398 (diff)
parent3abe68176ff09ca579ff9e5f15872fb5cab8ff4d (diff)
downloadnextcloud-server-24b4806af4a9b485b4b9a772809d118e91c6d97f.tar.gz
nextcloud-server-24b4806af4a9b485b4b9a772809d118e91c6d97f.zip
Merge branch 'master' into googledrive
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 3cb4d3dd151..5158b66d73a 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -7,7 +7,10 @@
*/
var oc_debug;
var oc_webroot;
-var oc_requesttoken;
+
+var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
+var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
+
if (typeof oc_webroot === "undefined") {
oc_webroot = location.pathname.substr(0, location.pathname.lastIndexOf('/'));
}
@@ -223,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) {
@@ -349,10 +356,10 @@ OC.Notification={
},
show: function(text) {
if(($('#notification').filter('span.undo').length == 1) || OC.Notification.isHidden()){
- $('#notification').html(text);
+ $('#notification').text(text);
$('#notification').fadeIn().css("display","inline");
}else{
- OC.Notification.queuedNotifications.push($(text).html());
+ OC.Notification.queuedNotifications.push($('<div/>').text(text).html());
}
},
isHidden: function() {