@@ -222,6 +222,7 @@ module.exports = Backbone.Router.extend({
222222 options . viewArgs = options . viewArgs . length ? options . viewArgs : [ options . viewArgs ] ;
223223
224224 this . cleanup ( ) ;
225+ window . obEventBus . trigger ( 'setAddressBar' , options . addressBarText ) ;
225226
226227 $ ( 'body' ) . attr ( 'id' , options . bodyID ) ;
227228 $ ( 'body' ) . attr ( 'class' , options . bodyClass ) ;
@@ -267,22 +268,21 @@ module.exports = Backbone.Router.extend({
267268 this . $obContainer [ 0 ] . scrollTop = this . view . __cachedScrollPos || 0 ;
268269 }
269270
270- if ( this . view . __cachedAddressBarText ) {
271- // ensure our address bar text reflects the state of the cached view
272- window . obEventBus . trigger ( 'setAddressBar' , { 'addressText' : this . view . __cachedAddressBarText } ) ;
273- } else {
274- window . obEventBus . trigger ( 'setAddressBar' , options . addressBarText ) ;
275- }
271+ // if (this.view.__cachedAddressBarText) {
272+ // // ensure our address bar text reflects the state of the cached view
273+ // window.obEventBus.trigger('setAddressBar', {'addressText': this.view.__cachedAddressBarText});
274+ // } else {
275+ // window.obEventBus.trigger('setAddressBar', options.addressBarText);
276+ // }
276277
277278 this . trigger ( 'cache-reattach' , {
278279 view : this . view ,
279- requestedRoute : requestedRoute ,
280- cachedRoute : Backbone . history . getFragment ( )
280+ route : requestedRoute
281281 } ) ;
282282 } else {
283283 this . view = new ( Function . prototype . bind . apply ( View , [ null ] . concat ( options . viewArgs ) ) ) ;
284- // clear address bar. Must happen after we set out view above.
285- window . obEventBus . trigger ( 'setAddressBar' , options . addressBarText ) ;
284+ // // clear address bar. Must happen after we set out view above.
285+ // window.obEventBus.trigger('setAddressBar', options.addressBarText);
286286 $ ( '#content' ) . html ( this . view . $el ) ;
287287 this . $obContainer [ 0 ] . scrollTop = 0 ;
288288
0 commit comments