moved mixins to require.js

This commit is contained in:
kay.one 2013-06-20 22:35:56 -07:00
commit 467c88f711
6 changed files with 81 additions and 89 deletions

View file

@ -1,19 +1,19 @@
"use strict";
define([
'app',
'Missing/Collection',
'Missing/Row',
'Cells/AirDateCell',
'Series/Index/Table/SeriesStatusCell',
'Shared/Toolbar/ToolbarLayout',
'Cells/SeriesTitleCell',
'Cells/EpisodeNumberCell',
'Cells/EpisodeTitleCell',
'Cells/AirDateCell',
'Shared/Grid/Pager',
'Shared/LoadingView'
],
function () {
define(
[
'app',
'Missing/Row',
'Missing/Collection',
'Cells/AirDateCell',
'Series/Index/Table/SeriesStatusCell',
'Shared/Toolbar/ToolbarLayout',
'Cells/SeriesTitleCell',
'Cells/EpisodeNumberCell',
'Cells/EpisodeTitleCell',
'Cells/AirDateCell',
'Shared/Grid/Pager',
'Shared/LoadingView'
], function (App, MissingRow) {
NzbDrone.Missing.MissingLayout = Backbone.Marionette.Layout.extend({
template: 'Missing/MissingLayoutTemplate',
@ -23,36 +23,36 @@ define([
pager : '#x-pager'
},
columns: [
{
name : 'series',
label : 'Series Title',
sortable: false,
cell : NzbDrone.Cells.SeriesTitleCell
},
{
name : 'this',
label : 'Episode',
sortable: false,
cell : NzbDrone.Cells.EpisodeNumberCell
},
{
name : 'this',
label : 'Episode Title',
sortable: false,
cell : NzbDrone.Cells.EpisodeTitleCell
},
{
name : 'airDate',
label: 'Air Date',
cell : NzbDrone.Cells.AirDateCell
}
],
columns:
[
{
name : 'series',
label : 'Series Title',
sortable: false,
cell : NzbDrone.Cells.SeriesTitleCell
},
{
name : 'this',
label : 'Episode',
sortable: false,
cell : NzbDrone.Cells.EpisodeNumberCell
},
{
name : 'this',
label : 'Episode Title',
sortable: false,
cell : NzbDrone.Cells.EpisodeTitleCell
},
{
name : 'airDate',
label: 'Air Date',
cell : NzbDrone.Cells.AirDateCell
}
],
_showTable: function () {
this.missing.show(new Backgrid.Grid(
{
row : NzbDrone.Missing.Row,
this.missing.show(new Backgrid.Grid({
row : MissingRow,
columns : this.columns,
collection: this.missingCollection,
className : 'table table-hover'
@ -70,8 +70,7 @@ define([
this.missing.show(new NzbDrone.Shared.LoadingView());
this.missingCollection = new NzbDrone.Missing.Collection();
this.missingCollection.fetch()
.done(function () {
this.missingCollection.fetch().done(function () {
self._showTable();
});
}

View file

@ -1,16 +1,16 @@
"use strict";
define(['app','backgrid'], function () {
define(
[
'backgrid'
], function (Backgrid) {
NzbDrone.Missing.Row = Backgrid.Row.extend({
events: {
'click .x-search': 'search'
},
search: function () {
window.alert('Episode Search');
}
return Backgrid.Row.extend({
events: {
'click .x-search': 'search'
},
search: function () {
window.alert('Episode Search');
}
});
});
return NzbDrone.Mixins.Row;
});