Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
// Init menu
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'books');
// Init books
this.booksModule = Mem.set('books', BooksModule);
this.booksModule.showList(this.container.getBooksContainer());
//Init comments
this.commentsModule = Mem.set('comments', CommentsModule);
},
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
// Init menu
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'books');
// Init books
this.booksModule = Mem.set('books', BooksModule);
this.booksModule.showList(this.container.getBooksContainer());
//Init comments
this.commentsModule = Mem.set('comments', CommentsModule);
},
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
// Init menu
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'books');
// Init books
this.booksModule = Mem.set('books', BooksModule);
this.booksModule.showList(this.container.getBooksContainer());
//Init comments
this.commentsModule = Mem.set('comments', CommentsModule);
},
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'authors');
},
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'authors');
},
onBeforeRoute: function() {
// Init main module container
this.container = Mem.set('container', View, {
container: $('#wrap')
});
// Init menu
this.menuModule = Mem.set('menu', MenuModule);
this.menuModule.showMenu(this.container.getMenuContainer(), 'books');
// Init books
this.booksModule = Mem.set('books', BooksModule);
this.booksModule.showList(this.container.getBooksContainer());
//Init comments
this.commentsModule = Mem.set('comments', CommentsModule);
},
showList: function(container) {
//Mock.mock();
this.collection = Mem.set('booksCollection', Collection);
this.collectionView = Mem.set('booksListView', BooksView, {
container: container,
collection: this.collection
});
if (!this.collection.length) {
this.collection.fetch({
success: _.bind(function() {
this.collectionView.render();
}, this)
});
}
//Mock.respond();
},
showMenu: function(container, active) {
this.view = Mem.set('menuView', View, {
container: container,
active: active
});
}
});
showBook: function(container, id) {
//Mock.mock();
this.model = Mem.set('bookDetailsModel', Model, {id: id});
this.bookView = Mem.set('bookDetailsView', BookView, {
container: container,
model: this.model,
isDetails: true
});
if (!this.model.isSynced()) {
this.model.fetch({
success: _.bind(function() {
this.bookView.render();
}, this)
});
}
//Mock.respond();
showList: function(container) {
//Mock.mock();
this.collection = Mem.set('booksCollection', Collection);
this.collectionView = Mem.set('booksListView', BooksView, {
container: container,
collection: this.collection
});
if (!this.collection.length) {
this.collection.fetch({
success: _.bind(function() {
this.collectionView.render();
}, this)
});
}
//Mock.respond();
},