removed title region,

started adding support for a global tool bar.
This commit is contained in:
Keivan Beigi 2013-04-23 18:55:29 -07:00
commit 3638d85314
12 changed files with 79 additions and 40 deletions

View file

@ -0,0 +1,7 @@
"use strict";
define(['app', 'Shared/Toolbar/CommandModel'], function () {
NzbDrone.Shared.Toolbar.CommandCollection = Backbone.Collection.extend({
model: NzbDrone.Shared.Toolbar.CommandModel
});
});

View file

@ -0,0 +1,17 @@
"use strict";
define(['app'], function () {
NzbDrone.Shared.Toolbar.CommandTypes =
{
RouteTrigger: 'RouteTrigger'
};
NzbDrone.Shared.Toolbar.CommandModel = Backbone.Model.extend({
defaults: {
'target' : '/nzbdrone/route',
'title' : 'Title Goes Here',
'alignment': 'left',
'tooltip' : undefined
}
});
});

View file

@ -1,12 +0,0 @@
"use strict";
define(['app'], function () {
NzbDrone.Shared.Toolbar.ToolbarModel = Backbone.Model.extend({
defaults: {
"route" : '/nzbdrone/route',
"title" : 'Title Goes Here',
"tooltip": undefined
}
});
});

View file

@ -1,12 +0,0 @@
"use strict";
define(['app'], function () {
NzbDrone.Shared.Toolbar.ToolbarModel = Backbone.Model.extend({
defaults: {
"route" : '/nzbdrone/route',
"title" : 'Title Goes Here',
"tooltip": undefined
}
});
});

View file

@ -0,0 +1,18 @@
 <div class="btn-group">
{{#commands}}
<a class="btn" href="{{target}}" data-target="0">
<i class="{{icon}}"/>
{{title}}
</a>
{{/commands}}
</div>
<div class="pull-right">
<div class="btn-group">
<a class="btn x-series-change-view x-series-show-table" href="#" title="Table" data-target="0"><i class="icon-table"></i></a>
<a class="btn x-series-change-view x-series-show-list" href="#" title="List" data-target="1"><i class="icon-list"></i></a>
</div>
</div>
<!--replace this with padding-->
<br/>
<br/>

View file

@ -1,14 +1,18 @@
"use strict";
define(['app'], function () {
define(['app', 'Shared/Toolbar/CommandCollection'], function () {
NzbDrone.Shared.Toolbar.ToolbarView = Backbone.Marionette.ItemView.extend({
template: 'Template',
template: 'Shared/Toolbar/ToolbarTemplate',
events: {
initialize: function () {
if (!this.collection) {
throw 'CommandCollection needs to be provided';
}
this.model = new Backbone.Model();
this.model.set('commands', this.collection.toJSON());
}
});
});