From eacd5fd5f7f47791ddc2e5568b8e4622420d8562 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Thu, 16 Oct 2014 11:53:56 +0200 Subject: #96 Mail searches are now paginated, the pages number start at 1 now --- web-ui/app/js/services/mail_service.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web-ui/app/js/services') diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js index 2e877a2c..b773bd8b 100644 --- a/web-ui/app/js/services/mail_service.js +++ b/web-ui/app/js/services/mail_service.js @@ -38,8 +38,8 @@ define( singleMailResource: '/mail', currentTag: '', lastQuery: '', - currentPage: 0, - numPages: 0, + currentPage: 1, + numPages: 1, w: 25 }); @@ -150,7 +150,7 @@ define( this.fetchByTag = function (ev, data) { this.attr.currentTag = data.tag; - this.updateCurrentPageNumber(0); + this.updateCurrentPageNumber(1); this.fetchMail(compileQuery(data), this.attr.currentTag, false, data); }; @@ -223,7 +223,7 @@ define( }; this.previousPage = function () { - if (this.attr.currentPage > 0) { + if (this.attr.currentPage > 1) { this.updateCurrentPageNumber(this.attr.currentPage - 1); this.refreshResults(); } -- cgit v1.2.3