From 9682ba3b7adcac116b0f2fbf8d1a9b620f767fba Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 9 Jul 2013 20:55:43 +0200 Subject: little fixes for actionbar and selection --- pyload/web/app/scripts/controller.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pyload/web/app/scripts/controller.js') diff --git a/pyload/web/app/scripts/controller.js b/pyload/web/app/scripts/controller.js index 05237914d..60f604e5b 100644 --- a/pyload/web/app/scripts/controller.js +++ b/pyload/web/app/scripts/controller.js @@ -1,6 +1,7 @@ define([ 'app', 'backbone', + 'underscore', // Views 'views/headerView', @@ -12,7 +13,7 @@ define([ 'views/settings/settingsView', 'views/accounts/accountListView' ], function( - App, Backbone, HeaderView, NotificationView, DashboardView, SelectionView, FilterView, LoginView, SettingsView, AccountListView) { + App, Backbone, _, HeaderView, NotificationView, DashboardView, SelectionView, FilterView, LoginView, SettingsView, AccountListView) { 'use strict'; // TODO some views does not need to be loaded instantly @@ -30,8 +31,12 @@ define([ this.header(); App.actionbar.show(new FilterView()); - // TODO: not completly visible after reattaching - App.selection.attachView(new SelectionView()); + + // TODO: not completely visible after reattaching + // now visible every time + if (_.isUndefined(App.selection.currentView) || _.isNull(App.selection.currentView)) + App.selection.attachView(new SelectionView()); + App.content.show(new DashboardView()); }, -- cgit v1.2.3