From 82ae91dd6eb028da3ba1d732403dff9c73b7648a Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 26 Feb 2013 19:31:35 -0800 Subject: [PATCH] main menu now uses backbone to handle navigation. no more reload. --- NzbDrone.Backbone/Content/menu.css | 4 +- NzbDrone.Backbone/Controller.js | 6 +-- NzbDrone.Backbone/Index.html | 6 +-- NzbDrone.Backbone/MainMenuView.js | 56 ++++++++++++++++++++++ NzbDrone.Backbone/NzbDrone.Backbone.csproj | 1 + 5 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 NzbDrone.Backbone/MainMenuView.js diff --git a/NzbDrone.Backbone/Content/menu.css b/NzbDrone.Backbone/Content/menu.css index d357fc5f9..a7e8b263f 100644 --- a/NzbDrone.Backbone/Content/menu.css +++ b/NzbDrone.Backbone/Content/menu.css @@ -1,7 +1,7 @@ -#main-menu i:before { +#main-menu-region i:before { font-size: 35px; } -#main-menu i { +#main-menu-region i { width: 40px; } \ No newline at end of file diff --git a/NzbDrone.Backbone/Controller.js b/NzbDrone.Backbone/Controller.js index 8f1293e13..d6fb0a0f8 100644 --- a/NzbDrone.Backbone/Controller.js +++ b/NzbDrone.Backbone/Controller.js @@ -1,6 +1,6 @@ define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout', 'Series/SeriesCollectionView', 'Upcoming/UpcomingCollectionView', 'Calendar/CalendarCollectionView', 'Shared/NotificationView', - 'Shared/NotFoundView'], function (app, modalRegion) { + 'Shared/NotFoundView', 'MainMenuView'], function (app, modalRegion) { var controller = Backbone.Marionette.Controller.extend({ @@ -43,7 +43,7 @@ } }); - + //Modal dialog initializer NzbDrone.addInitializer(function () { NzbDrone.addRegions({ modalRegion: modalRegion }); @@ -59,7 +59,7 @@ }); }); - + return new controller(); }); diff --git a/NzbDrone.Backbone/Index.html b/NzbDrone.Backbone/Index.html index 6b853adbf..abae6de5e 100644 --- a/NzbDrone.Backbone/Index.html +++ b/NzbDrone.Backbone/Index.html @@ -44,7 +44,7 @@
-
+