mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
broken
This commit is contained in:
parent
0916c8b8d1
commit
24c77b4047
29 changed files with 610 additions and 517 deletions
|
@ -32,4 +32,6 @@ define(['app'], function () {
|
|||
|
||||
return date.format('{MM}/{dd}/{yyyy}');
|
||||
};
|
||||
|
||||
return NzbDrone.Shared.FormatHelpers;
|
||||
});
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
define(['app'], function () {
|
||||
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Shared/SpinnerTemplate',
|
||||
className: 'nz-spinner row'
|
||||
define(
|
||||
[
|
||||
'app'
|
||||
], function () {
|
||||
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Shared/SpinnerTemplate',
|
||||
className: 'nz-spinner row'
|
||||
});
|
||||
|
||||
return NzbDrone.Shared.SpinnerView;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
define(['app','handlebars'], function (App,Handlebars) {
|
||||
define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
|
||||
Handlebars.registerHelper('partial', function (templateName) {
|
||||
//TODO: We should be able to pass in the context, either an object or a property
|
||||
|
||||
|
|
|
@ -1,34 +1,39 @@
|
|||
"use strict";
|
||||
define(['app', 'Shared/Toolbar/Radio/RadioButtonView', 'Config'], function () {
|
||||
NzbDrone.Shared.Toolbar.RadioButtonCollectionView = Backbone.Marionette.CollectionView.extend({
|
||||
className: 'btn-group',
|
||||
itemView : NzbDrone.Shared.Toolbar.RadioButtonView,
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'Shared/Toolbar/Radio/RadioButtonView',
|
||||
'Config'
|
||||
], function (App, RadioButtonView, Config) {
|
||||
NzbDrone.Shared.Toolbar.RadioButtonCollectionView = Backbone.Marionette.CollectionView.extend({
|
||||
className: 'btn-group',
|
||||
itemView : NzbDrone.Shared.Toolbar.RadioButtonView,
|
||||
|
||||
attributes: {
|
||||
'data-toggle': 'buttons-radio'
|
||||
},
|
||||
attributes: {
|
||||
'data-toggle': 'buttons-radio'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.menu = options.menu;
|
||||
initialize: function (options) {
|
||||
this.menu = options.menu;
|
||||
|
||||
if (this.menu.storeState) {
|
||||
this.setActive();
|
||||
if (this.menu.storeState) {
|
||||
this.setActive();
|
||||
}
|
||||
},
|
||||
|
||||
setActive: function () {
|
||||
var storedKey = Config.GetValue(this.menu.menuKey, this.menu.defaultAction);
|
||||
|
||||
this.collection.each(function (model) {
|
||||
if (model.get('key').toLocaleLowerCase() === storedKey.toLowerCase()) {
|
||||
model.set('active', true);
|
||||
}
|
||||
else {
|
||||
model.set('active, false');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
setActive: function () {
|
||||
var storedKey = NzbDrone.Config.GetValue(this.menu.menuKey, this.menu.defaultAction);
|
||||
|
||||
this.collection.each(function (model) {
|
||||
if (model.get('key').toLocaleLowerCase() === storedKey.toLowerCase()) {
|
||||
model.set('active', true);
|
||||
}
|
||||
else {
|
||||
model.set('active, false');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue