mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
removed title region,
started adding support for a global tool bar.
This commit is contained in:
parent
a8e76b3251
commit
3638d85314
12 changed files with 79 additions and 40 deletions
7
UI/Shared/Toolbar/CommandCollection.js
Normal file
7
UI/Shared/Toolbar/CommandCollection.js
Normal 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
|
||||
});
|
||||
});
|
||||
|
17
UI/Shared/Toolbar/CommandModel.js
Normal file
17
UI/Shared/Toolbar/CommandModel.js
Normal 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
|
||||
}
|
||||
});
|
||||
});
|
|
@ -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
|
||||
}
|
||||
});
|
||||
});
|
|
@ -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
|
||||
}
|
||||
});
|
||||
});
|
18
UI/Shared/Toolbar/ToolbarTemplate.html
Normal file
18
UI/Shared/Toolbar/ToolbarTemplate.html
Normal 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/>
|
|
@ -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());
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue