rename variables in angular
This commit is contained in:
parent
dd76756d26
commit
aa84b4cafa
|
@ -21,5 +21,4 @@ angular.module('webui.ctrls.alert', [
|
||||||
scope.$digest();
|
scope.$digest();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -74,9 +74,7 @@ function(
|
||||||
// current displayed page
|
// current displayed page
|
||||||
scope.currentPage = 1;
|
scope.currentPage = 1;
|
||||||
|
|
||||||
// the number of page controls displayed, i.e for 3 it will show
|
scope.pageControlRadius = 3;
|
||||||
// x - 1 | x | x + 1
|
|
||||||
scope.maxPageControls = 3;
|
|
||||||
|
|
||||||
// total number of downloads, updates dynamically as downloads are
|
// total number of downloads, updates dynamically as downloads are
|
||||||
// stored in scope
|
// stored in scope
|
||||||
|
@ -107,11 +105,11 @@ function(
|
||||||
|
|
||||||
// get the pages to be displayed
|
// get the pages to be displayed
|
||||||
scope.getPages = function() {
|
scope.getPages = function() {
|
||||||
var minPage = scope.currentPage - scope.maxPageControls;
|
var minPage = scope.currentPage - scope.pageControlRadius;
|
||||||
|
|
||||||
if (minPage < 1) minPage = 1;
|
if (minPage < 1) minPage = 1;
|
||||||
|
|
||||||
var maxPage = scope.currentPage + scope.maxPageControls;
|
var maxPage = scope.currentPage + scope.pageControlRadius;
|
||||||
|
|
||||||
if (maxPage > scope.totalPages)
|
if (maxPage > scope.totalPages)
|
||||||
maxPage = scope.totalPages;
|
maxPage = scope.totalPages;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user