isFirst: true, | |
isLast: false, | |
prevPage: function() { | |
GWVideoApp.VideosController.set('currentPage', this.currentPage - 1); | |
}, | |
nextPage: function() { | |
GWVideoApp.VideosController.set('currentPage', this.currentPage + 1); | |
}, | |
currentPage: 1, | |
onCurrentPageChange: function() { | |
this.params.page = this.currentPage; | |
this.getPage(this.params); | |
GWVideoApp.VideosController.set('isFirst', false); | |
GWVideoApp.VideosController.set('isLast', false); | |
if (this.currentPage == 1) { | |
GWVideoApp.VideosController.set('isFirst', true); | |
} | |
if (this.currentPage == this.pages) { | |
GWVideoApp.VideosController.set('isLast', true) | |
} | |
}.observes('currentPage'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment