Skip to content

Commit

Permalink
Merge zoggy's coming ep list view changes, resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
midgetspy committed Jan 17, 2011
2 parents 8349609 + 327afa5 commit a49de4e
Show file tree
Hide file tree
Showing 15 changed files with 211 additions and 12 deletions.
6 changes: 5 additions & 1 deletion data/css/browser.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#fileBrowserDialog {
max-height: 480;
overflow-y: auto;
}
#fileBrowserDialog ul {
margin: 0;
padding: 0;
Expand All @@ -20,5 +24,5 @@
float: left;
}
.browserDialog.busy .ui-dialog-buttonpane {
background: url(../images/loading.gif) 10px 50% no-repeat;
background: url("/images/loading.gif") 10px 50% no-repeat;
}
2 changes: 1 addition & 1 deletion data/css/comingEpisodes.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ h1.network {
}

.listing_default {
background-color: #e5e5e5;
background-color: #F5F1E4;
}

.listing_current {
Expand Down
5 changes: 5 additions & 0 deletions data/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ font-weight:700;
margin-top:-32px;
margin-right:5px;
}
.h2footer span {
padding:2px;
}

.separator {
font-size:90%;
Expand Down Expand Up @@ -242,6 +245,7 @@ z-index:3000;
border:1px solid #111;
background-color:#eee;
padding:5px;
margin-right:10px;
}

.progressbarText {
Expand Down Expand Up @@ -272,6 +276,7 @@ text-decoration:none;
}
tr.seasonheader a:hover {
background-color: #fff;
color:#000;
}

tr.unaired,span.unaired {
Expand Down
Binary file added data/images/forceBacklog20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/images/forceUpdate.png
Binary file not shown.
Binary file added data/images/forceUpdate32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/search32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 172 additions & 2 deletions data/interfaces/default/comingEpisodes.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,161 @@
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, "data/interfaces/default/inc_top.tmpl")

<div class="h2footer align-right">
<b>Key:</b>
<span class="listing_overdue">Past</span>
<span class="listing_current">Current</span>
<span class="listing_default">Future</span>
<span class="listing_toofar">Distant</span>
<span class="listing_unknown">Unknown</span>
</div><br/>

#if $sickbeard.USE_LISTVIEW:
<!-- start list view -->
<script type="text/javascript" src="$sbRoot/js/plotTooltip.js"></script>
<script type="text/javascript" charset="utf-8">
\$.tablesorter.addParser({
id: 'nextAirDate',
is: function(s) {
return false;
},
format: function(s) {
if (s == '')
return '9999-99-99';
else
return s;
},
type: 'text'
});

\$.tablesorter.addParser({
id: 'loadingNames',
is: function(s) {
return false;
},
format: function(s) {
if (s.indexOf('Loading...') == 0)
return s.replace('Loading...','!!!');
else if (s.indexOf('The ') == 0)
return s.replace('The ', '')
else if (s.indexOf('A ') == 0)
return s.replace('A ', '')
else
return s;
},
type: 'text'
});

\$.tablesorter.addParser({
id: 'quality',
is: function(s) {
return false;
},
format: function(s) {
return s.toLowerCase().replace('hd',3).replace('sd',1).replace('any',0).replace('best',2).replace('custom',4);
},
type: 'numeric'
});

//http://web.archive.org/web/20080801073104/http://www.jdempster.com/category/code/jquery/tablesortercookiewidget/
\$.tablesorter.addWidget({
id: 'cookie',
format: function(table) {
var sortList = table.config.sortList;
var tablesorterCookieJar = \$.cookieJar('tablesorter');
if ( sortList.length > 0) {
tablesorterCookieJar.set(\$(table).attr('id'), sortList);
} else {
var sortList = tablesorterCookieJar.get(\$(table).attr('id'));
if (sortList && sortList.length > 0) {
jQuery(table).trigger('sorton', [sortList]);
}
}
}
});

\$(document).ready(function(){

#set $sort_codes = {'date': 2, 'show': 3, 'network': 4}
#if $sort not in $sort_codes:
$sort = 'date'
#end if
sortList = [[$sort_codes[$sort],0]];

\$("#showListTable").tablesorter({
sortList: sortList,
headers: {
0: { sorter: false},
1: { sorter: false},
2: { sorter: 'nextAirDate' },
3: { sorter: 'loadingNames' },
4: { sorter: 'loadingNames' },
5: { sorter: 'quality' },
6: { sorter: 'status' },
7: { sorter: false},
8: { sorter: false}
}
});

});
</script>

#set $show_div = "listing_default"

<input type="hidden" id="sbRoot" value="$sbRoot" />

<table id="showListTable" class="sickbeardTable tablesorter" cellspacing="1" border="0" cellpadding="0">
<thead><tr><th>Next Ep</th><th>Next Ep Name</th><th>Airdate</th><th>Show</th><th>Network</th><th>Quality</th><th>Status</th><th>tvDB</th><th>Force</th></tr></thead>
<tbody>

#for $cur_result in $sql_results:

#set $cur_ep_airdate = int($cur_result["airdate"])
#if $cur_ep_airdate < $today:
#set $show_div = "listing_overdue"
#elif $cur_ep_airdate >= $next_week:
#set $show_div = "listing_toofar"
#elif $cur_ep_airdate >= $today and $cur_ep_airdate < $next_week:
#if $cur_ep_airdate == $today:
#set $show_div = "listing_current"
#else:
#set $show_div = "listing_default"
#end if
#end if

<!-- start $cur_result["show_name"] -->
<tr class="$show_div">
<td align="left"><%=str(cur_result["season"])+"x"+"%02i" % int(cur_result["episode"]) %>
#if $cur_result["description"] != "" and $cur_result["description"] != None:
<img alt="" src="$sbRoot/images/info32.png" height="16" class="plotInfo" id="plot_info_<%=str(cur_result["showid"])+"_"+str(cur_result["season"])+"_"+str(cur_result["episode"])%>" />
#end if
</td>
<td>$cur_result["name"]</td>
<td align="center" nowrap="nowrap">$datetime.date.fromordinal(int($cur_result["airdate"]))</td>
<td><a href="$sbRoot/home/displayShow?show=${cur_result["showid"]}">$cur_result["show_name"]</a>
#if int($cur_result["paused"]):
<span class="pause">[paused]</span>
#end if
</td>
<td align="center">$cur_result["network"]</td>
<td align="center">
#if int($cur_result["quality"]) in $qualityPresets:
$qualityPresetStrings[int($cur_result["quality"])]
#else:
Custom
#end if
</td>
<td align="center">$cur_result["show_status"]</td>
<td align="center"><a href="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}" onclick="window.open(this.href, '_blank'); return false;" title="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}"><img alt="[info]" height="20" width="20" src="$sbRoot/images/search32.png" /></a></td>
<td align="center"><a href="$sbRoot/home/searchEpisode?show=${cur_result["showid"]}&amp;season=$cur_result["season"]&amp;episode=$cur_result["episode"]" title="Force Update" id="forceUpdate|${cur_result["showid"]}|$cur_result["show_name"]" class="forceUpdate"><img alt="[update]" height="20" width="20" src="$sbRoot/images/forceUpdate32.png" id="forceUpdateImage|${cur_result["showid"]}" /></a></td>
</tr>
<!-- end $cur_result["show_name"] -->
#end for
</tbody>
</table>
<!-- end list view -->
#else:
<!-- start non list view -->
<div id="outsideWrapper">
<div id="insideWrapper">
<div id="insideContent">
Expand All @@ -19,7 +174,7 @@
#set $show_div = "ep_listing listing_default"

#if $sort == "show":
<br/>
<br/><br/>
#end if

#for $cur_result in $sql_results:
Expand All @@ -28,6 +183,18 @@
#if $sort == "network":
#if $cur_result["network"] and $cur_segment != $cur_result["network"]:
<br /><h1 class="network">$cur_result["network"]</h1>
#set $cur_ep_airdate = int($cur_result["airdate"])
#if $cur_ep_airdate < $today:
#set $show_div = "ep_listing listing_overdue"
#elif $cur_ep_airdate >= $next_week:
#set $show_div = "ep_listing listing_toofar"
#elif $cur_ep_airdate >= $today and $cur_ep_airdate < $next_week:
#if $cur_ep_airdate == $today:
#set $show_div = "ep_listing listing_current"
#else:
#set $show_div = "ep_listing listing_default"
#end if
#end if
#set $cur_segment = $cur_result["network"]
#end if
#elif $sort == "date":
Expand Down Expand Up @@ -63,7 +230,7 @@
<span class="pause">[paused]</span>
#end if
</a></span>
<span class="tvshowTitleIcons"><a href="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}" onclick="window.open(this.href, '_blank'); return false;" title="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}"><img alt="[info]" height="20" width="20" src="$sbRoot/images/info.png" /></a> <a href="$sbRoot/home/searchEpisode?show=${cur_result["showid"]}&amp;season=$cur_result["season"]&amp;episode=$cur_result["episode"]" title="Force Update" id="forceUpdate|${cur_result["showid"]}|$cur_result["show_name"]" class="forceUpdate"><img alt="[update]" height="20" width="20" src="$sbRoot/images/forceUpdate.png" id="forceUpdateImage|${cur_result["showid"]}" /></a></span>
<span class="tvshowTitleIcons"><a href="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}" onclick="window.open(this.href, '_blank'); return false;" title="http://www.thetvdb.com/?tab=series&amp;id=${cur_result["showid"]}"><img alt="[info]" height="20" width="20" src="$sbRoot/images/search32.png" /></a> <a href="$sbRoot/home/searchEpisode?show=${cur_result["showid"]}&amp;season=$cur_result["season"]&amp;episode=$cur_result["episode"]" title="Force Update" id="forceUpdate|${cur_result["showid"]}|$cur_result["show_name"]" class="forceUpdate"><img alt="[update]" height="20" width="20" src="$sbRoot/images/forceUpdate32.png" id="forceUpdateImage|${cur_result["showid"]}" /></a></span>
</th>
</tr>
<tr>
Expand Down Expand Up @@ -107,6 +274,9 @@
</div>
</div>
</div>
<!-- end non list view -->
#end if


<script type="text/javascript" charset="utf-8">
setInterval(window.location.reload, 180000); // Refresh every 3 minutes
Expand Down
2 changes: 1 addition & 1 deletion data/interfaces/default/displayShow.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ $epLoc
<td>$statusStrings[int($epResult["status"])]</td>
<td align="center">
#if int($epResult["season"]) != 0:
<a href="searchEpisode?show=$show.tvdbid&season=$epResult["season"]&episode=$epResult["episode"]"><img src="$sbRoot/images/info.png" height="16" alt="search"/></a>
<a href="searchEpisode?show=$show.tvdbid&season=$epResult["season"]&episode=$epResult["episode"]"><img src="$sbRoot/images/search32.png" height="16" alt="search"/></a>
#end if
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion data/interfaces/default/manage_backlogOverview.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
<td colspan="3">
<br/><a href="$sbRoot/home/displayShow?show=$curShow.tvdbid"><h2 style="display: inline;">$curShow.name</h2></a>
<div class="float-right">
<a href="$sbRoot/manage/backlogShow?tvdb_id=$curShow.tvdbid">Force Backlog</a>
<span class="wanted">Wanted: <b>$showCounts[$curShow.tvdbid][$Overview.WANTED]</b></span>
<span class="qual">Low Quality: <b>$showCounts[$curShow.tvdbid][$Overview.QUAL]</b></span>
<a href="$sbRoot/manage/backlogShow?tvdb_id=$curShow.tvdbid"><img alt="[force backlog]" height="20" src="$sbRoot/images/forceBacklog20.png" title="Force Backlog" style="position: relative; top:4px;"/></a>
</div>
</tr>

Expand Down
9 changes: 5 additions & 4 deletions data/js/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
fileBrowserDialog.dialog('option', 'dialogClass', 'browserDialog busy');
currentRequest = $.getJSON(endpoint, { path: path }, function(data){
fileBrowserDialog.empty();
$('<h1>').text(path).appendTo(fileBrowserDialog);
$('<h1">').text(path).appendTo(fileBrowserDialog);
list = $('<ul>').appendTo(fileBrowserDialog);
$.each(data, function(i, entry) {
link = $("<a href='javascript:void(0)' />").click(function(){ browse(entry.path, endpoint); }).text(entry.name);
Expand Down Expand Up @@ -48,9 +48,10 @@
fileBrowserDialog = $('<div id="fileBrowserDialog" style="display:hidden"></div>').appendTo('body').dialog({
dialogClass: 'browserDialog',
title: options.title,
position: ['center', 50],
width: 600,
height: 600,
position: ['center', 40],
minWidth: 400,
minHeight: 320,
height: $(document).height()-80,
modal: true,
autoOpen: false
});
Expand Down
Loading

0 comments on commit a49de4e

Please sign in to comment.