Private GIT

Skip to content
Snippets Groups Projects
Commit 2f7b93c9 authored by Gaëtan Muller's avatar Gaëtan Muller
Browse files

Open the selected season

parent 6af4b853
Branches
Tags
No related merge requests found
...@@ -7,7 +7,9 @@ $(document).ready(function () { ...@@ -7,7 +7,9 @@ $(document).ready(function () {
$('#seasonJump').change(function () { $('#seasonJump').change(function () {
var id = $('#seasonJump option:selected').val(); var id = $('#seasonJump option:selected').val();
if (id && id != 'jump') { if (id && id != 'jump') {
var season = $('#seasonJump option:selected').data('season');
$('html,body').animate({scrollTop: $('[name ="' + id.substring(1) + '"]').offset().top - 50}, 'slow'); $('html,body').animate({scrollTop: $('[name ="' + id.substring(1) + '"]').offset().top - 50}, 'slow');
$('#collapseSeason-' + season).collapse('show');
location.hash = id; location.hash = id;
} }
$(this).val('jump'); $(this).val('jump');
......
...@@ -123,7 +123,7 @@ $(document).ready(function(){ ...@@ -123,7 +123,7 @@ $(document).ready(function(){
<select id="seasonJump" class="form-control input-sm" style="position: relative; top: -4px;"> <select id="seasonJump" class="form-control input-sm" style="position: relative; top: -4px;">
<option value="jump">Jump to Season</option> <option value="jump">Jump to Season</option>
% for seasonNum in seasonResults: % for seasonNum in seasonResults:
<option value="#season-${seasonNum["season"]}">${('Specials', 'Season ' + str(seasonNum["season"]))[int(seasonNum["season"]) > 0]}</option> <option value="#season-${seasonNum["season"]}" data-season="${seasonNum["season"]}">${('Specials', 'Season ' + str(seasonNum["season"]))[int(seasonNum["season"]) > 0]}</option>
% endfor % endfor
</select> </select>
% else: % else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment