2013-04-18 00:48:52 +00:00
|
|
|
"use strict";
|
2013-04-24 01:55:29 +00:00
|
|
|
define(['app', 'Shared/Toolbar/CommandCollection'], function () {
|
2013-04-18 00:48:52 +00:00
|
|
|
|
|
|
|
NzbDrone.Shared.Toolbar.ToolbarView = Backbone.Marionette.ItemView.extend({
|
2013-04-24 01:55:29 +00:00
|
|
|
template: 'Shared/Toolbar/ToolbarTemplate',
|
2013-04-18 00:48:52 +00:00
|
|
|
|
2013-04-24 01:55:29 +00:00
|
|
|
initialize: function () {
|
|
|
|
if (!this.collection) {
|
|
|
|
throw 'CommandCollection needs to be provided';
|
|
|
|
}
|
2013-04-18 00:48:52 +00:00
|
|
|
|
2013-04-24 01:55:29 +00:00
|
|
|
this.model = new Backbone.Model();
|
|
|
|
this.model.set('commands', this.collection.toJSON());
|
2013-04-18 00:48:52 +00:00
|
|
|
|
2013-04-24 01:55:29 +00:00
|
|
|
}
|
2013-04-18 00:48:52 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|