diff --git a/public/javascripts/widgets/alert.js b/public/javascripts/widgets/alert.js index 30a7e1715..f05f5e9a1 100644 --- a/public/javascripts/widgets/alert.js +++ b/public/javascripts/widgets/alert.js @@ -4,27 +4,27 @@ this.faceboxTemplate = '
' + Diaspora.widgets.i18n.t("videos.unknown") + ' - {{host}}
'); }; diff --git a/public/javascripts/widgets/flashes.js b/public/javascripts/widgets/flashes.js index ad052f6b8..30b2cce78 100644 --- a/public/javascripts/widgets/flashes.js +++ b/public/javascripts/widgets/flashes.js @@ -17,10 +17,10 @@ this.render = function(result) { $("", { - id: (result.success) ? "flash_notice" : "flash_error" + id: (result.success) ? "flash_notice" : "flash_error" }) - .prependTo(document.body) - .html(result.notice); + .prependTo(document.body) + .html(result.notice); self.animateMessages(); }; diff --git a/public/javascripts/widgets/i18n.js b/public/javascripts/widgets/i18n.js index 6335d0007..a01ea2fcf 100644 --- a/public/javascripts/widgets/i18n.js +++ b/public/javascripts/widgets/i18n.js @@ -15,16 +15,16 @@ this.t = function(item, views) { var translatedMessage, - items = item.split("."); + items = item.split("."); while(nextNamespace = items.shift()) { - translatedMessage = (translatedMessage) - ? translatedMessage[nextNamespace] - : self.locale[nextNamespace]; + translatedMessage = (translatedMessage) + ? translatedMessage[nextNamespace] + : self.locale[nextNamespace]; - if(typeof translatedMessage === "undefined") { - return ""; - } + if(typeof translatedMessage === "undefined") { + return ""; + } } return $.mustache(translatedMessage, views || { }); diff --git a/public/javascripts/widgets/infinite-scroll.js b/public/javascripts/widgets/infinite-scroll.js index 82bedbfff..86e0548c7 100644 --- a/public/javascripts/widgets/infinite-scroll.js +++ b/public/javascripts/widgets/infinite-scroll.js @@ -11,9 +11,9 @@ nextSelector : ".paginate", itemSelector : ".stream_element", pathParse : function( pathStr, nextPage ){ - var newPath = pathStr.replace("?", "?only_posts=true&"); - var last_time = $('#main_stream .stream_element').last().find('.time').attr('integer'); - return newPath.replace( /max_time=\d+/, 'max_time=' + last_time); + var newPath = pathStr.replace("?", "?only_posts=true&"), + lastTime = $('#main_stream .stream_element').last().find('.time').attr('integer'); + return newPath.replace( /max_time=\d+/, 'max_time=' + lastTime); }, bufferPx: 500, debug: false, @@ -34,16 +34,16 @@ this.initialize = function() { if($('#main_stream').length !== 0){ - $('#main_stream').infinitescroll(this.options, function() { - Diaspora.widgets.publish("stream/scrolled"); - }); + $('#main_stream').infinitescroll(this.options, function() { + Diaspora.widgets.publish("stream/scrolled"); + }); } else if($('#people_stream.contacts').length !== 0){ - $("#people_stream.contacts").infinitescroll($.extend(self.options, { - navSelector : ".pagination", - nextSelector : ".next_page", - }), function() { - Diaspora.widgets.publish("stream/scrolled"); - }); + $("#people_stream.contacts").infinitescroll($.extend(self.options, { + navSelector : ".pagination", + nextSelector : ".next_page", + }), function() { + Diaspora.widgets.publish("stream/scrolled"); + }); } }; diff --git a/public/javascripts/widgets/notifications-badge.js b/public/javascripts/widgets/notifications-badge.js index 54a69a31a..b614dd24f 100644 --- a/public/javascripts/widgets/notifications-badge.js +++ b/public/javascripts/widgets/notifications-badge.js @@ -11,7 +11,7 @@ self.ajaxLoader = self.dropdown.find(".ajax_loader"); self.badgeLink.toggle(function(evt) { - evt.preventDefault(); + evt.preventDefault(); evt.stopPropagation(); self.ajaxLoader.show(); diff --git a/public/javascripts/widgets/notifications.js b/public/javascripts/widgets/notifications.js index 3b63dde72..48c224bbc 100644 --- a/public/javascripts/widgets/notifications.js +++ b/public/javascripts/widgets/notifications.js @@ -36,14 +36,14 @@ this.showNotification = function(notification) { $(notification.html).prependTo(this.notificationArea) - .fadeIn(200) - .delay(8000) - .fadeOut(200, function() { - $(this).detach(); - }); + .fadeIn(200) + .delay(8000) + .fadeOut(200, function() { + $(this).detach(); + }); if(typeof notification.incrementCount === "undefined" || notification.incrementCount) { - this.incrementCount(); + this.incrementCount(); } }; @@ -51,18 +51,18 @@ this.count += change; if(this.badge.text() !== "") { - this.badge.text(this.count); - if(this.on_index_page) - this.index_badge.text(this.count + " "); + this.badge.text(this.count); + if(this.onIndexPage) + this.indexBadge.text(this.count + " "); - if(this.count === 0) { - this.badge.addClass("hidden"); - if(this.on_index_page) - this.index_badge.removeClass('unread'); - } - else if(this.count === 1) { - this.badge.removeClass("hidden"); - } + if(this.count === 0) { + this.badge.addClass("hidden"); + if(this.onIndexPage) + this.indexBadge.removeClass('unread'); + } + else if(this.count === 1) { + this.badge.removeClass("hidden"); + } } }; diff --git a/public/javascripts/widgets/post.js b/public/javascripts/widgets/post.js index d8ca300b8..b5dbd8463 100644 --- a/public/javascripts/widgets/post.js +++ b/public/javascripts/widgets/post.js @@ -33,13 +33,13 @@ this.expandLikes = function(evt){ evt.preventDefault(); var likesList = $(this).siblings(".likes_list"); - if(likesList.children().length == 0){ + if(likesList.children().length == 0) { likesList.append("
");
$.ajax({
url: this.href,
success: function(data){
likesList.html(data)
- .fadeToggle(100);
+ .fadeToggle(100);
}
});
}
diff --git a/public/javascripts/widgets/timeago.js b/public/javascripts/widgets/timeago.js
index b16079b0d..cbd7ed2f4 100644
--- a/public/javascripts/widgets/timeago.js
+++ b/public/javascripts/widgets/timeago.js
@@ -12,9 +12,9 @@
self.updateTimeAgo();
if(Diaspora.widgets.i18n.language !== "en") {
- $.each($.timeago.settings.strings, function(index) {
- $.timeago.settings.strings[index] = Diaspora.widgets.i18n.t("timeago." + index);
- });
+ $.each($.timeago.settings.strings, function(index) {
+ $.timeago.settings.strings[index] = Diaspora.widgets.i18n.t("timeago." + index);
+ });
}
});