From 4744992648408b89d0de0677ab4f6d06819667ed Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Tue, 15 Apr 2014 09:48:52 +0200 Subject: [PATCH] Unified pagination of newLogs with _paginationView --- .../aardvark/frontend/js/views/newLogsView.js | 41 +------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/views/newLogsView.js b/js/apps/system/aardvark/frontend/js/views/newLogsView.js index ad7a915d67..a6323e2c47 100644 --- a/js/apps/system/aardvark/frontend/js/views/newLogsView.js +++ b/js/apps/system/aardvark/frontend/js/views/newLogsView.js @@ -7,6 +7,7 @@ el: '#content', id: '#logContent', paginationDiv : "#logPaginationDiv", + idPrefix: "logTable", initialize: function () { this.convertModelToJSON(); @@ -82,45 +83,7 @@ }, rerender : function () { - this.convertModelToJSON(); - }, - - renderPagination: function () { - var self = this; - var currentPage = this.collection.getPage(); - var totalPages = this.collection.getLastPageNumber(); - var target = $('#logPaginationDiv'), - options = { - page: currentPage, - lastPage: totalPages, - click: function(i) { - if (i === 1 && i !== currentPage) { - self.collection.setPage(1); - } - else if (i === totalPages && i !== currentPage) { - self.collection.setPage(totalPages); - } - else if (i !== currentPage) { - self.collection.setPage(i); - } - options.page = i; - self.collection.fetch({ - success: function() { - self.convertModelToJSON(); - } - }); - } - }; - target.html(""); - target.pagination(options); - $('#logPaginationDiv').prepend( - '' - ); - $('#logPaginationDiv').append( - '' - ); + this.convertModelToJSON(); } }); }());