From e0547a25ab9c5a3d9454611f72e00e3bc667e2d2 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 3 May 2013 00:15:28 +0200 Subject: if rename of file fails, the rename is undone in the view - #fix 2820 Changes: * OC.dialog -> OC.Notification * Added test * Fixed OC.Notification.show() issue for queued items * Highlight failed item and show notification --- core/js/js.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 3cb4d3dd151..55db625a339 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -349,10 +349,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($('
').text(text).html()); } }, isHidden: function() { -- cgit v1.2.3 From e6c1db7a3f6d7ec35a1d55e5575e3e09d24bbbf8 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 26 Jun 2013 11:23:21 +0200 Subject: move javascript variables 'oc_current_user' and 'oc_requesttoken' to js.js - fixes #3853 --- core/js/config.php | 2 -- core/js/js.js | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/config.php b/core/js/config.php index 53a8fb96388..dd46f7889d1 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -26,8 +26,6 @@ $array = array( "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', "oc_webroot" => "\"".OC::$WEBROOT."\"", "oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution - "oc_current_user" => "document.getElementsByTagName('head')[0].getAttribute('data-user')", - "oc_requesttoken" => "document.getElementsByTagName('head')[0].getAttribute('data-requesttoken')", "datepickerFormatDate" => json_encode($l->l('jsdate', 'jsdate')), "dayNames" => json_encode( array( diff --git a/core/js/js.js b/core/js/js.js index 3cb4d3dd151..08b429a555b 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('/')); } -- cgit v1.2.3 From 16e5a1b10025c84465caf93458c40efb8a6aa87d Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 2 Jul 2013 18:44:10 +0300 Subject: Fix lazy styles loading in IE8 --- core/js/js.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/js/js.js') 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=$(''); - $('head').append(style); + if (document.createStyleSheet) { + document.createStyleSheet(path); + } else { + style=$(''); + $('head').append(style); + } } }, basename: function(path) { -- cgit v1.2.3