Moar require

This commit is contained in:
Mark McDowall 2013-06-23 19:31:02 -07:00
commit e856a31a4d
20 changed files with 83 additions and 63 deletions

View file

@ -1,6 +1,6 @@
'use strict';
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
NzbDrone.Cells.AirDateCell = Backgrid.Cell.extend({
define(['app', 'Shared/FormatHelpers', 'Cells/NzbDroneCell'], function () {
return NzbDrone.Cells.NzbDroneCell.extend({
className: 'air-date-cell',
render: function () {

View file

@ -1,7 +1,7 @@
'use strict';
define(['app', 'Cells/NzbDroneCell'], function () {
NzbDrone.Cells.EpisodeNumberCell = NzbDrone.Cells.NzbDroneCell.extend({
return NzbDrone.Cells.NzbDroneCell.extend({
className: 'episode-number-cell',

View file

@ -1,7 +1,7 @@
'use strict';
define(['app','backgrid' ], function () {
NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({
define(['app','cells/nzbdronecell' ], function () {
return NzbDrone.Cells.NzbDroneCell.extend({
className: 'episode-status-cell',

View file

@ -1,7 +1,7 @@
'use strict';
define(['app', 'Cells/NzbDroneCell'], function () {
NzbDrone.Cells.EpisodeTitleCell = NzbDrone.Cells.NzbDroneCell.extend({
return NzbDrone.Cells.NzbDroneCell.extend({
className: 'episode-title-cell',

View file

@ -1,6 +1,6 @@
'use strict';
define(['app', 'Cells/TemplatedCell'], function () {
NzbDrone.Cells.QualityCell = NzbDrone.Cells.TemplatedCell.extend({
define(['app', 'Cells/TemplatedCell'], function (App, TemplatedCell) {
return TemplatedCell.extend({
className: 'quality-cell',
template : 'Cells/QualityTemplate'

View file

@ -1,6 +1,6 @@
'use strict';
define(['app','Cells/NzbDroneCell'], function () {
NzbDrone.Cells.RelativeDateCell = NzbDrone.Cells.NzbDroneCell.extend({
return NzbDrone.Cells.NzbDroneCell.extend({
className : 'relative-date-cell',

View file

@ -0,0 +1,25 @@
'use strict';
define(['app','cells/nzbdronecell'], function () {
return NzbDrone.Cells.NzbDroneCell.extend({
className: 'series-status-cell',
render: function () {
this.$el.empty();
var monitored = this.model.get('monitored');
var status = this.model.get('status');
if (!monitored) {
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
}
else if (status === 'continuing') {
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
}
else {
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
}
return this;
}
});
});

View file

@ -1,6 +1,6 @@
'use strict';
define(['app', 'Cells/TemplatedCell'], function () {
NzbDrone.Cells.SeriesTitleCell = NzbDrone.Cells.TemplatedCell.extend({
define(['app', 'Cells/TemplatedCell'], function (App, TemplatedCell) {
return TemplatedCell.extend({
className: 'series-title',
template : 'Cells/SeriesTitleTemplate'

View file

@ -1,9 +1,7 @@
'use strict';
define(['app','Cells/NzbDroneCell'], function () {
NzbDrone.Cells.TemplatedCell = NzbDrone.Cells.NzbDroneCell.extend({
return NzbDrone.Cells.NzbDroneCell.extend({
render: function () {
var templateName = this.column.get('template') || this.template;

View file

@ -1,7 +1,7 @@
'use strict';
define(['app', 'Episode/Layout'], function () {
NzbDrone.Cells.ToggleCell = Backgrid.Cell.extend({
return Backgrid.Cell.extend({
className: 'toggle-cell clickable',