From aa84b4cafa25e53633900b37828e81e741e8e039 Mon Sep 17 00:00:00 2001 From: hamza zia Date: Sat, 16 Mar 2013 14:33:10 +0100 Subject: [PATCH] rename variables in angular --- js/ctrls/alert.js | 1 - js/ctrls/download.js | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/js/ctrls/alert.js b/js/ctrls/alert.js index 230345b..e3ced7b 100644 --- a/js/ctrls/alert.js +++ b/js/ctrls/alert.js @@ -21,5 +21,4 @@ angular.module('webui.ctrls.alert', [ scope.$digest(); }); - }]); diff --git a/js/ctrls/download.js b/js/ctrls/download.js index a05fd4c..414ecb7 100644 --- a/js/ctrls/download.js +++ b/js/ctrls/download.js @@ -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;