minor cleanup.

This commit is contained in:
kay.one 2013-06-06 18:29:54 -07:00
parent c2f438c18a
commit 763c4bd25b
4 changed files with 31 additions and 21 deletions

View File

@ -53,8 +53,12 @@ Backgrid.NzbDroneHeaderCell = Backgrid.HeaderCell.extend({
direction: function (dir) {
if (arguments.length) {
if (this._direction) this.$el.children('i').removeClass(this._convertDirectionToIcon(this._direction));
if (dir) this.$el.children('i').addClass(this._convertDirectionToIcon(dir));
if (this._direction) {
this.$el.children('i').removeClass(this._convertDirectionToIcon(this._direction));
}
if (dir) {
this.$el.children('i').addClass(this._convertDirectionToIcon(dir));
}
this._direction = dir;
}
@ -74,7 +78,9 @@ Backgrid.NzbDroneHeaderCell = Backgrid.HeaderCell.extend({
if (leftVal === rightVal) {
return 0;
}
else if (leftVal > rightVal) { return -1; }
else if (leftVal > rightVal) {
return -1;
}
return 1;
});
}
@ -85,7 +91,9 @@ Backgrid.NzbDroneHeaderCell = Backgrid.HeaderCell.extend({
if (leftVal === rightVal) {
return 0;
}
else if (leftVal < rightVal) { return -1; }
else if (leftVal < rightVal) {
return -1;
}
return 1;
});
}

View File

@ -1,5 +1,5 @@
"use strict";
define(['app'], function (app) {
define(['app'], function () {
NzbDrone.Release.Model = Backbone.Model.extend({
/* mutators: {
seasonNumber: function () {

View File

@ -15,7 +15,7 @@ define(function () {
return $el;
},
showModal: function (view) {
showModal: function () {
this.$el.addClass('modal hide fade');
//need tab index so close on escape works

View File

@ -1,4 +1,6 @@
define(['app'], function () {
"use strict";
define(['app'], function () {
NzbDrone.Shared.SpinnerView = Backbone.Marionette.ItemView.extend({
template : 'Shared/SpinnerTemplate',
className: 'nz-spinner row'