Fixed LoadingView

This commit is contained in:
Mark McDowall 2013-08-21 21:04:03 -07:00
parent fb26cbb4a4
commit 0208ae8347
8 changed files with 23 additions and 31 deletions

View File

@ -6,8 +6,9 @@ define(
'AddSeries/RootFolders/CollectionView', 'AddSeries/RootFolders/CollectionView',
'AddSeries/RootFolders/Collection', 'AddSeries/RootFolders/Collection',
'AddSeries/RootFolders/Model', 'AddSeries/RootFolders/Model',
'Shared/LoadingView',
'Mixins/AutoComplete' 'Mixins/AutoComplete'
], function (Marionette, RootFolderCollectionView, RootFolderCollection, RootFolderModel) { ], function (Marionette, RootFolderCollectionView, RootFolderCollection, RootFolderModel, LoadingView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'AddSeries/RootFolders/LayoutTemplate', template: 'AddSeries/RootFolders/LayoutTemplate',
@ -33,6 +34,7 @@ define(
onRender: function () { onRender: function () {
var self = this; var self = this;
this.currentDirs.show(new LoadingView());
RootFolderCollection.promise.done(function () { RootFolderCollection.promise.done(function () {
self.currentDirs.show(self.rootfolderListView); self.currentDirs.show(self.rootfolderListView);

View File

@ -11,7 +11,7 @@
{{#if items}} {{#if items}}
<h4>Recent Folders</h4> <h4>Recent Folders</h4>
{{/if}} {{/if}}
<div id="current-dirs" class="root-folders-list">loading ...</div> <div id="current-dirs" class="root-folders-list"></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn" data-dismiss="modal">close</button> <button class="btn" data-dismiss="modal">close</button>

View File

@ -6,11 +6,11 @@ define(
'Episode/Search/ButtonsView', 'Episode/Search/ButtonsView',
'Episode/Search/ManualLayout', 'Episode/Search/ManualLayout',
'Release/Collection', 'Release/Collection',
'Shared/SpinnerView', 'Shared/LoadingView',
'Shared/Messenger', 'Shared/Messenger',
'Commands/CommandController', 'Commands/CommandController',
'Shared/FormatHelpers' 'Shared/FormatHelpers'
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SpinnerView, Messenger, CommandController, FormatHelpers) { ], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, LoadingView, Messenger, CommandController, FormatHelpers) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'Episode/Search/LayoutTemplate', template: 'Episode/Search/LayoutTemplate',
@ -59,7 +59,7 @@ define(
var self = this; var self = this;
this.mainView = new SpinnerView(); this.mainView = new LoadingView();
this._showMainView(); this._showMainView();
var releases = new ReleaseCollection(); var releases = new ReleaseCollection();

View File

@ -8,8 +8,9 @@ define(
'Series/EpisodeFileCollection', 'Series/EpisodeFileCollection',
'Cells/FileSizeCell', 'Cells/FileSizeCell',
'Cells/QualityCell', 'Cells/QualityCell',
'Episode/Summary/NoFileView' 'Episode/Summary/NoFileView',
], function (App, Marionette, Backgrid, EpisodeFileModel, EpisodeFileCollection, FileSizeCell, QualityCell, NoFileView) { 'Shared/LoadingView'
], function (App, Marionette, Backgrid, EpisodeFileModel, EpisodeFileCollection, FileSizeCell, QualityCell, NoFileView, LoadingView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'Episode/Summary/EpisodeSummaryLayoutTemplate', template: 'Episode/Summary/EpisodeSummaryLayoutTemplate',
@ -61,6 +62,8 @@ define(
} }
else { else {
this.activity.show(new LoadingView());
var self = this; var self = this;
var newEpisodeFile = new EpisodeFileModel({ id: episodeFileId }); var newEpisodeFile = new EpisodeFileModel({ id: episodeFileId });
var newEpisodeFileCollection = new EpisodeFileCollection(newEpisodeFile, { seriesId: this.model.get('seriesId') }); var newEpisodeFileCollection = new EpisodeFileCollection(newEpisodeFile, { seriesId: this.model.get('seriesId') });

View File

@ -9,8 +9,8 @@ define(
'Cells/FileSizeCell', 'Cells/FileSizeCell',
'Cells/QualityCell', 'Cells/QualityCell',
'Cells/ApprovalStatusCell', 'Cells/ApprovalStatusCell',
'Shared/SpinnerView' 'Shared/LoadingView'
], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, SpinnerView) { ], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, LoadingView) {
return Marionette.Layout.extend({ return Marionette.Layout.extend({
template: 'Release/LayoutTemplate', template: 'Release/LayoutTemplate',
@ -80,7 +80,7 @@ define(
var self = this; var self = this;
this.grid.show(new SpinnerView()); this.grid.show(new LoadingView());
this.fetchPromise.done(function () { this.fetchPromise.done(function () {
self.showTable(); self.showTable();

View File

@ -1 +1,8 @@
loading ... <div class="row">
<div id="followingBalls">
<div id="ball-1" class="ball"></div>
<div id="ball-2" class="ball"></div>
<div id="ball-3" class="ball"></div>
<div id="ball-4" class="ball"></div>
</div>
</div>

View File

@ -1,8 +0,0 @@
<div class="row">
<div id="followingBalls">
<div id="ball-1" class="ball"></div>
<div id="ball-2" class="ball"></div>
<div id="ball-3" class="ball"></div>
<div id="ball-4" class="ball"></div>
</div>
</div>

View File

@ -1,12 +0,0 @@
'use strict';
define(
[
'marionette'
], function (Marionette) {
return Marionette.ItemView.extend({
template : 'Shared/SpinnerTemplate',
});
});