fix infinitescroll when list is not long enough to fill the screen

This commit is contained in:
Athou
2013-03-28 15:10:55 +01:00
parent 79740937b9
commit b1e9be765b
5 changed files with 43 additions and 45 deletions

View File

@@ -93,7 +93,6 @@ module.directive('category', function($compile) {
};
$scope.toggleCategory = function(category) {
console.log(category.expanded)
SubscriptionService.collapse({
id : category.id,
collapse : !category.expanded
@@ -111,17 +110,17 @@ module.directive('toolbar', function($routeParams, $route, SettingsService,
replace : true,
templateUrl : 'directives/toolbar.html',
controller : function($scope, $route, $http, SettingsService) {
function totalActiveAjaxRequests() {
return ($http.pendingRequests.length + $.active);
}
$scope.loading = true;
$scope.$watch(totalActiveAjaxRequests, function () {
$scope.$watch(totalActiveAjaxRequests, function() {
$scope.loading = !(totalActiveAjaxRequests() === 0);
});
$scope.settings = SettingsService.settings;
});
$scope.settingsService = SettingsService;
$scope.refresh = function() {
$route.reload();
};