Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
027ae212
Commit
027ae212
authored
Sep 16, 2015
by
Alexis Tyler
Browse files
Options
Downloads
Patches
Plain Diff
Moved comingEpisodes js to own file, added metas block to main
parent
7e2bff9c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gui/slick/js/new/comingEpisodes.js
+79
-0
79 additions, 0 deletions
gui/slick/js/new/comingEpisodes.js
gui/slick/views/comingEpisodes.mako
+13
-120
13 additions, 120 deletions
gui/slick/views/comingEpisodes.mako
gui/slick/views/layouts/main.mako
+3
-0
3 additions, 0 deletions
gui/slick/views/layouts/main.mako
with
95 additions
and
120 deletions
gui/slick/js/new/comingEpisodes.js
0 → 100644
+
79
−
0
View file @
027ae212
if
(
$
(
'
meta[data-var="sickbeard.COMING_EPS_LAYOUT"]
'
).
data
(
'
content
'
)
==
'
list
'
){
$
.
tablesorter
.
addParser
({
id
:
'
loadingNames
'
,
is
:
function
(
s
)
{
return
false
},
format
:
function
(
s
)
{
if
(
0
==
s
.
indexOf
(
'
Loading...
'
)){
return
s
.
replace
(
'
Loading...
'
,
'
000
'
)
}
else
{
return
(
$
(
'
meta[data-var="sickbeard.SORT_ARTICLE"]
'
).
data
(
'
content
'
)
==
'
False
'
?
(
s
||
''
)
:
(
s
||
''
).
replace
(
/^
(
The|A|An
)\s
/i
,
''
));
}
},
type
:
'
text
'
});
$
.
tablesorter
.
addParser
({
id
:
'
quality
'
,
is
:
function
(
s
)
{
return
false
},
format
:
function
(
s
)
{
return
s
.
replace
(
'
hd1080p
'
,
5
).
replace
(
'
hd720p
'
,
4
).
replace
(
'
hd
'
,
3
).
replace
(
'
sd
'
,
2
).
replace
(
'
any
'
,
1
).
replace
(
'
best
'
,
0
).
replace
(
'
custom
'
,
7
)
},
type
:
'
numeric
'
});
$
.
tablesorter
.
addParser
({
id
:
'
cDate
'
,
is
:
function
(
s
)
{
return
false
},
format
:
function
(
s
)
{
return
s
},
type
:
'
numeric
'
});
}
$
(
document
).
ready
(
function
(){
if
(
$
(
'
meta[data-var="sickbeard.COMING_EPS_LAYOUT"]
'
).
data
(
'
content
'
)
==
'
list
'
){
var
sortCodes
=
{
'
date
'
:
0
,
'
show
'
:
1
,
'
network
'
:
4
};
var
sort
=
$
(
'
meta[data-var="sickbeard.COMING_EPS_SORT"]
'
).
data
(
'
content
'
);
var
sortList
=
(
sort
in
sortCodes
)
?
[[
sortCodes
[
sort
],
0
]]
:
[[
0
,
0
]];
$
(
'
#showListTable:has(tbody tr)
'
).
tablesorter
({
widgets
:
[
'
stickyHeaders
'
],
sortList
:
sortList
,
textExtraction
:
{
0
:
function
(
node
)
{
return
$
(
node
).
find
(
'
span
'
).
text
().
toLowerCase
()
},
5
:
function
(
node
)
{
return
$
(
node
).
find
(
'
span
'
).
text
().
toLowerCase
()
}
},
headers
:
{
0
:
{
sorter
:
'
cDate
'
},
1
:
{
sorter
:
'
loadingNames
'
},
2
:
{
sorter
:
false
},
3
:
{
sorter
:
false
},
4
:
{
sorter
:
'
loadingNames
'
},
5
:
{
sorter
:
'
quality
'
},
6
:
{
sorter
:
false
},
7
:
{
sorter
:
false
},
8
:
{
sorter
:
false
}
}
});
$
(
'
#sbRoot
'
).
ajaxEpSearch
();
}
if
(
$
(
'
meta[data-var="sickbeard.COMING_EPS_LAYOUT"]
'
).
data
(
'
content
'
)
==
'
banner
'
||
$
(
'
meta[data-var="sickbeard.COMING_EPS_LAYOUT"]
'
).
data
(
'
content
'
)
==
'
poster
'
){
$
(
'
#sbRoot
'
).
ajaxEpSearch
({
'
size
'
:
16
,
'
loadingImage
'
:
'
loading16
'
+
themeSpinner
+
'
.gif
'
});
$
(
'
.ep_summary
'
).
hide
();
$
(
'
.ep_summaryTrigger
'
).
click
(
function
()
{
$
(
this
).
next
(
'
.ep_summary
'
).
slideToggle
(
'
normal
'
,
function
()
{
$
(
this
).
prev
(
'
.ep_summaryTrigger
'
).
attr
(
'
src
'
,
function
(
i
,
src
)
{
return
$
(
this
).
next
(
'
.ep_summary
'
).
is
(
'
:visible
'
)
?
src
.
replace
(
'
plus
'
,
'
minus
'
)
:
src
.
replace
(
'
minus
'
,
'
plus
'
)
});
});
});
}
});
window
.
setInterval
(
'
location.reload(true)
'
,
600000
);
// Refresh every 10 minutes
This diff is collapsed.
Click to expand it.
gui/slick/views/comingEpisodes.mako
+
13
−
120
View file @
027ae212
...
...
@@ -7,124 +7,14 @@
import time
import re
%>
<%block name="metas">
<meta data-var="sickbeard.COMING_EPS_SORT" data-content="${sickbeard.COMING_EPS_SORT}">
<meta data-var="sickbeard.COMING_EPS_LAYOUT" data-content="${sickbeard.COMING_EPS_LAYOUT}">
</%block>
<%block name="scripts">
<% fuzzydate = 'airdate' %>
<% sort = sickbeard.COMING_EPS_SORT %>
<script type="text/javascript" src="${sbRoot}/js/ajaxEpSearch.js?${sbPID}"></script>
% if 'list' == layout:
<script type="text/javascript" src="${sbRoot}/js/plotTooltip.js?${sbPID}"></script>
<script type="text/javascript" charset="utf-8">
$.tablesorter.addParser({
id: 'loadingNames',
is: function(s) {
return false
},
format: function(s) {
if (0 == s.indexOf('Loading...'))
return s.replace('Loading...', '000')
% if not sickbeard.SORT_ARTICLE:
return (s || '').replace(/^(The|A|An)\s/i, '')
% else:
return (s || '')
% endif
},
type: 'text'
});
$.tablesorter.addParser({
id: 'quality',
is: function(s) {
return false
},
format: function(s) {
return s.replace('hd1080p', 5).replace('hd720p', 4).replace('hd', 3).replace('sd', 2).replace('any', 1).replace('best', 0).replace('custom', 7)
},
type: 'numeric'
});
$.tablesorter.addParser({
id: 'cDate',
is: function(s) {
return false
},
format: function(s) {
return s
},
type: 'numeric'
});
$(document).ready(function(){
<% sort_codes = {'date': 0, 'show': 1, 'network': 4} %>
% if sort not in sort_codes:
<% sort = 'date' %>
% endif
sortList = [[${sort_codes[sort]}, 0]];
$('#showListTable:has(tbody tr)').tablesorter({
widgets: ['stickyHeaders'],
sortList: sortList,
textExtraction: {
0: function(node) { return $(node).find('span').text().toLowerCase() },
5: function(node) { return $(node).find('span').text().toLowerCase() }
},
headers: {
0: { sorter: 'cDate' },
1: { sorter: 'loadingNames' },
2: { sorter: false },
3: { sorter: false },
4: { sorter: 'loadingNames' },
5: { sorter: 'quality' },
6: { sorter: false },
7: { sorter: false },
8: { sorter: false }
}
});
$('#sbRoot').ajaxEpSearch();
<% fuzzydate = 'airdate' %>
% if sickbeard.FUZZY_DATING:
fuzzyMoment({
containerClass : '.${fuzzydate}',
dateHasTime : true,
dateFormat : '${sickbeard.DATE_PRESET}',
timeFormat : '${sickbeard.TIME_PRESET}',
trimZero : ${('false', 'true')[bool(sickbeard.TRIM_ZERO)]}
});
% endif
});
</script>
% elif layout in ['banner', 'poster']:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#sbRoot').ajaxEpSearch({'size': 16, 'loadingImage': 'loading16' + themeSpinner + '.gif'});
$('.ep_summary').hide();
$('.ep_summaryTrigger').click(function() {
$(this).next('.ep_summary').slideToggle('normal', function() {
$(this).prev('.ep_summaryTrigger').attr('src', function(i, src) {
return $(this).next('.ep_summary').is(':visible') ? src.replace('plus','minus') : src.replace('minus','plus')
});
});
});
% if sickbeard.FUZZY_DATING:
fuzzyMoment({
dtInline : true,
dtGlue : ' at ',
containerClass : '.${fuzzydate}',
dateHasTime : true,
dateFormat : '${sickbeard.DATE_PRESET}',
timeFormat : '${sickbeard.TIME_PRESET}',
trimZero : ${('false', 'true')[bool(sickbeard.TRIM_ZERO)]}
});
% endif
});
</script>
% endif
<script type="text/javascript" charset="utf-8">
window.setInterval('location.reload(true)', 600000); // Refresh every 10 minutes
</script>
<script type="text/javascript" src="${sbRoot}/js/new/comingEpisodes.js"></script>
</%block>
<%block name="css">
<style type="text/css">
...
...
@@ -225,11 +115,15 @@ window.setInterval('location.reload(true)', 600000); // Refresh every 10 minutes
show_div = 'listing-default'
%>
<!-- start ${cur_result['show_name']} //-->
<tr class="${show_div}">
## forced to use a div to wrap airdate, the column sort went crazy with a span
<td align="center" nowrap="nowrap">
<div class="${fuzzydate}">${sbdatetime.sbdatetime.sbfdatetime(cur_result['localtime']).decode(sickbeard.SYS_ENCODING)}</div><span class="sort_data">${time.mktime(cur_result['localtime'].timetuple())}</span>
<% airDate = sbdatetime.sbdatetime.sbfdatetime(cur_result['localtime']).decode(sickbeard.SYS_ENCODING) %>
<% isoDate = sbdatetime.sbdatetime.convert_to_setting(cur_result['localtime']).isoformat('T') %>
<span class="${fuzzydate}">
<time datetime="${isoDate}" class="date">${airDate}</time>
</span>
<span class="sort_data">${time.mktime(cur_result['localtime'].timetuple())}</span>
</td>
<td class="tvShow" nowrap="nowrap"><a href="${sbRoot}/home/displayShow?show=${cur_result['showid']}">${cur_result['show_name']}</a>
...
...
@@ -270,7 +164,6 @@ window.setInterval('location.reload(true)', 600000); // Refresh every 10 minutes
<a href="${sbRoot}/home/searchEpisode?show=${cur_result['showid']}&season=${cur_result['season']}&episode=${cur_result['episode']}" title="Manual Search" id="forceUpdate-${cur_result['showid']}x${cur_result['season']}x${cur_result['episode']}" class="forceUpdate epSearch"><img alt="[search]" height="16" width="16" src="${sbRoot}/images/search16.png" id="forceUpdateImage-${cur_result['showid']}" /></a>
</td>
</tr>
<!-- end ${cur_result['show_name']} //-->
% endfor
</tbody>
...
...
...
...
This diff is collapsed.
Click to expand it.
gui/slick/views/layouts/main.mako
+
3
−
0
View file @
027ae212
...
...
@@ -43,6 +43,9 @@
<meta
name=
"msapplication-TileImage"
content=
"${sbRoot}/images/ico/favicon-144.png"
>
<meta
name=
"msapplication-config"
content=
"${sbRoot}/css/browserconfig.xml"
>
<meta
data-var=
"sickbeard.FUZZY_DATING"
data-content=
"${sickbeard.FUZZY_DATING}"
>
<
%
block
name=
"metas"
/>
<link
rel=
"shortcut icon"
href=
"${sbRoot}/images/ico/favicon.ico"
>
<link
rel=
"icon"
sizes=
"16x16 32x32 64x64"
href=
"${sbRoot}/images/ico/favicon.ico"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"196x196"
href=
"${sbRoot}/images/ico/favicon-196.png"
>
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment