@@ -24,8 +24,8 @@ define(function(require){
2424 } ,
2525
2626 initEventListeners : function ( ) {
27- this . _doLazyScroll = _ . bind ( _ . throttle ( this . doLazyScroll , 250 ) , this ) ;
28- this . _onResize = _ . bind ( _ . debounce ( this . onResize , 250 ) , this ) ;
27+ this . _doLazyScroll = _ . throttle ( this . doLazyScroll , 250 ) . bind ( this ) ;
28+ this . _onResize = _ . debounce ( this . onResize , 250 ) . bind ( this ) ;
2929
3030 this . listenTo ( Origin , {
3131 'window:resize dashboard:refresh' : this . _onResize ,
@@ -77,7 +77,7 @@ define(function(require){
7777 }
7878 // we need to load one course first to check page size
7979 this . pageSize = 1 ;
80- this . resetCollection ( _ . bind ( function ( collection ) {
80+ this . resetCollection ( function ( collection ) {
8181 var containerHeight = $ ( window ) . height ( ) - this . $el . offset ( ) . top ;
8282 var containerWidth = this . $ ( '.projects-inner' ) . width ( ) ;
8383 var itemHeight = $ ( '.project-list-item' ) . outerHeight ( true ) ;
@@ -89,7 +89,7 @@ define(function(require){
8989 this . pageSize = columns * rows ;
9090 // need another reset to get the actual pageSize number of items
9191 this . resetCollection ( this . setViewToReady ) ;
92- } , this ) ) ;
92+ } . bind ( this ) ) ;
9393 } ,
9494
9595 getProjectsContainer : function ( ) {
@@ -136,15 +136,15 @@ define(function(require){
136136 sort : this . sort
137137 }
138138 } ,
139- success : _ . bind ( function ( collection , response ) {
139+ success : function ( collection , response ) {
140140 this . isCollectionFetching = false ;
141141 this . fetchCount += response . length ;
142142 // stop further fetching if this is the last page
143143 if ( response . length < this . pageSize ) this . shouldStopFetches = true ;
144144
145145 this . $ ( '.no-projects' ) . toggleClass ( 'display-none' , this . fetchCount > 0 ) ;
146146 if ( typeof cb === 'function' ) cb ( collection ) ;
147- } , this )
147+ } . bind ( this )
148148 } ) ;
149149 } ,
150150
0 commit comments