Sanitize the pagination for scope on load.

This commit is contained in:
George Stephanis 2015-08-12 14:17:50 -04:00
parent 4aedda5eb8
commit e9f0325ac1
1 changed files with 2 additions and 0 deletions

View File

@ -83,6 +83,8 @@
},
initialize : function() {
this.qty_pages = Math.ceil( $.map( this.model.get( 'rates' ), function(v){return [v]} ).length / this.per_page );
this.page = this.sanitizePage( data.page );
this.listenTo( this.model, 'change:rates', this.setUnloadConfirmation );
// this.listenTo( this.model, 'saved:rates', this.clearUnloadConfirmation );
$tbody.on( 'change', { view : this }, this.updateModelOnChange );