minor cleanup

pull/4/head
kayone 11 years ago
parent 4948d0608b
commit 9ed7546279

@ -75,7 +75,10 @@
<inspection_tool class="JSUnnecessarySemicolon" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="JSUnresolvedFunction" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSUnresolvedVariable" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JSUnusedGlobalSymbols" enabled="false" level="INFO" enabled_by_default="false" />
<inspection_tool class="JSUnusedGlobalSymbols" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myReportUnusedDefinitions" value="true" />
<option name="myReportUnusedProperties" value="true" />
</inspection_tool>
<inspection_tool class="LabeledStatementJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" />

@ -5,6 +5,7 @@
<option camelcase="true" />
<option curly="true" />
<option eqeqeq="true" />
<option es3="false" />
<option forin="true" />
<option immed="true" />
<option latedef="true" />
@ -15,7 +16,7 @@
<option plusplus="false" />
<option regexp="false" />
<option undef="true" />
<option unused="false" />
<option unused="true" />
<option strict="true" />
<option trailing="false" />
<option quotmark="single" />
@ -49,7 +50,7 @@
<option couch="false" />
<option devel="true" />
<option dojo="false" />
<option jquery="true" />
<option jquery="false" />
<option mootools="false" />
<option node="false" />
<option nonstandard="false" />
@ -63,7 +64,7 @@
<option passfail="false" />
<option white="false" />
<option maxerr="50" />
<option predef="window, define, require ,$" />
<option predef="window, define, require" />
</component>
</project>

@ -2,8 +2,9 @@
define(
[
'backbone',
'Series/SeriesModel'
], function (Backbone, SeriesModel) {
'Series/SeriesModel',
'underscore'
], function (Backbone, SeriesModel, _) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/series/lookup',
model: SeriesModel,

@ -2,9 +2,10 @@
define(
[
'backgrid',
'marionette',
'underscore',
'Settings/Quality/Profile/QualityProfileSchemaCollection',
'Series/EpisodeFileModel'
], function (Backgrid, QualityProfileSchemaCollection, EpisodeFileModel) {
], function (Backgrid, Marionette, _, QualityProfileSchemaCollection) {
return Backgrid.CellEditor.extend({
className: 'quality-cell-editor',
@ -27,7 +28,7 @@ define(
var templateName = self.template;
self.schema = qualityProfileSchemaCollection.first();
var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get("name")).quality.id });
var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get('name')).quality.id });
if (selected) {
selected.selected = true;
@ -54,9 +55,9 @@ define(
quality: quality
};
model.set(column.get("name"), newQuality);
model.set(column.get('name'), newQuality);
model.save();
model.trigger("backgrid:edited", model, column, new Backgrid.Command(e));
model.trigger('backgrid:edited', model, column, new Backgrid.Command(e));
},
close: function (e) {
@ -64,7 +65,7 @@ define(
var column = this.column;
var command = new Backgrid.Command(e);
model.trigger("backgrid:edited", model, column, command);
model.trigger('backgrid:edited', model, column, command);
}
});
});

@ -95,8 +95,6 @@ define(
},
_setMonitoredState: function () {
var monitored = this.model.get('monitored');
this.ui.monitored.removeClass('icon-spin icon-spinner');
if (this.model.get('monitored')) {

@ -1,4 +1,4 @@
'use strict';
'use strict';
define(
[
'Series/EpisodeModel',

@ -2,9 +2,10 @@
define(
[
'backbone',
'jquery',
'Series/SeriesCollection'
], function (Backbone, SeriesCollection) {
$(document).on('keydown', function (e){
], function (Backbone, $, SeriesCollection) {
$(document).on('keydown', function (e) {
if ($(e.target).is('input')) {
return;
}
@ -17,7 +18,7 @@ define(
$.fn.bindSearch = function () {
$(this).typeahead({
source : function () {
source: function () {
return SeriesCollection.pluck('title');
},

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

@ -1,9 +1,10 @@
'use strict';

'use strict';
define(
[
'backbone',
'Settings/Indexers/Model',
'Form/FormBuilder'
], function (IndexerModel) {
], function (Backbone, IndexerModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/indexer',
model: IndexerModel

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

@ -19,7 +19,7 @@ define([
},
addNotification: function (e) {
if ($(e.target).hasClass('icon-info-sign')) {
if (this.$(e.target).hasClass('icon-info-sign')) {
return;
}

@ -1,8 +1,9 @@
'use strict';
'use strict';
define(
[
'Backbone',
'Settings/Notifications/Model'
], function (NotificationModel) {
], function (Backbone, NotificationModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/notification',
model: NotificationModel

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

@ -6,7 +6,7 @@ define(
'Mixins/AsModelBoundView',
'filesize',
'jquery.knob'
], function (Marionette, AsModelBoundView, Filesize) {
], function (Marionette, AsModelBoundView, fileSize) {
var view = Marionette.ItemView.extend({
template: 'Settings/Quality/Size/QualitySizeTemplate',
@ -24,7 +24,7 @@ define(
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
this.filesize = Filesize;
this.filesize = fileSize;
},
onRender: function () {
@ -44,8 +44,8 @@ define(
_changeMaxSize: function () {
var maxSize = this.model.get('maxSize');
var bytes = maxSize * 1024 * 1024;
var thirty = Filesize(bytes * 30, 1, false);
var sixty = Filesize(bytes * 60, 1, false);
var thirty = fileSize(bytes * 30, 1, false);
var sixty = fileSize(bytes * 60, 1, false);
if (parseInt(maxSize, 10) === 0) {
thirty = 'No Limit';

Loading…
Cancel
Save