| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | define(function(require) { |
||
| 2 | 'use strict'; |
||
| 3 | |||
| 4 | var WidgetsCollection; |
||
| 5 | var _ = require('underscore'); |
||
| 6 | var Backbone = require('backbone'); |
||
| 7 | var WidgetContainerModel = require('./model'); |
||
| 8 | |||
| 9 | WidgetsCollection = Backbone.Collection.extend({ |
||
| 10 | model: WidgetContainerModel, |
||
| 11 | |||
| 12 | comparator: 'position', |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @inheritDoc |
||
| 16 | */ |
||
| 17 | constructor: function WidgetsCollection() { |
||
| 18 | WidgetsCollection.__super__.constructor.apply(this, arguments); |
||
| 19 | }, |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @inheritDoc |
||
| 23 | */ |
||
| 24 | initialize: function(data, options) { |
||
| 25 | _.extend(this, _.pick(options, ['url'])); |
||
| 26 | WidgetsCollection.__super__.initialize.apply(this, arguments); |
||
| 27 | } |
||
| 28 | }); |
||
| 29 | |||
| 30 | return WidgetsCollection; |
||
| 31 | }); |
||
| 32 |