Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Hiding first and last in pagination controller
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
Something went wrong with that request. Please try again.