Private GIT

Skip to content
Snippets Groups Projects
Commit 3edf6553 authored by miigotu's avatar miigotu
Browse files

Merge pull request #2787 from OmgImAlexis/moved-js-to-new

Moved js to new directory
parents 38dea5f9 b393115f
No related branches found
No related tags found
No related merge requests found
$(document).ready(function() {
var trendingRequestXhr = null;
function loadContent() {
if (trendingRequestXhr) trendingRequestXhr.abort();
$('#trendingShows').html('<img id="searchingAnim" src="' + srRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> loading trending shows...');
trendingRequestXhr = $.ajax({
url: srRoot + '/home/addShows/getTrendingShows/',
timeout: 60 * 1000,
error: function () {
$('#trendingShows').empty().html('Trakt timed out, refresh page to try again');
},
success: function (data) {
$('#trendingShows').html(data);
}
});
}
loadContent();
});
$.fn.loadContent = function(path, loadingTxt, errorTxt) {
$(this).html('<img id="searchingAnim" src="' + srRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" />&nbsp;' + loadingTxt);
$(this).load(srRoot + path + ' #container', function(response, status, xhr) {
if (status == "error") $(this).empty().html(errorTxt);
});
};
$(document).ready(function() {
$('#trendingShows').loadContent('/home/addShows/getTrendingShows/', 'Loading trending shows...', 'Trakt timed out, refresh page to try again');
$('#container').isotope({
itemSelector: '.trakt_show',
layoutMode: 'fitRows'
});
});
File moved
$.fn.loadContent = function(path, loadingTxt, errorTxt) {
$(this).html('<img id="searchingAnim" src="' + srRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" />&nbsp;' + loadingTxt);
$(this).load(srRoot + path + ' #container', function(response, status, xhr) {
if (status == "error") $(this).empty().html(errorTxt);
});
};
$(document).ready(function() {
$('#trendingShows').loadContent('/home/addShows/getRecommendedShows/', 'Loading recommended shows...', 'Trakt timed out, refresh page to try again');
$('#container').isotope({
itemSelector: '.trakt_show',
layoutMode: 'fitRows'
});
});
$(document).ready(function() {
var trendingRequestXhr = null;
function loadContent() {
if (trendingRequestXhr) trendingRequestXhr.abort();
$('#trendingShows').html('<img id="searchingAnim" src="' + srRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> Loading Recommended Shows...');
trendingRequestXhr = $.ajax({
url: srRoot + '/home/addShows/getRecommendedShows/',
timeout: 60 * 1000,
error: function () {
$('#trendingShows').empty().html('Trakt timed out, refresh page to try again');
},
success: function (data) {
$('#trendingShows').html(data);
}
});
}
loadContent();
});
......@@ -3,7 +3,7 @@
import sickbeard
%>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/recommendedShows.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/recommendedShows.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/rootDirs.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/plotTooltip.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/home_recommendedShows.js"></script>
......
......@@ -9,7 +9,7 @@
from sickbeard.helpers import anon_url
%>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/addTrendingShow.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/addTrendingShow.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/rootDirs.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/plotTooltip.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/home_trendingShows.js"></script>
......
......@@ -357,7 +357,7 @@
<script type="text/javascript" src="${srRoot}/js/lib/pnotify.custom.min.js?${sbPID}"></script><!-- Needs to be removed -->
<script type="text/javascript" src="${srRoot}/js/new/parsers.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/meta.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/script.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/core.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/lib/jquery.scrolltopcontrol-1.1.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/browser.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/ajaxNotifications.js?${sbPID}"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment