Skip to content

Instantly share code, notes, and snippets.

@curtislacy
Created November 29, 2012 14:05
Show Gist options
  • Save curtislacy/4169298 to your computer and use it in GitHub Desktop.
Save curtislacy/4169298 to your computer and use it in GitHub Desktop.
Dead-Simple output of translated documents
function DocumentCacheService() {
var self = this;
EventService.on( 'document::translated', function( data ) {
/////////// This is the line you have to add. ////////////////
console.log( data );
/////////// That's all. ////////////////
self.addDocument( data );
});
EventService.on( 'account::remove', function( data ) {
self.removeAccount( data.owner, data.accountId );
} );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment