From 662ad28cc68e52899a1c2967dedbaf898a351957 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Mon, 22 Apr 2013 21:55:08 -0700 Subject: [PATCH] overview and series title in series list is now click-able, use backbone navigation to bring up episode page instead of page reload. --- UI/Content/menu.less | 7 +- UI/Index.html | 101 ++++++++++++++----------- UI/MainMenuView.js | 12 +-- UI/Series/Index/List/ItemTemplate.html | 30 ++++---- UI/Series/Index/List/ItemView.js | 9 ++- UI/Series/series.less | 10 ++- 6 files changed, 100 insertions(+), 69 deletions(-) diff --git a/UI/Content/menu.less b/UI/Content/menu.less index 353e4d91d..be4ebd965 100644 --- a/UI/Content/menu.less +++ b/UI/Content/menu.less @@ -5,4 +5,9 @@ i { width: 40px; } -} \ No newline at end of file +} + +#in-sub-nav li a { + color: #b9b9b9; + +} diff --git a/UI/Index.html b/UI/Index.html index dcc819db7..ecc28bc62 100644 --- a/UI/Index.html +++ b/UI/Index.html @@ -25,58 +25,69 @@ -
-
-
- +
+ -
-
-
-
-
-

NZBDRONE

-
-
+
+ + +
+
+
+
+
+

NZBDRONE

-
- +
+
+
+ +
+
+
+
+
+
+
+

© Copyright 2013 NzbDrone

-
-
-
-
-

© Copyright 2013 NzbDrone

-
-
-
-
+
diff --git a/UI/MainMenuView.js b/UI/MainMenuView.js index ce752a76d..08259f8af 100644 --- a/UI/MainMenuView.js +++ b/UI/MainMenuView.js @@ -1,9 +1,6 @@ -define(['app'], function () { +"use strict"; +define(['app'], function () { NzbDrone.MainMenuView = Backbone.Marionette.ItemView.extend({ - ui: { - seriesSearch: '.search input' - }, - events: { 'click a': 'onClick' }, @@ -13,10 +10,9 @@ event.preventDefault(); var target = $(event.target); - var href = undefined; //look down for - href = event.target.getAttribute('href'); + var href = event.target.getAttribute('href'); //if couldn't find it look up if (!href && target.parent('a') && target.parent('a')[0]) { @@ -32,7 +28,7 @@ if (href && href.startsWith('http')) { window.location.href = href; } else { - NzbDrone.Router.navigate(href, { trigger: true, replace: true }); + NzbDrone.Router.navigate(href, { trigger: true }); } }, diff --git a/UI/Series/Index/List/ItemTemplate.html b/UI/Series/Index/List/ItemTemplate.html index 605f0153f..ec0617359 100644 --- a/UI/Series/Index/List/ItemTemplate.html +++ b/UI/Series/Index/List/ItemTemplate.html @@ -8,7 +8,9 @@
@@ -18,23 +20,25 @@
-
- {{overview}} -
+ +
+ {{overview}} +
+
 
{{#if isContinuing}} - {{#if bestDateString}} - {{bestDateString}} - {{else}} - {{statusText}} - {{/if}} - Season {{seasonCount}} + {{#if bestDateString}} + {{bestDateString}} {{else}} - {{statusText}} - {{seasonCount}} Seasons + {{statusText}} + {{/if}} + Season {{seasonCount}} + {{else}} + {{statusText}} + {{seasonCount}} Seasons {{/if}}
@@ -47,4 +51,4 @@
-
\ No newline at end of file +
diff --git a/UI/Series/Index/List/ItemView.js b/UI/Series/Index/List/ItemView.js index de79fe4da..2359d4965 100644 --- a/UI/Series/Index/List/ItemView.js +++ b/UI/Series/Index/List/ItemView.js @@ -18,7 +18,8 @@ define([ events: { 'click .x-edit' : 'editSeries', - 'click .x-remove': 'removeSeries' + 'click .x-remove': 'removeSeries', + 'click a' : 'showEpisodeList' }, initialize: function (options) { @@ -38,6 +39,12 @@ define([ NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, { view: view }); + }, + + showEpisodeList: function (e) { + e.preventDefault(); + NzbDrone.Router.navigate('/series/details/' + this.model.get('id'), { trigger: true}); + } }); }); diff --git a/UI/Series/series.less b/UI/Series/series.less index ad1f7dbfe..3135ca156 100644 --- a/UI/Series/series.less +++ b/UI/Series/series.less @@ -1,9 +1,17 @@ .series-item { - padding-bottom: 20px; + padding-bottom: 30px; + + :hover { + text-decoration: none; + } h2 { margin-top: 0px; } + + a{ + color: #000000; + } } .series-posters {