summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-06 10:41:07 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-06 10:41:07 +0100
commita867b36e7f99c648252ba2a1c04888ba21c1405f (patch)
treeccdd2290237774a050c29ea592ecbf64d3e68ff9 /core/js
parent6806484c1632a6be51dfc536fd9285dfb1ad7359 (diff)
downloadnextcloud-server-a867b36e7f99c648252ba2a1c04888ba21c1405f.tar.gz
nextcloud-server-a867b36e7f99c648252ba2a1c04888ba21c1405f.zip
js optimisations and style fixes
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 4e35547c058..710ef416b69 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -37,14 +37,14 @@ function t(app,text, vars){
t.cache[app] = [];
}
}
- var _build = function(text, vars) {
- return text.replace(/{([^{}]*)}/g,
- function (a, b) {
- var r = vars[b];
- return typeof r === 'string' || typeof r === 'number' ? r : a;
- }
- );
- }
+ var _build = function (text, vars) {
+ return text.replace(/{([^{}]*)}/g,
+ function (a, b) {
+ var r = vars[b];
+ return typeof r === 'string' || typeof r === 'number' ? r : a;
+ }
+ );
+ };
if( typeof( t.cache[app][text] ) !== 'undefined' ){
if(typeof vars === 'object') {
return _build(t.cache[app][text], vars);
@@ -247,7 +247,6 @@ var OC={
var popup = $('#appsettings_popup');
if(popup.length == 0) {
$('body').prepend('<div class="popup hidden" id="appsettings_popup"></div>');
- popup = $('#appsettings_popup');
popup.addClass(settings.hasClass('topright') ? 'topright' : 'bottomleft');
}
if(popup.is(':visible')) {
@@ -308,14 +307,16 @@ OC.Notification={
});
},
showHtml: function(html) {
- $('#notification').hide();
- $('#notification').html(html);
- $('#notification').fadeIn();
+ var notification = $('#notification');
+ notification.hide();
+ notification.html(html);
+ notification.fadeIn();
},
show: function(text) {
- $('#notification').hide();
- $('#notification').text(text);
- $('#notification').fadeIn();
+ var notification = $('#notification');
+ notification.hide();
+ notification.text(text);
+ notification.fadeIn();
}
};