small changes around the filtering

This commit is contained in:
tidusjar 2016-03-23 17:28:08 +00:00
commit 7d26842c3d
3 changed files with 22 additions and 11 deletions

View file

@ -5,9 +5,7 @@ $info-colour: #5bc0de;
$warning-colour: #f0ad4e; $warning-colour: #f0ad4e;
$danger-colour: #d9534f; $danger-colour: #d9534f;
$success-colour: #5cb85c; $success-colour: #5cb85c;
$i: $i:!important;
!important
;
@media (min-width: 768px ) { @media (min-width: 768px ) {
.row { .row {

View file

@ -16,14 +16,31 @@ tvLoad();
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr('href'); var target = $(e.target).attr('href');
var activeState = "";
if (target === "#TvShowTab") { if (target === "#TvShowTab") {
if ($('#movieList').mixItUp('isLoaded')) {
activeState = $('#movieList').mixItUp('getState');
$('#movieList').mixItUp('destroy');
}
if (!$('#tvList').mixItUp('isLoaded')) { if (!$('#tvList').mixItUp('isLoaded')) {
$('#tvList').mixItUp({ $('#tvList').mixItUp({
layout: {
display: 'block'
},
load: { load: {
filter: 'all' filter: activeState.activeFilter || 'all',
sort: activeState.activeSort || 'default:asc'
}
});
}
}
if (target === "#MoviesTab") {
if ($('#tvList').mixItUp('isLoaded')) {
activeState = $('#tvList').mixItUp('getState');
$('#tvList').mixItUp('destroy');
}
if (!$('#movieList').mixItUp('isLoaded')) {
$('#movieList').mixItUp({
load: {
filter: activeState.activeFilter || 'all',
sort: activeState.activeSort || 'default:asc'
} }
}); });
} }

View file

@ -6,9 +6,5 @@
{ {
"outputFile": "Content/pace.css", "outputFile": "Content/pace.css",
"inputFile": "Content/pace.scss" "inputFile": "Content/pace.scss"
},
{
"outputFile": "Content/requests.es5.js",
"inputFile": "Content/requests.js"
} }
] ]