Be more specific as to what we're listening for.

This commit is contained in:
George Stephanis 2015-08-10 18:21:49 -04:00
parent 8dc2126718
commit a8b1cabc0b
1 changed files with 2 additions and 2 deletions

View File

@ -77,9 +77,9 @@
initialize : function() {
this.per_page = 3;
this.qty_pages = Math.ceil( $.map( this.model.get( 'rates' ), function(v){return [v]} ).length / this.per_page );
this.listenTo( this.model, 'change', this.setUnloadConfirmation );
// this.listenTo( this.model, 'saved', this.clearUnloadConfirmation );
$(window).on( 'beforeunload', { view : this }, this.unloadConfirmation );
this.listenTo( this.model, 'change:rates', this.setUnloadConfirmation );
// this.listenTo( this.model, 'saved:rates', this.clearUnloadConfirmation );
$tbody.on( 'change', { view : this }, this.updateModelOnChange );
},
setUnloadConfirmation : function() {