rename variables in angular

This commit is contained in:
hamza zia 2013-03-16 14:33:10 +01:00
parent dd76756d26
commit aa84b4cafa
2 changed files with 3 additions and 6 deletions

View File

@ -21,5 +21,4 @@ angular.module('webui.ctrls.alert', [
scope.$digest();
});
}]);

View File

@ -74,9 +74,7 @@ function(
// current displayed page
scope.currentPage = 1;
// the number of page controls displayed, i.e for 3 it will show
// x - 1 | x | x + 1
scope.maxPageControls = 3;
scope.pageControlRadius = 3;
// total number of downloads, updates dynamically as downloads are
// stored in scope
@ -107,11 +105,11 @@ function(
// get the pages to be displayed
scope.getPages = function() {
var minPage = scope.currentPage - scope.maxPageControls;
var minPage = scope.currentPage - scope.pageControlRadius;
if (minPage < 1) minPage = 1;
var maxPage = scope.currentPage + scope.maxPageControls;
var maxPage = scope.currentPage + scope.pageControlRadius;
if (maxPage > scope.totalPages)
maxPage = scope.totalPages;