1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 17:27:18 +00:00

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

@ -25,7 +25,7 @@
<link href="/content/base.css" rel='stylesheet' type='text/css'/> <link href="/content/base.css" rel='stylesheet' type='text/css'/>
</head> </head>
<body> <body>
<div id="in-sub-nav"> <div id="in-sub-nav">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">
@ -53,8 +53,19 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="page">
<!--<div style="background: red">
awdawdawdawdawdawdadaw
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>-->
<div class="page">
<div class="page-container"> <div class="page-container">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
@ -67,8 +78,8 @@
<div id="modal-region"></div> <div id="modal-region"></div>
</div> </div>
</div> </div>
</div> </div>
<footer> <footer>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">
@ -76,7 +87,7 @@
</div> </div>
</div> </div>
</div> </div>
</footer> </footer>
</body> </body>
<script src="/JsLibraries/jquery.js"></script> <script src="/JsLibraries/jquery.js"></script>
<script src="/JsLibraries/bootstrap.js"></script> <script src="/JsLibraries/bootstrap.js"></script>

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 {