From b27ac943827fe0e8a02bf3014c0c8da424eae139 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 25 Nov 2014 11:06:34 -0800 Subject: [PATCH] Fixed the loading screen in the new site-chrome. As a result, found and removed all the extraneous loading logic from MainAccountView. --- app/styles/common/common.sass | 1 + app/views/account/MainAccountView.coffee | 38 ++---------------------- app/views/kinds/RootView.coffee | 2 +- 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/app/styles/common/common.sass b/app/styles/common/common.sass index c97aea9a3..9133ae55a 100644 --- a/app/styles/common/common.sass +++ b/app/styles/common/common.sass @@ -75,6 +75,7 @@ a .progress width: 50% margin: 0 25% + margin-bottom: 20px // all loading screens .loading-container diff --git a/app/views/account/MainAccountView.coffee b/app/views/account/MainAccountView.coffee index 3880b6caf..6559ff5b6 100644 --- a/app/views/account/MainAccountView.coffee +++ b/app/views/account/MainAccountView.coffee @@ -1,38 +1,6 @@ -View = require 'views/kinds/RootView' +RootView = require 'views/kinds/RootView' template = require 'templates/account/main-account-view' -{me} = require 'lib/auth' -User = require 'models/User' -AuthModalView = require 'views/modal/AuthModal' -RecentlyPlayedCollection = require 'collections/RecentlyPlayedCollection' -ThangType = require 'models/ThangType' -module.exports = class MainAccountView extends View +module.exports = class MainAccountView extends RootView id: 'main-account-view' - template: template - - constructor: (options) -> - super options - return unless me - @wizardType = ThangType.loadUniversalWizard() - @recentlyPlayed = new RecentlyPlayedCollection me.get('_id') - @supermodel.loadModel @wizardType, 'thang' - @supermodel.loadCollection @recentlyPlayed, 'recentlyPlayed' - - onLoaded: -> - super() - - getRenderData: -> - c = super() - c.subs = {} - enabledEmails = c.me.getEnabledEmails() - c.subs[sub] = 1 for sub in enabledEmails - c.hasEmailNotes = _.any enabledEmails, (sub) -> sub.contains 'Notes' - c.hasEmailNews = _.any enabledEmails, (sub) -> sub.contains('News') and sub isnt 'generalNews' - c.hasGeneralNews = 'generalNews' in enabledEmails - c.wizardSource = @wizardType.getPortraitSource colorConfig: me.get('wizard')?.colorConfig if @wizardType.loaded - c.recentlyPlayed = @recentlyPlayed.models - c - - afterRender: -> - super() - @openModalView new AuthModalView if me.isAnonymous() + template: template \ No newline at end of file diff --git a/app/views/kinds/RootView.coffee b/app/views/kinds/RootView.coffee index 4e69f0146..a51045be5 100644 --- a/app/views/kinds/RootView.coffee +++ b/app/views/kinds/RootView.coffee @@ -76,7 +76,7 @@ module.exports = class RootView extends CocoView @openModalView new ModalClass {} showLoading: ($el) -> - $el ?= @$el.find('.main-content-area') + $el ?= @$el.find('#site-content-area') super($el) afterInsert: ->