SickGear/gui/slick/js/plotTooltip.js
JackDandy ccb9bb329c Coming Episodes Overhaul.
Change Coming Episodes to "Episodes" page (API endpoint is not renamed).
Add coming episodes to episode view renaming to config migration code.
Change Layout term "Calender" to "Day by Day" on Episodes page.
Fix saving of sort modes to config file on Episodes page.
Add qTip episode plots to "Day by Day" on Episodes page.
Add article sorting to networks on Episodes page.
Add toggle sort direction and multidimensional sort to isotope on Episodes page.
Add text "[paused]" where appropriate to shows on layout Day by Day.
Simplified sort code in webserver and in template.
Change page auto refresh from 10 to 30 mins.
Add other UI tweaks.
2015-01-08 16:43:17 +00:00

43 lines
1.5 KiB
JavaScript

$(function () {
$('.plotInfo, .plot-daybyday').each(function () {
var match = $(this).attr('id').match(/^plot_info_(\d+)_(\d+)_(\d+)$/);
$(this).qtip({
content: {
text: function(event, api) {
// deferred object ensuring the request is only made once
$.ajax({
url: $('#sbRoot').val() + '/home/plotDetails',
type: 'GET',
data: {
show: match[1],
episode: match[3],
season: match[2]
}
})
.then(function(content) {
// Set the tooltip content upon successful retrieval
api.set('content.text', content);
}, function(xhr, status, error) {
// Upon failure... set the tooltip content to the status and error value
api.set('content.text', status + ': ' + error);
});
return 'Loading...'; // Set initial text
}
},
show: {
solo: true
},
position: {
viewport: $(window),
my: 'left center',
adjust: {
y: -10,
x: 2
}
},
style: {
classes: 'qtip-rounded qtip-shadow'
}
});
});
});