Skip to content

Instantly share code, notes, and snippets.

@thomaslang
Created September 4, 2009 14:41
Show Gist options
  • Save thomaslang/180922 to your computer and use it in GitHub Desktop.
Save thomaslang/180922 to your computer and use it in GitHub Desktop.
/////////////////////////////////////////////////////
// state transformers
//
goStateVdatabase: function(){
if (this.activeB) this.activeB.disconnect();
this.databaseB.connect().sync();
this.activeB = this.databaseB;
this.viewController.set('tabSelection', 'database');
},
goStateVbooks: function(){
if (this.activeB) this.activeB.disconnect();
this.booksB.connect().sync();
this.activeB = this.booksB;
this.viewController.set('tabSelection', 'books');
},
/////////////////////////////////////////////////////
// bindings to BB.sourceListController
//
activeB: null,
databaseB: SC.Binding.from("BB.activeConcepts").to("BB.sourceListController.content"),
booksB: SC.Binding.from("BB.booksSource").to("BB.sourceListController.content"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment