Sha256: 1e98fb70a24f40115c87bd7ca07c4e9cf9b8abd325e5ab0e171a6d27e58f4624
Contents?: true
Size: 1.23 KB
Versions: 23
Compression:
Stored size: 1.23 KB
Contents
define([ 'backbone', 'backbone-mediator' ], function( Backbone ){ var IndexRouter = Backbone.Router.extend({ initialize : function(options) { this.app = options.app; }, routes : { '' : 'ecosystem', 'ecosystem' : 'ecosystem', 'dash/:id' : 'dashboard', // dashboard id 'dash/:id/expand/:mid' : 'dashboard', // dashboard id & monitor id 'dash/:id/category/:cid' : 'category' // dashboard id & child dashboard id }, category : function(id, cid) { // make sure we capture an integer value id = ( id ) ? parseInt(id) : id; cid = ( cid ) ? parseInt(cid) : cid; if (id) this.app.category(id, cid); }, dashboard : function(id, mid) { // make sure we capture an integer value id = ( id ) ? parseInt(id) : id; mid = ( mid ) ? parseInt(mid) : mid; if (id) this.app.dashboard(id, mid); }, ecosystem : function() { this.navigate('ecosystem', { replace : true }); this.app.ecosystem(); } }); return IndexRouter; });
Version data entries
23 entries across 23 versions & 1 rubygems