Sha256: 3c16a8ecc82ac9d80c1b61959d125390171a4ff1e8ae2c9604c3dcf7264f2b77
Contents?: true
Size: 916 Bytes
Versions: 23
Compression:
Stored size: 916 Bytes
Contents
define( [ 'jquery', 'underscore', 'backbone', 'model/dashboard' ], function( $, _, Backbone, DashboardModel ) { /** * DashboardCollection * * Route that pulls back all available dashboards. **/ var DashboardCollection = Backbone.Collection.extend({ model : DashboardModel, url : '/dashboards.json', comparator : function(dashboard) { return dashboard.get('name').toLowerCase(); }, initialize : function(models, options) { if (options) this.cb = options.cb; this.fetch({ success : function() { if ( this.cb ) this.cb(); Backbone.Mediator.pub('collection:dashboard:init', this); }.bind(this), async : false }); } }); return DashboardCollection; });
Version data entries
23 entries across 23 versions & 1 rubygems