mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
removed NzbDrone. namespace, everything is done using require.
This commit is contained in:
parent
ef62af75df
commit
b0bd3f34f1
121 changed files with 2570 additions and 2587 deletions
|
@ -1,48 +1,52 @@
|
|||
'use strict';
|
||||
define(['app', 'Config'], function () {
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'Config'
|
||||
], function (Marionette, Config) {
|
||||
|
||||
NzbDrone.Shared.Toolbar.RadioButtonView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Shared/Toolbar/ButtonTemplate',
|
||||
className: 'btn',
|
||||
return Marionette.ItemView.extend({
|
||||
template : 'Shared/Toolbar/ButtonTemplate',
|
||||
className: 'btn',
|
||||
|
||||
events: {
|
||||
'click': 'onClick'
|
||||
},
|
||||
events: {
|
||||
'click': 'onClick'
|
||||
},
|
||||
|
||||
|
||||
initialize: function () {
|
||||
initialize: function () {
|
||||
|
||||
this.storageKey = this.model.get('menuKey') + ':' + this.model.get('key');
|
||||
},
|
||||
this.storageKey = this.model.get('menuKey') + ':' + this.model.get('key');
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
if (this.model.get('active')) {
|
||||
this.$el.addClass('active');
|
||||
onRender: function () {
|
||||
if (this.model.get('active')) {
|
||||
this.$el.addClass('active');
|
||||
this.invokeCallback();
|
||||
}
|
||||
},
|
||||
|
||||
onClick: function () {
|
||||
|
||||
Config.SetValue(this.model.get('menuKey'), this.model.get('key'));
|
||||
this.invokeCallback();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
onClick: function () {
|
||||
invokeCallback: function () {
|
||||
|
||||
NzbDrone.Config.SetValue(this.model.get('menuKey'), this.model.get('key'));
|
||||
this.invokeCallback();
|
||||
},
|
||||
if (!this.model.ownerContext) {
|
||||
throw 'ownerContext must be set.';
|
||||
}
|
||||
|
||||
invokeCallback: function () {
|
||||
|
||||
if (!this.model.ownerContext) {
|
||||
throw 'ownerContext must be set.';
|
||||
var callback = this.model.get('callback');
|
||||
if (callback) {
|
||||
callback.call(this.model.ownerContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var callback = this.model.get('callback');
|
||||
if (callback) {
|
||||
callback.call(this.model.ownerContext);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue