Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorjaideng123 <jaideng123@yahoo.com>2014-10-06 22:55:46 +0400
committerjaideng123 <jaideng123@yahoo.com>2014-10-06 22:55:46 +0400
commitbd24d6bebe6805b412a11df9f8bfcf67cf7af7cb (patch)
tree25e63b2b59da906e8af700214603f3a461e298a2 /app
parent2b6ac9261b0a2588614b6db0aa9a4d142c05786e (diff)
Added cucumber test for notifications dropdown
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/widgets/notifications-badge.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/widgets/notifications-badge.js b/app/assets/javascripts/widgets/notifications-badge.js
index fc2c1d3c4..6c775b9be 100644
--- a/app/assets/javascripts/widgets/notifications-badge.js
+++ b/app/assets/javascripts/widgets/notifications-badge.js
@@ -46,6 +46,7 @@
self.ajaxLoader.show();
self.badge.addClass("active");
self.dropdown.css("display", "block");
+ $('.notifications').addClass("loading");
self.getNotifications();
};
@@ -92,12 +93,14 @@
$('.notifications').perfectScrollbar();
self.ajaxLoader.hide();
isLoading = false;
+ $('.notifications').removeClass("loading");
//Infinite Scrolling
$('.notifications').scroll(function(e) {
var bottom = $('.notifications').prop('scrollHeight') - $('.notifications').height();
var currentPosition = $('.notifications').scrollTop();
+ isLoading = ($('.loading').length == 1);
if (currentPosition + 50 >= bottom && notificationsLoaded <= self.notifications.length && !isLoading) {
- isLoading = true;
+ $('.notifications').addClass("loading");
++currentPage;
self.getMoreNotifications();
}