/** * Created by IntelliJ IDEA. * User: henne * Date: 23.03.12 * Time: 00:51 * Main Javascript file */ Workspace = Backbone.Router.extend({ routes:{ "":"home", ":id":"show_room" }, home: function() { rooms.fetch(); }, show_room: function(id) { this.home(); window.roomTabsId = id; } }); $(document).ready(function() { window.rooms = new Rooms(); window.roomsView = new RoomsView({collection: rooms}); window.App = new Workspace(); Backbone.history.start() });