Skip to content

Commit

Permalink
Update background transition
Browse files Browse the repository at this point in the history
  • Loading branch information
FlixtorMe committed Aug 27, 2014
1 parent 9106a03 commit 894e37e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
17 changes: 3 additions & 14 deletions frames/movies.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
//By default we filter by most downloaded
changeFilterCategory("Most downloaded");

//Persistence
if(sessionStorage.movie) {
var movie = $.parseJSON(sessionStorage.movie);
//showDetails(movie.MovieId);
}

$("#txtMovieSearch").bind('keyup paste', function() {
clearTimeout($(this).data('timeout'));
$(this).data('timeout', setTimeout(function(){
Expand All @@ -62,19 +56,13 @@
});

$.fn.inView = function(){
//Window Object
var win = $(window);
//Object to Check
obj = $(this);
//the top Scroll Position in the page
var scrollPosition = win.scrollTop();
//the end of the visible area in the page, starting from the scroll position
var visibleArea = win.scrollTop() + win.height();
//the end of the object to check
var objEndPos = (obj.offset().top + obj.outerHeight());

return(visibleArea >= objEndPos && scrollPosition <= objEndPos ? true : false)

};

$('#movieContainer').scroll(function() {
Expand Down Expand Up @@ -293,7 +281,6 @@
$('#date').empty();
$('#date').append('<span class="glyphicon glyphicon-calendar"></span>&nbsp;&nbsp;');

console.log(movie);
//Insert backdrop path
$( "<style> #customCSS {position: absolute; top: 0; bottom: 0;left: 0; right: 0; z-index: -100; background: url("+movie.fanart+") no-repeat center center fixed; -webkit-background-size: cover; background-size: cover; color: #e9e9e9;}</style>" ).appendTo("#customCSS");

Expand Down Expand Up @@ -380,7 +367,7 @@
$("#side-bar-full").hide();
$("#content").css("opacity", "0");
$('#side-bar-small').attr("style", "display: none !important");
$('#customCSS').animate({opacity: 0}, 0).animate({opacity: 1}, 2000);
$('#customCSS').animate({opacity: 0}, 0).animate({opacity: 1}, 3500);
}

function changeSearchText() {
Expand Down Expand Up @@ -490,6 +477,8 @@
console.log(e);
}

$("#customCSS").stop();
$("#customCSS").removeAttr('style');
$("#customCSS").empty();
$("#content-overlay").hide();
$("#movie").hide();
Expand Down
41 changes: 26 additions & 15 deletions frames/series.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,29 @@
//By default we filter by most downloaded.
changeFilterCategory("Most downloaded");

//Persistence
if(sessionStorage.serie){
var serie = $.parseJSON(sessionStorage.serie);
//showDetails(serie.SerieId , true);
}
$("#txtSerieSearch").bind('keyup paste', function() {
clearTimeout($(this).data('timeout'));
$(this).data('timeout', setTimeout(function(){
var serieSearchValue = $('#txtSerieSearch').val();

if(serieSearchValue.indexOf('magnet:?xt=urn:btih:') == 0) {
$("#btnSearchSerie").text('Play');
}
else {
$( "#btnSearchSerie" ).empty();
$("#btnSearchSerie").append('<span class="glyphicon glyphicon-search"></span>');
}
}, 200));
});

$.fn.inView = function(){
//Window Object
var win = $(window);
//Object to Check
obj = $(this);
//the top Scroll Position in the page
var scrollPosition = win.scrollTop();
//the end of the visible area in the page, starting from the scroll position
var visibleArea = win.scrollTop() + win.height();
//the end of the object to check
var objEndPos = (obj.offset().top + obj.outerHeight());

return(visibleArea >= objEndPos && scrollPosition <= objEndPos ? true : false)

};

$('#serieContainer').scroll(function() {
Expand Down Expand Up @@ -248,7 +251,14 @@
queue: false
}
});
serieApplySearch();

if(serieFilter.searchValue.indexOf('magnet:?xt=urn:btih:') == 0) {
var infoHash = serieFilter.searchValue.split('magnet:?xt=urn:btih:');
main.go("players/player.html?torrentId=" + infoHash[1]);
}
else {
serieApplySearch();
}
}

function startTorrent(infoHash) {
Expand All @@ -275,7 +285,6 @@

callwcf.searchSerieDetail( serie, function(results) {
if( results !== 'error' ) {
console.log(results);
serie = results;

//Insert backdrop path
Expand Down Expand Up @@ -356,7 +365,7 @@
$("#content").css("opacity", "0");
$('#side-bar-small').attr("style", "display: none !important");
$("#head-bar").hide();
$('#customCSS').animate({opacity: 0}, 0).animate({opacity: 1}, 2000);
$('#customCSS').animate({opacity: 0}, 0).animate({opacity: 1}, 3500);
}
else {
console.log("Service not available");
Expand Down Expand Up @@ -442,6 +451,8 @@
console.log(e);
}

$("#customCSS").stop();
$("#customCSS").removeAttr('style');
$("#customCSS").empty();
$("#content-overlay").hide();
$("#serie").hide();
Expand All @@ -463,7 +474,7 @@
<span class="glyphicon glyphicon-search"></span>
</button>
<span class="ml-10">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Genres
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Genre
<span id="filterByGenre"></span>
<span class="caret"></span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion js/callwcf.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ var searchMovies = function (sort, keywords, genre, limit, page, order, callback
callback("error");
}
}).error(function () {
utilities.showPrompt("An uncaughtException was found", "<span class='text-danger'>An uncaughtException was found</span>.", "ok", function(answer) {
utilities.showPrompt("An uncaughtException was found", "<span class='text-danger'>Yts is unavailable. Please try it again later</span>.", "ok", function(answer) {
});
callback("error");
});
Expand Down
2 changes: 1 addition & 1 deletion js/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var Translations = function () {
var moviesSearchPlaceholder = i18n.__('Movie title or magnet link...');
$('#txtMovieSearch').attr('placeholder', moviesSearchPlaceholder);

var seriesSearchPlaceholder = i18n.__('Serie title...');
var seriesSearchPlaceholder = i18n.__('Serie title or magnet link...');
$('#txtSerieSearch').attr('placeholder', seriesSearchPlaceholder);

var seriesTorrentPlaceholder = i18n.__('Torrent name...');
Expand Down
3 changes: 2 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@
"Cut": "Cut",
"Copy": "Copy",
"Paste": "Paste",
"3D": "3D"
"3D": "3D",
"Serie title or magnet link...": "Serie title or magnet link..."
}

0 comments on commit 894e37e

Please sign in to comment.