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;
}
}
#in-sub-nav li a {
color: #b9b9b9;
}

View File

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

View File

@ -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 <a/>
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 });
}
},

View File

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

View File

@ -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});
}
});
});

View File

@ -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 {