summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-21 14:28:54 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-21 14:28:54 +0200
commit8fcffae1e2448cfa04297aa028801db5a00e6073 (patch)
tree912a3febb07ddfc2ddb531f54e7749a8ee91b713
parent539cecbd63571720b0adecb9a7742ed2dd45af1f (diff)
downloadnextcloud-server-8fcffae1e2448cfa04297aa028801db5a00e6073.tar.gz
nextcloud-server-8fcffae1e2448cfa04297aa028801db5a00e6073.zip
Reuse selector
-rw-r--r--core/js/js.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/js/js.js b/core/js/js.js
index ffe3dff249b..ff6538f9824 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -397,7 +397,7 @@ var OC={
parts = queryString.replace(/\+/g, '%20').split('&');
for (var i = 0; i < parts.length; i++){
// split on first equal sign
- var part = parts[i]
+ var part = parts[i];
pos = part.indexOf('=');
if (pos >= 0) {
components = [
@@ -675,9 +675,10 @@ OC.Notification={
* @param {string} html Message to display
*/
showHtml: function(html) {
- if(($('#notification').filter('span.undo').length == 1) || OC.Notification.isHidden()){
- $('#notification').html(html);
- $('#notification').fadeIn().css("display","inline");
+ var notification = $('#notification');
+ if((notification.filter('span.undo').length == 1) || OC.Notification.isHidden()){
+ notification.html(html);
+ notification.fadeIn().css("display","inline");
}else{
OC.Notification.queuedNotifications.push(html);
}
@@ -688,9 +689,10 @@ OC.Notification={
* @param {string} text Message to display
*/
show: function(text) {
- if(($('#notification').filter('span.undo').length == 1) || OC.Notification.isHidden()){
- $('#notification').text(text);
- $('#notification').fadeIn().css("display","inline");
+ var notification = $('#notification');
+ if((notification.filter('span.undo').length == 1) || OC.Notification.isHidden()){
+ notification.text(text);
+ notification.fadeIn().css("display","inline");
}else{
OC.Notification.queuedNotifications.push($('<div/>').text(text).html());
}