overview and series title in series list is now click-able,

use backbone navigation to bring up episode page instead of page reload.
This commit is contained in:
kay.one 2013-04-22 21:55:08 -07:00 committed by Keivan Beigi
parent 9a42e305ad
commit 662ad28cc6
6 changed files with 100 additions and 69 deletions

View File

@ -6,3 +6,8 @@
width: 40px; width: 40px;
} }
} }
#in-sub-nav li a {
color: #b9b9b9;
}

View File

@ -54,6 +54,17 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div style="background: red">
awdawdawdawdawdawdadaw
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>-->
<div class="page"> <div class="page">
<div class="page-container"> <div class="page-container">
<div class="container"> <div class="container">

View File

@ -1,9 +1,6 @@
define(['app'], function () { "use strict";
define(['app'], function () {
NzbDrone.MainMenuView = Backbone.Marionette.ItemView.extend({ NzbDrone.MainMenuView = Backbone.Marionette.ItemView.extend({
ui: {
seriesSearch: '.search input'
},
events: { events: {
'click a': 'onClick' 'click a': 'onClick'
}, },
@ -13,10 +10,9 @@
event.preventDefault(); event.preventDefault();
var target = $(event.target); var target = $(event.target);
var href = undefined;
//look down for <a/> //look down for <a/>
href = event.target.getAttribute('href'); var href = event.target.getAttribute('href');
//if couldn't find it look up //if couldn't find it look up
if (!href && target.parent('a') && target.parent('a')[0]) { if (!href && target.parent('a') && target.parent('a')[0]) {
@ -32,7 +28,7 @@
if (href && href.startsWith('http')) { if (href && href.startsWith('http')) {
window.location.href = href; window.location.href = href;
} else { } else {
NzbDrone.Router.navigate(href, { trigger: true, replace: true }); NzbDrone.Router.navigate(href, { trigger: true });
} }
}, },

View File

@ -8,7 +8,9 @@
<div class="span10"> <div class="span10">
<div class="row"> <div class="row">
<div class="span9"> <div class="span9">
<a href="/series/details/{{id}}" target="_blank">
<h2>{{title}}</h2> <h2>{{title}}</h2>
</a>
</div> </div>
<div class="span1"> <div class="span1">
<div class="pull-right"> <div class="pull-right">
@ -18,9 +20,11 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<a href="/series/details/{{id}}" target="_blank">
<div class="span10"> <div class="span10">
{{overview}} {{overview}}
</div> </div>
</a>
</div> </div>
<div class="row">&nbsp;</div> <div class="row">&nbsp;</div>
<div class="row"> <div class="row">

View File

@ -18,7 +18,8 @@ define([
events: { events: {
'click .x-edit' : 'editSeries', 'click .x-edit' : 'editSeries',
'click .x-remove': 'removeSeries' 'click .x-remove': 'removeSeries',
'click a' : 'showEpisodeList'
}, },
initialize: function (options) { initialize: function (options) {
@ -38,6 +39,12 @@ define([
NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, { NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, {
view: view view: view
}); });
},
showEpisodeList: function (e) {
e.preventDefault();
NzbDrone.Router.navigate('/series/details/' + this.model.get('id'), { trigger: true});
} }
}); });
}); });

View File

@ -1,9 +1,17 @@
.series-item { .series-item {
padding-bottom: 20px; padding-bottom: 30px;
:hover {
text-decoration: none;
}
h2 { h2 {
margin-top: 0px; margin-top: 0px;
} }
a{
color: #000000;
}
} }
.series-posters { .series-posters {