Add banner/description tooltip

This commit is contained in:
kaso17 2016-12-20 11:50:04 +01:00
parent 0913ee4934
commit f155a21ee8
3 changed files with 28 additions and 2 deletions

View File

@ -234,4 +234,13 @@ pre {
.label-imdb { .label-imdb {
background-color: #d0ab44; background-color: #d0ab44;
}
.tooltip-inner {
max-width: 500px !important;
}
.tooltip-inner img {
max-width: 250px;
height: auto;
} }

View File

@ -492,10 +492,27 @@ function clearNotifications() {
function updateReleasesRow(row) function updateReleasesRow(row)
{ {
var labels = $(row).find("span.release-labels"); var labels = $(row).find("span.release-labels");
var TitleLink = $(row).find("td.Title > a");
var IMDBId = $(row).data("imdb"); var IMDBId = $(row).data("imdb");
var Banner = $(row).data("banner");
var Description = $(row).data("description");
var DownloadVolumeFactor = parseFloat($(row).find("td.DownloadVolumeFactor").html()); var DownloadVolumeFactor = parseFloat($(row).find("td.DownloadVolumeFactor").html());
var UploadVolumeFactor = parseFloat($(row).find("td.UploadVolumeFactor").html()); var UploadVolumeFactor = parseFloat($(row).find("td.UploadVolumeFactor").html());
var TitleTooltip = "";
if (Banner)
TitleTooltip += "<img src='" + Banner + "' /><br />";
if (Description)
TitleTooltip += Description;
if (TitleTooltip) {
TitleLink.data("toggle", "tooltip");
TitleLink.tooltip({
title: TitleTooltip,
html: true
});
}
labels.empty(); labels.empty();
if (IMDBId) { if (IMDBId) {

View File

@ -400,11 +400,11 @@
</thead> </thead>
<tbody> <tbody>
{{#each Results}} {{#each Results}}
<tr class="jackett-search-results-row" data-imdb="{{Imdb}}"> <tr class="jackett-search-results-row" data-imdb="{{Imdb}}" data-banner="{{BannerUrl}}" data-description="{{Description}}">
<td>{{PublishDate}}</td> <td>{{PublishDate}}</td>
<td>{{jacketTimespan PublishDate}}</td> <td>{{jacketTimespan PublishDate}}</td>
<td>{{Tracker}}</td> <td>{{Tracker}}</td>
<td><a href="{{Comments}}">{{Title}}</a> <span class="release-labels"></span></td> <td class="Title"><a href="{{Comments}}">{{Title}}</a> <span class="release-labels"></span></td>
<td>{{Size}}</td> <td>{{Size}}</td>
<td>{{jacketSize Size}}</td> <td>{{jacketSize Size}}</td>
<td>{{Files}}</td> <td>{{Files}}</td>