Overhaul all Add Show pages.

This commit is contained in:
JackDandy 2014-11-20 22:25:33 +00:00 committed by JackDandy
parent c7966313b2
commit c8c1a07f85
19 changed files with 1228 additions and 1308 deletions

View file

@ -22,6 +22,7 @@
* Fix visual positioning of sprites on Config page * Fix visual positioning of sprites on Config page
* Fix missing navbar gradients for all browsers * Fix missing navbar gradients for all browsers
* Update qTip2 to v2.2.1 * Update qTip2 to v2.2.1
* Overhaul all Add Show pages
[develop changelog] [develop changelog]
* Add TVRage network name standardization * Add TVRage network name standardization

View file

@ -773,122 +773,38 @@ td.tvShow a:hover {
/* ======================================================================= /* =======================================================================
home_addShows.tmpl home_addShows.tmpl
========================================================================== */ ========================================================================== */
#addShowPortal {
width: 700px;
padding: 10px 0;
margin-right: auto;
margin-left: auto;
}
#addShowPortal a {
padding: 10px;
}
div.button {
display: table-cell;
vertical-align: middle;
padding-left: 10px;
}
div.buttontext {
display: table-cell;
padding-left: 20px;
text-align: left;
white-space: normal;
}
div.buttontext h3 {
margin-top: 10px;
}
div.buttontext p {
font-size: 13px;
}
.icon-addnewshow { .icon-addnewshow {
background-image: url("../images/addshows/add-new32-white.png"); background-image: url("../images/addshows/add-new32-white.png");
width: 32px;
height: 32px;
} }
.icon-addtrendingshow { .icon-addtrendingshow {
background-image: url("../images/addshows/add-trending32-white.png"); background-image: url("../images/addshows/add-trending32-white.png");
width: 32px;
height: 32px;
} }
.icon-addrecommendedshow { .icon-addrecommendedshow {
background-image: url("../images/addshows/add-trakt32-white.png"); background-image: url("../images/addshows/add-trakt32-white.png");
width: 32px;
height: 32px;
} }
.icon-addexistingshow { .icon-addexistingshow {
background-image: url("../images/addshows/add-existing32-white.png"); background-image: url("../images/addshows/add-existing32-white.png");
width: 32px;
height: 32px;
} }
/* ======================================================================= /* =======================================================================
home_newShow.tmpl home_newShow.tmpl
========================================================================== */ ========================================================================== */
#addShowForm, #recommendedShowsForm {
margin-left: auto;
margin-right: auto;
}
#newShowPortal {
width: 800px;
padding: 10px 0;
margin-right: auto;
margin-left: auto;
}
#displayText { #displayText {
padding: 8px; background-color: rgb(17, 120, 179);
overflow: hidden; border: 0;
font-size: 14px;
background-color: #3d3d3d;
border: 1px solid #111;
}
#searchResults input[type="radio"] {
vertical-align: -2px;
} }
/* ======================================================================= /* =======================================================================
home_addExistingShow.tmpl home_addExistingShow.tmpl
========================================================================== */ ========================================================================== */
.existingtabs {
padding: 1em 1.4em;
}
ul#rootDirStaticList {
width: 90%;
margin-right: auto;
margin-left: auto;
text-align: left;
}
ul#rootDirStaticList li { ul#rootDirStaticList li {
padding: 4px 5px 4px 5px;
margin: 2px;
list-style: none outside none;
cursor: pointer;
background: #3d3d3d; background: #3d3d3d;
} }
ul#rootDirStaticList li label {
margin-top: 5px;
margin-bottom: 5px;
}
ul#rootDirStaticList li input[type="checkbox"] {
vertical-align: -2px;
}
/* ======================================================================= /* =======================================================================
home_trendingShows.tmpl home_trendingShows.tmpl
========================================================================== */ ========================================================================== */
@ -1834,11 +1750,6 @@ body {
background-color: #222; background-color: #222;
} }
html * {
outline: 0 !important;
}
input[type="radio"] { input[type="radio"] {
margin: 2px 0px 0px; margin: 2px 0px 0px;
line-height: normal; line-height: normal;
@ -2002,12 +1913,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
color: #000000; color: #000000;
} }
.form-control-inline {
min-width: 0;
width: auto;
display: inline;
}
.btn { .btn {
color: #fff; color: #fff;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.75); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.75);
@ -2052,7 +1957,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.btn:hover { .btn:hover {
color: #fff; color: #fff;
text-decoration: none;
background-color: #2672B6; background-color: #2672B6;
*background-color: #2672B6; *background-color: #2672B6;
background-position: 0 -150px; background-position: 0 -150px;
@ -2085,8 +1989,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.btn.disabled, .btn.disabled,
.btn[disabled] { .btn[disabled] {
cursor: default; cursor: default;
background-color: #15528F; background: #15528F none;
background-image: none;
opacity: 0.65; opacity: 0.65;
filter: alpha(opacity=65); filter: alpha(opacity=65);
-webkit-box-shadow: none; -webkit-box-shadow: none;
@ -2094,19 +1997,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
box-shadow: none; box-shadow: none;
} }
.btn-large {
padding: 9px 14px;
font-size: 15px;
line-height: normal;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.btn-large [class^="icon-"] {
margin-top: 1px;
}
.btn-small { .btn-small {
padding: 5px 9px; padding: 5px 9px;
font-size: 11px; font-size: 11px;
@ -2368,58 +2258,12 @@ input sizing (for config pages)
========================================================================== */ ========================================================================== */
#editAProvider optgroup { #editAProvider optgroup {
color: #eee; color: #eee;
background-color: rgb(51, 51, 51); background-color: rgb(51, 51, 51);
} }
#editAProvider optgroup option { #editAProvider optgroup option {
color: #222; color: #222;
background-color: #fff; background-color: #fff;
}
#config select {
min-width: 0;
width: auto;
display: inline;
margin-top: -4px;
}
.btn-inline {
margin-top: -3px;
}
.input75 {
width: 75px;
margin-top: -4px;
}
.input100 {
width: 100px;
margin-top: -4px;
}
.input150 {
width: 150px;
margin-top: -4px;
}
.input200 {
width: 200px;
margin-top: -4px;
}
.input250 {
width: 250px;
margin-top: -4px;
}
.input300 {
width: 300px;
margin-top: -4px;
}
.input350 {
width: 350px;
margin-top: -4px;
} }
/* ======================================================================= /* =======================================================================
@ -2498,92 +2342,31 @@ browser.css
/* ======================================================================= /* =======================================================================
formWizard.css formWizard
========================================================================== */ ========================================================================== */
.step,
fieldset.sectionwrap {
width: 800px;
padding: 5px;
text-align: left;
border-width: 0;
}
legend.legendStep { legend.legendStep {
color: #ffffff; color: #ffffff;
margin-bottom: 0px;
}
div.stepsguide {
margin-bottom: 15px;
overflow: hidden;
text-align: left;
cursor: pointer;
}
div.stepsguide .step {
float: left;
width: 266px;
font: bold 24px Arial;
} }
div.stepsguide .step p { div.stepsguide .step p {
margin: 12px 0; border-color: #23AFDC;
border-bottom: 4px solid #23AFDC;
} }
div.stepsguide .disabledstep { .disabledstep {
color: #c4c4c4; color: #646464;
} }
div.stepsguide .disabledstep p { div.stepsguide .disabledstep p {
border-bottom: 4px solid #1178B3; border-color: #1178B3;
}
div.stepsguide .step .smalltext {
font-size: 13px;
font-weight: normal;
}
div.formpaginate {
width: 800px;
margin-top: 1em;
overflow: auto;
font-weight: bold;
text-align: center;
} }
div.formpaginate .prev, div.formpaginate .next { div.formpaginate .prev, div.formpaginate .next {
padding: 3px 6px;
color: #fff; color: #fff;
cursor: hand;
cursor: pointer;
background: #2265A1; background: #2265A1;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
} }
.stepDiv {
padding: 15px;
}
/* step 3 related */
#customQuality {
display: block;
padding: 10px 0;
overflow: hidden;
clear: both;
}
#customQualityWrapper div.component-group-desc {
float: left;
width: 165px;
}
#customQualityWrapper div.component-group-desc p { #customQualityWrapper div.component-group-desc p {
width: 85%;
margin: .8em 0;
font-size: 1.2em;
color: #666; color: #666;
} }
@ -2629,10 +2412,7 @@ tablesorter.css
.tablesorter th, .tablesorter th,
.tablesorter td { .tablesorter td {
padding: 4px; border-color: #222;
border-top: #222 1px solid;
border-left: #222 1px solid;
vertical-align: middle;
} }
/* remove extra border from left edge */ /* remove extra border from left edge */
@ -2643,31 +2423,22 @@ tablesorter.css
.tablesorter th { .tablesorter th {
color: #fff; color: #fff;
text-align: center;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3); text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
background-color: #15528F; background-color: #15528F;
border-collapse: collapse;
font-weight: normal;
} }
.tablesorter .tablesorter-header { .tablesorter .tablesorter-header {
padding: 4px 18px 4px 18px; background: #15528F url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==) no-repeat center right;
cursor: pointer;
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
background-position: center right;
background-repeat: no-repeat;
/* background-image: url(../images/tablesorter/bg.gif); */ /* background-image: url(../images/tablesorter/bg.gif); */
} }
.tablesorter thead .tablesorter-headerDesc { .tablesorter thead .tablesorter-headerDesc {
background-color: #297AB8; background: #297AB8 url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7) no-repeat center right;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* background-image: url(../images/tablesorter/asc.gif); */ /* background-image: url(../images/tablesorter/asc.gif); */
} }
.tablesorter thead .tablesorter-headerAsc { .tablesorter thead .tablesorter-headerAsc {
background-color: #297AB8; background: #297AB8 url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7) no-repeat center right;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* background-image: url(../images/tablesorter/desc.gif); */ /* background-image: url(../images/tablesorter/desc.gif); */
} }
@ -2730,10 +2501,9 @@ thead.tablesorter-stickyHeader {
.tablesorter tfoot a { .tablesorter tfoot a {
color:#fff; color:#fff;
text-decoration: none;
} }
#showListTable tbody { #showListTable tbody {
color: #000; color: #000;
} }
@ -2872,6 +2642,25 @@ span.token-input-delete-token {
margin: 0 1px; margin: 0 1px;
} }
.step-one #searchResults .alt {
background-color: rgb(40, 40, 40);
}
#addRootDirTable td label .filepath,
.grey-text {
color:#999
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest,
#newShowPortal #displayText p {
color: rgb(200, 200, 200)
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest {
color: rgb(255, 255, 255)
}
/* ======================================================================= /* =======================================================================
jquery.confirm.css jquery.confirm.css
========================================================================== */ ========================================================================== */

View file

@ -760,122 +760,38 @@ td.tvShow a:hover {
/* ======================================================================= /* =======================================================================
home_addShows.tmpl home_addShows.tmpl
========================================================================== */ ========================================================================== */
#addShowPortal {
width: 700px;
padding: 10px 0;
margin-right: auto;
margin-left: auto;
}
#addShowPortal a {
padding: 10px;
}
div.button {
display: table-cell;
vertical-align: middle;
padding-left: 10px;
}
div.buttontext {
display: table-cell;
padding-left: 20px;
text-align: left;
white-space: normal;
}
div.buttontext h3 {
margin-top: 10px;
}
div.buttontext p {
font-size: 13px;
}
.icon-addnewshow { .icon-addnewshow {
background-image: url("../images/addshows/add-new32-black.png"); background-image: url("../images/addshows/add-new32-black.png");
width: 32px;
height: 32px;
} }
.icon-addtrendingshow { .icon-addtrendingshow {
background-image: url("../images/addshows/add-trending32-black.png"); background-image: url("../images/addshows/add-trending32-black.png");
width: 32px;
height: 32px;
} }
.icon-addrecommendedshow { .icon-addrecommendedshow {
background-image: url("../images/addshows/add-trakt32-black.png"); background-image: url("../images/addshows/add-trakt32-black.png");
width: 32px;
height: 32px;
} }
.icon-addexistingshow { .icon-addexistingshow {
background-image: url("../images/addshows/add-existing32-black.png"); background-image: url("../images/addshows/add-existing32-black.png");
width: 32px;
height: 32px;
} }
/* ======================================================================= /* =======================================================================
home_newShow.tmpl home_newShow.tmpl
========================================================================== */ ========================================================================== */
#addShowForm, #recommendedShowsForm {
margin-left: auto;
margin-right: auto;
}
#newShowPortal {
width: 800px;
padding: 10px 0;
margin-right: auto;
margin-left: auto;
}
#displayText { #displayText {
padding: 8px;
overflow: hidden;
font-size: 14px;
background-color: #efefef; background-color: #efefef;
border: 1px solid #dfdede; border-color: #dfdede;
}
#searchResults input[type="radio"] {
vertical-align: -2px;
} }
/* ======================================================================= /* =======================================================================
home_addExistingShow.tmpl home_addExistingShow.tmpl
========================================================================== */ ========================================================================== */
.existingtabs {
padding: 1em 1.4em;
}
ul#rootDirStaticList {
width: 90%;
margin-right: auto;
margin-left: auto;
text-align: left;
}
ul#rootDirStaticList li { ul#rootDirStaticList li {
padding: 4px 5px 4px 5px;
margin: 2px;
list-style: none outside none;
cursor: pointer;
background: url('../css/lib/images/ui-bg_highlight-soft_75_efefef_1x100.png') repeat-x scroll 50% 50% #EFEFEF; background: url('../css/lib/images/ui-bg_highlight-soft_75_efefef_1x100.png') repeat-x scroll 50% 50% #EFEFEF;
} }
ul#rootDirStaticList li label {
margin-top: 5px;
margin-bottom: 5px;
}
ul#rootDirStaticList li input[type="checkbox"] {
vertical-align: -2px;
}
/* ======================================================================= /* =======================================================================
home_trendingShows.tmpl home_trendingShows.tmpl
========================================================================== */ ========================================================================== */
@ -1813,10 +1729,6 @@ body {
color: #000; color: #000;
} }
html * {
outline: 0 !important;
}
input[type="radio"] { input[type="radio"] {
margin: 2px 0px 0px; margin: 2px 0px 0px;
line-height: normal; line-height: normal;
@ -2027,7 +1939,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.btn:hover { .btn:hover {
color: #333333; color: #333333;
text-decoration: none;
background-color: #e6e6e6; background-color: #e6e6e6;
*background-color: #d9d9d9; *background-color: #d9d9d9;
background-position: 0 -15px; background-position: 0 -15px;
@ -2058,8 +1969,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.btn.disabled, .btn.disabled,
.btn[disabled] { .btn[disabled] {
cursor: default; cursor: default;
background-color: #e6e6e6; background: #e6e6e6 none;
background-image: none;
opacity: 0.65; opacity: 0.65;
filter: alpha(opacity=65); filter: alpha(opacity=65);
-webkit-box-shadow: none; -webkit-box-shadow: none;
@ -2067,19 +1977,6 @@ fieldset[disabled] .navbar-default .btn-link:focus {
box-shadow: none; box-shadow: none;
} }
.btn-large {
padding: 9px 14px;
font-size: 15px;
line-height: normal;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.btn-large [class^="icon-"] {
margin-top: 1px;
}
.btn-small { .btn-small {
padding: 5px 9px; padding: 5px 9px;
font-size: 11px; font-size: 11px;
@ -2341,58 +2238,12 @@ input sizing (for config pages)
========================================================================== */ ========================================================================== */
#editAProvider optgroup { #editAProvider optgroup {
color: #eee; color: #eee;
background-color: #888; background-color: #888;
} }
#editAProvider optgroup option { #editAProvider optgroup option {
color: #222; color: #222;
background-color: #fff; background-color: #fff;
}
#config select {
min-width: 0;
width: auto;
display: inline;
margin-top: -4px;
}
.btn-inline {
margin-top: -3px;
}
.input75 {
width: 75px;
margin-top: -4px;
}
.input100 {
width: 100px;
margin-top: -4px;
}
.input150 {
width: 150px;
margin-top: -4px;
}
.input200 {
width: 200px;
margin-top: -4px;
}
.input250 {
width: 250px;
margin-top: -4px;
}
.input300 {
width: 300px;
margin-top: -4px;
}
.input350 {
width: 350px;
margin-top: -4px;
} }
/* ======================================================================= /* =======================================================================
@ -2470,92 +2321,31 @@ browser.css
/* ======================================================================= /* =======================================================================
formWizard.css formWizard
========================================================================== */ ========================================================================== */
.step,
fieldset.sectionwrap {
width: 800px;
padding: 5px;
text-align: left;
border-width: 0;
}
legend.legendStep { legend.legendStep {
color: #57442b; color: #57442b;
margin-bottom: 0px;
}
div.stepsguide {
margin-bottom: 15px;
overflow: hidden;
text-align: left;
cursor: pointer;
}
div.stepsguide .step {
float: left;
width: 266px;
font: bold 24px Arial;
} }
div.stepsguide .step p { div.stepsguide .step p {
margin: 12px 0; border-color: #57442b;
border-bottom: 4px solid #57442b;
} }
div.stepsguide .disabledstep { .disabledstep {
color: #c4c4c4; color: #c4c4c4;
} }
div.stepsguide .disabledstep p { div.stepsguide .disabledstep p {
border-bottom: 4px solid #8a775e; border-color: #8a775e;
}
div.stepsguide .step .smalltext {
font-size: 13px;
font-weight: normal;
}
div.formpaginate {
width: 800px;
margin-top: 1em;
overflow: auto;
font-weight: bold;
text-align: center;
} }
div.formpaginate .prev, div.formpaginate .next { div.formpaginate .prev, div.formpaginate .next {
padding: 3px 6px;
color: #fff; color: #fff;
cursor: hand;
cursor: pointer;
background: #57442b; background: #57442b;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
} }
.stepDiv {
padding: 15px;
}
/* step 3 related */
#customQuality {
display: block;
padding: 10px 0;
overflow: hidden;
clear: both;
}
#customQualityWrapper div.component-group-desc {
float: left;
width: 165px;
}
#customQualityWrapper div.component-group-desc p { #customQualityWrapper div.component-group-desc p {
width: 85%;
margin: .8em 0;
font-size: 1.2em;
color: #666; color: #666;
} }
@ -2575,10 +2365,7 @@ tablesorter.css
.tablesorter th, .tablesorter th,
.tablesorter td { .tablesorter td {
padding: 4px; border-color: #fff;
border-top: #fff 1px solid;
border-left: #fff 1px solid;
vertical-align: middle;
} }
/* remove extra border from left edge */ /* remove extra border from left edge */
@ -2589,32 +2376,23 @@ tablesorter.css
.tablesorter th { .tablesorter th {
color: #fff; color: #fff;
text-align: center;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3); text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
background-color: #333; background-color: #333;
border-collapse: collapse;
font-weight: normal;
} }
.tablesorter .tablesorter-header { .tablesorter .tablesorter-header {
padding: 4px 18px 4px 18px; background: #333 url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==) no-repeat center right;
cursor: pointer;
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==);
background-position: center right;
background-repeat: no-repeat;
/* background-image: url(../images/tablesorter/bg.gif); */ /* background-image: url(../images/tablesorter/bg.gif); */
} }
.tablesorter thead .tablesorter-headerDesc { .tablesorter thead .tablesorter-headerDesc {
background-color: #555; background: #555 url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7) no-repeat center right;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* background-image: url(../images/tablesorter/asc.gif); */ /* background-image: url(../images/tablesorter/asc.gif); */
} }
.tablesorter thead .tablesorter-headerAsc { .tablesorter thead .tablesorter-headerAsc {
background-color: #555; background: #555 url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7) no-repeat center right;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7); /* background-image: url(../images/tablesorter/desc.gif); */
/* background-image: url(../images/tablesorter/desc.gif); */
} }
.tablesorter thead .sorter-false { .tablesorter thead .sorter-false {
@ -2676,7 +2454,6 @@ thead.tablesorter-stickyHeader {
.tablesorter tfoot a { .tablesorter tfoot a {
color:#fff; color:#fff;
text-decoration: none;
} }
/* ======================================================================= /* =======================================================================
@ -2813,6 +2590,25 @@ span.token-input-delete-token {
margin: 0 1px; margin: 0 1px;
} }
.step-one #searchResults .alt {
background-color: rgb(245, 245, 245);
}
#addRootDirTable td label .filepath,
.grey-text {
color:#666
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest,
#newShowPortal #displayText p {
color: rgb(153, 153, 153);
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest {
color: rgb(87, 68, 43);
}
/* ======================================================================= /* =======================================================================
jquery.confirm.css jquery.confirm.css
========================================================================== */ ========================================================================== */

View file

@ -511,7 +511,6 @@ home.tmpl
border: 1px solid #ccc; border: 1px solid #ccc;
overflow: hidden; overflow: hidden;
height: 66px; height: 66px;
overflow: hidden;
border-radius: 8px; border-radius: 8px;
vertical-align: top; vertical-align: top;
width: 360px; width: 360px;
@ -792,31 +791,42 @@ home_addShows.tmpl
========================================================================== */ ========================================================================== */
#addShowPortal { #addShowPortal {
width: 700px; width: 750px;
padding: 10px 0; padding: 10px 0;
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
} }
#addShowPortal a { #addShowPortal a {
padding: 10px; /* padding: 10px;*/
padding: 0px 20px;
width: 360px;
float: left;
margin: 0 15px 15px 0;
} }
div.button { div.button {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
padding-left: 10px; /* padding-left: 10px;*/
} }
div.buttontext { div.buttontext {
display: table-cell; display: table-cell;
/*
padding-left: 20px; padding-left: 20px;
padding: 10px 15px;
*/
padding: 10px 0px 10px 15px;
text-align: left; text-align: left;
white-space: normal; white-space: normal;
} }
div.buttontext p {
margin: 0
}
div.buttontext h3 { div.buttontext h3 {
margin-top: 10px; margin-top: 0px;
} }
div.buttontext p { div.buttontext p {
@ -850,13 +860,19 @@ div.buttontext p {
/* ======================================================================= /* =======================================================================
home_newShow.tmpl home_newShow.tmpl
========================================================================== */ ========================================================================== */
#addShowForm, #recommendedShowsForm { #addShowForm,
#newShowPortal,
fieldset.sectionwrap,
div.formpaginate {
width: 801px
}
#addShowForm {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
#newShowPortal { #newShowPortal {
width: 800px;
padding: 10px 0; padding: 10px 0;
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
@ -866,20 +882,44 @@ home_newShow.tmpl
padding: 8px; padding: 8px;
overflow: hidden; overflow: hidden;
font-size: 14px; font-size: 14px;
background-color: #efefef; border: 1px solid;
border: 1px solid #dfdede;
} }
#searchResults input[type="radio"] { #searchResults input[type="radio"] {
vertical-align: -2px; vertical-align: -2px;
} }
#addShowForm #promptForSettings,
#addShowForm #rootDirStaticList input,
#addShowForm div.field-pair input,
#addShowForm div.field-pair select {
margin-right: 6px;
}
#addShowForm #customQualityWrapper div.component-group-desc p {
font-size: 14px;
}
#addShowForm #nameToSearch {
width: 460px;
margin-top: 0
}
#addShowForm #providedIndexer,
#addShowForm #indexerLangSelect {
margin-left: 7px
}
#addShowForm #searchName {
margin-left: 10px
}
/* ======================================================================= /* =======================================================================
home_addExistingShow.tmpl home_addExistingShow.tmpl
========================================================================== */ ========================================================================== */
.existingtabs { .existingtabs {
padding: 1em 1.4em; padding: 20px;
} }
ul#rootDirStaticList { ul#rootDirStaticList {
@ -887,14 +927,15 @@ ul#rootDirStaticList {
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
text-align: left; text-align: left;
list-style-type: none;
padding: 0
} }
ul#rootDirStaticList li { ul#rootDirStaticList li {
padding: 4px 5px 4px 5px; padding: 4px 10px;
margin: 2px; margin: 2px 0;
list-style: none outside none; list-style: none outside none;
cursor: pointer; cursor: pointer;
background: url('../css/lib/images/ui-bg_highlight-soft_75_efefef_1x100.png') repeat-x scroll 50% 50% #EFEFEF;
} }
ul#rootDirStaticList li label { ul#rootDirStaticList li label {
@ -1537,15 +1578,27 @@ config*.tmpl
color: #666; color: #666;
} }
#config div.field-pair { .stepDiv #customQualityWrapper h4 {
padding: 12px 0px; margin-top: 6px;
padding: 0 0
} }
.stepDiv div.field-pair {
padding: 0 0 10px
}
#config div.field-pair {
padding: 12px 0
}
.stepDiv .component-desc select,
.stepDiv .component-desc input,
#config div.field-pair select, #config div.field-pair select,
#config div.field-pair input { #config div.field-pair input {
margin-right: 15px; margin-right: 15px;
} }
.stepDiv .component-desc input,
#config div.field-pair input { #config div.field-pair input {
float: left; float: left;
} }
@ -1554,6 +1607,11 @@ config*.tmpl
padding-left: 20px; padding-left: 20px;
} }
.stepDiv span.component-title.input {
line-height: 30px
}
.stepDiv span.component-title,
#config span.component-title { #config span.component-title {
float: left; float: left;
width: 172px; width: 172px;
@ -1562,6 +1620,11 @@ config*.tmpl
font-weight: bold; font-weight: bold;
} }
#addShowForm .stepDiv span.component-desc {
width:578px;
}
.stepDiv span.component-desc,
#config span.component-desc { #config span.component-desc {
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
@ -2297,9 +2360,9 @@ fieldset[disabled] .navbar-default .btn-link:focus {
border-radius: 5px; border-radius: 5px;
} }
.btn-large [class^="icon-"] { /*.btn-large [class^="icon-"] {
margin-top: 1px; margin-top: 1px;
} }*/
.btn-small { .btn-small {
padding: 5px 9px; padding: 5px 9px;
@ -2680,45 +2743,46 @@ browser.css
/* ======================================================================= /* =======================================================================
formWizard.css formWizard
========================================================================== */ ========================================================================== */
fieldset.sectionwrap { fieldset.sectionwrap {
width: 800px; padding: 5px 0;
padding: 5px;
text-align: left; text-align: left;
border-width: 0; border-width: 0;
} }
.step-one #searchResults legend.legendStep {
margin-top: 10px;
}
div.stepsguide .step,
legend.legendStep { legend.legendStep {
color: #57442b; margin-bottom: 0;
margin-bottom: 0px; }
legend.legendStep p {
padding-left: 15px;
} }
div.stepsguide { div.stepsguide {
margin-bottom: 15px;
overflow: hidden;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
} }
div.stepsguide .step { div.stepsguide .step {
float: left; float: left;
width: 266px; width: 267px;
font: bold 24px Arial; font: bold 24px Arial;
} }
div.stepsguide .step p { div.stepsguide .step p {
margin: 12px 0; margin: 12px 0 0;
border-bottom: 4px solid #57442b; border-bottom: 5px solid;
}
div.stepsguide .disabledstep {
color: #c4c4c4;
} }
div.stepsguide .disabledstep p { div.stepsguide .disabledstep p {
border-bottom: 4px solid #8a775e; border-bottom: 2px solid;
} }
div.stepsguide .step .smalltext { div.stepsguide .step .smalltext {
@ -2727,56 +2791,41 @@ div.stepsguide .step .smalltext {
} }
div.formpaginate { div.formpaginate {
width: 800px;
margin-top: 1em; margin-top: 1em;
overflow: auto;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
.step-outer {
overflow: hidden
}
div.formpaginate .prev, div.formpaginate .next { div.formpaginate .prev, div.formpaginate .next {
padding: 3px 6px; padding: 3px 6px;
color: #fff;
cursor: hand; cursor: hand;
cursor: pointer; cursor: pointer;
background: #57442b;
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
-moz-border-radius: 6px; -moz-border-radius: 6px;
border-radius: 6px; border-radius: 6px;
} }
.stepDiv { .stepDiv {
padding: 15px; padding: 15px;
} }
.stepDiv.parent-folder {
padding: 15px 0 0;
width: 430px;
margin: 0px auto;
}
#tabs .nocheck,
.stepDiv .nocheck { .stepDiv .nocheck {
padding-left: 16px; padding-left: 16px;
} }
#tabs label span.component-title,
.stepDiv label span.component-title {
padding-bottom: 6px;
float: left;
width: 172px;
margin-right: 10px;
font-size: 13px;
font-weight: bold;
}
#tabs label span.component-desc,
.stepDiv label span.component-desc {
padding-bottom: 6px;
font-size: 12px;
font-weight: normal;
display:inline-block;
width:475px;
}
/* step 3 related */ /* step 3 related */
#customQuality { #customQuality {
display: block; display: block;
padding: 10px 0; padding: 0 0 10px 0;
overflow: hidden; overflow: hidden;
clear: both; clear: both;
} }
@ -2790,7 +2839,6 @@ div.formpaginate .prev, div.formpaginate .next {
width: 85%; width: 85%;
margin: .8em 0; margin: .8em 0;
font-size: 1.2em; font-size: 1.2em;
color: #666;
} }
/* ======================================================================= /* =======================================================================
@ -2810,9 +2858,9 @@ tablesorter.css
.tablesorter th, .tablesorter th,
.tablesorter td { .tablesorter td {
padding: 4px; padding: 4px;
border-top: #fff 1px solid; border-top: 1px solid;
border-left: #fff 1px solid; border-left: 1px solid;
vertical-align: middle; vertical-align: baseline;
} }
/* remove extra border from left edge */ /* remove extra border from left edge */
@ -2822,10 +2870,7 @@ tablesorter.css
} }
.tablesorter th { .tablesorter th {
color: #fff;
text-align: center; text-align: center;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
background-color: #333;
border-collapse: collapse; border-collapse: collapse;
font-weight: normal; font-weight: normal;
} }
@ -2833,22 +2878,7 @@ tablesorter.css
.tablesorter .tablesorter-header { .tablesorter .tablesorter-header {
padding: 4px 18px 4px 18px; padding: 4px 18px 4px 18px;
cursor: pointer; cursor: pointer;
background-image: url(data:image/gif;base64,R0lGODlhFQAJAIAAAP///////yH5BAEAAAEALAAAAAAVAAkAAAIXjI+AywnaYnhUMoqt3gZXPmVg94yJVQAAOw==); vertical-align: middle;
background-position: center right;
background-repeat: no-repeat;
/* background-image: url(../images/tablesorter/bg.gif); */
}
.tablesorter thead .tablesorter-headerDesc {
background-color: #555;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjB+gC+jP2ptn0WskLQA7);
/* background-image: url(../images/tablesorter/asc.gif); */
}
.tablesorter thead .tablesorter-headerAsc {
background-color: #555;
background-image: url(data:image/gif;base64,R0lGODlhFQAEAIAAAP///////yH5BAEAAAEALAAAAAAVAAQAAAINjI8Bya2wnINUMopZAQA7);
/* background-image: url(../images/tablesorter/desc.gif); */
} }
.tablesorter thead .sorter-false { .tablesorter thead .sorter-false {
@ -2909,7 +2939,6 @@ thead.tablesorter-stickyHeader {
} }
.tablesorter tfoot a { .tablesorter tfoot a {
color:#fff;
text-decoration: none; text-decoration: none;
} }
@ -3052,6 +3081,42 @@ span.token-input-delete-token {
margin: 0 1px; margin: 0 1px;
} }
.stepDiv #searchResults div {
line-height: 1.7;
}
.stepDiv #searchResults #searchingAnim {
margin-right: 6px;
}
.stepone-result-title {
font-weight: 600;
margin-left: 10px
}
.stepone-result-date,
.stepone-result-db,
.stepone-result-overview {
margin-left: 5px
}
.stepone-result-db img {
margin-top: 3px;
vertical-align: top;
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest,
#newShowPortal #displayText p {
margin: 0;
}
#newShowPortal #displayText .show-name,
#newShowPortal #displayText .show-dest {
font-weight: 600;
}
#addRootDirTable td label .filepath {
font-weight: 900
}
.boldest {font-weight: 900} .boldest {font-weight: 900}
.red-text {color:#d33} .red-text {color:#d33}
.clear-left {clear:left} .clear-left {clear:left}

View file

@ -65,7 +65,6 @@
<input type="hidden" name="show" value="$show.indexerid" /> <input type="hidden" name="show" value="$show.indexerid" />
<b>Location:</b> <input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350" /><br /> <b>Location:</b> <input type="text" name="location" id="location" value="$show._location" class="form-control form-control-inline input-sm input350" /><br />
<br /> <br />
<b>Quality:</b>
#set $qualities = $common.Quality.splitQuality(int($show.quality)) #set $qualities = $common.Quality.splitQuality(int($show.quality))
#set global $anyQualities = $qualities[0] #set global $anyQualities = $qualities[0]
#set global $bestQualities = $qualities[1] #set global $bestQualities = $qualities[1]

View file

@ -1,17 +1,15 @@
#import os.path #import os.path
#import sickbeard #import sickbeard
#from sickbeard.common import * #from sickbeard.common import *
#set global $title="Existing Show" #set global $title = 'Existing Show'
#set global $header="Existing Show" #set global $header = 'Existing Show'
#set global $sbPath="../.." #set global $sbPath = '../..'
#set global $statpath="../.."# #set global $statpath = '../..'
#set global $topmenu="home"# #set global $topmenu = 'home'
#import os.path #import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
<form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8">
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/addExistingShow.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/addExistingShow.js?$sbPID"></script>
@ -21,7 +19,7 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
<!-- <!--
\$(document).ready(function(){ \$(document).ready(function(){
\$( "#tabs" ).tabs({ \$( '#tabs' ).tabs({
collapsible: true, collapsible: true,
selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'# selected: #if $sickbeard.ROOT_DIRS then '-1' else '0'#
}); });
@ -29,41 +27,55 @@
//--> //-->
</script> </script>
#if $varExists('header') #if $varExists('header')
<h1 class="header">$header</h1> <h1 class="header">$header</h1>
#else #else
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
<div id="tabs"> <image class="preload-image" style="position:absolute;top:-999px" src="$sbRoot/images/loading32<%= '-dark' if 'dark' == sickbeard.THEME_NAME else '' %>.gif" width="32" height="32" border="0">
<ul>
<li><a href="#tabs-1">Manage Directories</a></li>
<li><a href="#tabs-2">Customize Options</a></li>
</ul>
<div id="tabs-1" class="existingtabs">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl")
</div>
<div id="tabs-2" class="existingtabs">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl")
</div>
</div>
<br />
<p>SickGear can add existing shows, using the current options, by using locally stored NFO/XML metadata to eliminate user interaction.<br /> <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8">
If you would rather have SickGear prompt you to customize each show, then use the checkbox below.</p>
<p><input type="checkbox" name="promptForSettings" id="promptForSettings" /> <label for="promptForSettings">Prompt me to set settings for each show</label></p> <p>Tip: shows are added quicker when usable show nfo and xml metadata is found</p>
<hr /> <p style="margin-top:15px">
<input type="checkbox" id="promptForSettings" name="promptForSettings" style="vertical-align: top;" />
<label for="promptForSettings">Enable to change the following options per show, otherwise use these options with all shows added below</label>
</p>
<h5><b>Displaying folders within these directories which aren't already added to SickGear:</b></h5> <div id="tabs">
<ul>
<li><a href="#tabs-1">Manage parent folders</a></li>
<li><a href="#tabs-2">Custom options</a></li>
</ul>
<div id="tabs-1" class="existingtabs">
<div style="width: 430px; margin: 0px auto">
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_rootDirs.tmpl')
</div>
</div>
<div id="tabs-2">
<div class="stepDiv">
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_addShowOptions.tmpl')
</div>
</div>
</div>
<ul id="rootDirStaticList"><li></li></ul> <br />
<hr />
<br /> <p>The following parent folder(s) are scanned for existing shows. Toggle a folder to display shows</p>
<div id="tableDiv"></div>
<br /> <ul id="rootDirStaticList">
<input class="btn btn-primary" type="button" value="Submit" id="submitShowDirs" /> <li></li>
</ul>
<p>shows <span class="boldest">not known</span> to SickGear are listed below...</p>
<div id="tableDiv"></div>
<br />
<input class="btn btn-primary" type="button" value="Submit" id="submitShowDirs" />
</form> </form>
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')

View file

@ -1,16 +1,16 @@
#import os.path #import os.path
#import urllib #import urllib
#import sickbeard #import sickbeard
#set global $title="Add Show" #set global $title = 'Add Show'
#set global $header="Add Show" #set global $header = 'Add Show'
#set global $sbPath="../.." #set global $sbPath = '../..'
#set global $statpath="../.."# #set global $statpath = '../..'
#set global $topmenu="home"# #set global $topmenu = 'home'
#import os.path #import os.path
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#if $varExists('header') #if $varExists('header')
<h1 class="header">$header</h1> <h1 class="header">$header</h1>
@ -18,46 +18,49 @@
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
<div id="addShowPortal"> <div id="addShowPortal">
<a href="$sbRoot/home/addShows/newShow/" id="btnNewShow" class="btn btn-large"> <a class="btn btn-large" href="$sbRoot/home/addShows/newShow/">
<div class="button"><div class="icon-addnewshow"></div></div> <div class="button"><div class="icon-addnewshow"></div></div>
<div class="buttontext"> <div class="buttontext">
<h3>Add New Show</h3> <h3>Add New Show</h3>
<p>For shows that you haven't downloaded yet, this option finds a show on theTVDB.com and TVRage.com, creates a directory for its episodes, and adds it to SickGear.</p> <p>Search a TV database for a show to add. A new folder will be created for episodes</p>
</div> </div>
</a> </a>
<br/><br/> <a class="btn btn-large" href="$sbRoot/home/addShows/trendingShows/">
<a href="$sbRoot/home/addShows/trendingShows/" id="btnNewShow" class="btn btn-large"> <div class="button"><div class="icon-addtrendingshow"></div></div>
<div class="button"><div class="icon-addtrendingshow"></div></div> <div class="buttontext">
<div class="buttontext"> <h3>Add From Trending</h3>
<h3>Add Trending Show</h3> <p>Browse a current trending show list to add from. A folder for episodes will be created</p>
<p>For shows that you haven't downloaded yet, this option lets you choose from a list of current trending shows with ratings to add, creates a directory for its episodes, and adds it to SickGear.</p> </div>
</div> </a>
</a>
<br/><br/> <a class="btn btn-large" href="$sbRoot/home/addShows/existingShows/">
#if $sickbeard.USE_TRAKT == True: <div class="button"><div class="icon-addexistingshow"></div></div>
<a href="$sbRoot/home/addShows/recommendedShows/" id="btnNewShow" class="btn btn-large"> <div class="buttontext">
<div class="button"><div class="icon-addrecommendedshow"></div></div> <h3>Add Existing Shows</h3>
<div class="buttontext"> <p>Scan parent folders for shows and episode metadata to import into SickGear</p>
<h3>Add Recommended Shows</h3> </div>
<p>For shows that you haven't downloaded yet, this option recommends shows to add based on your Trakt.tv show library, creates a directory for its episodes, and adds it to SickGear.</p> </a>
</div>
</a>
<br/><br/> #if True == $sickbeard.USE_TRAKT:
#end if <a class="btn btn-large" href="$sbRoot/home/addShows/recommendedShows/">
<a href="$sbRoot/home/addShows/existingShows/" id="btnExistingShow" class="btn btn-large"> <div class="button"><div class="icon-addrecommendedshow"></div></div>
<div class="button"><div class="icon-addexistingshow"></div></div> <div class="buttontext">
<div class="buttontext"> <h3>Add Recommended</h3>
<h3>Add Existing Shows</h3> <p>Browse recommendations based on your Trakt.tv show library to add to SickGear</p>
<p>Use this option to add shows that already have a folder created on your hard drive. SickGear will scan your existing metadata/episodes and add the show accordingly.</p> </div>
</div> </a>
</a> #else
<div class="buttontext" style="padding:10px 5px">
<p>There's more... unlock another button to browse<br />
recommended shows based on your Trakt.tv show<br />
library by enabling Trakt in Config/Notifications/Social</p>
</div>
#end if
</div>
</div> <div style="clear:both">&nbsp;</div>
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl")

View file

@ -2,10 +2,10 @@
#from sickbeard.helpers import anon_url #from sickbeard.helpers import anon_url
<table id="addRootDirTable" class="sickbeardTable tablesorter"> <table id="addRootDirTable" class="sickbeardTable tablesorter">
<thead><tr><th class="col-checkbox"><input type="checkbox" id="checkAll" checked=checked></th><th>Directory</th><th width="20%">Show Name (tvshow.nfo)<th width="20%">Indexer</td></tr></thead> <thead><tr><th class="col-checkbox"><input type="checkbox" id="checkAll" checked=checked></th><th>Parent\show folder</th><th width="20%">Show name<br />(tvshow.nfo)<th width="15%">TV database</td></tr></thead>
<tfoot> <tfoot>
<tr> <tr>
<th rowspan="1" colspan="4" align="left"><a href="#" style="padding-left: 10px;" class="showManage">Manage Directories</a></th> <th rowspan="1" colspan="4" align="left"><a href="#" class="showManage">Manage Directories</a></th>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
@ -31,7 +31,7 @@
<td class="col-checkbox"><input type="checkbox" id="$show_id" class="dirCheck" checked=checked></td> <td class="col-checkbox"><input type="checkbox" id="$show_id" class="dirCheck" checked=checked></td>
<td><label for="$show_id">$curDir['display_dir']</label></td> <td><label for="$show_id">$curDir['display_dir']</label></td>
#if $curDir['existing_info'][1] and $indexer > 0: #if $curDir['existing_info'][1] and $indexer > 0:
<td><a href="<%= anon_url(sickbeard.indexerApi(indexer).config['show_url'], curDir['existing_info'][0]) %>">$curDir['existing_info'][1]</a></td> <td><a href="<%= anon_url(sickbeard.indexerApi(indexer).config['show_url'], curDir['existing_info'][0]) %>" target="_new">$curDir['existing_info'][1]</a></td>
#else: #else:
<td>?</td> <td>?</td>
#end if #end if

View file

@ -24,15 +24,17 @@
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
<image class="preload-image" style="position:absolute;top:-999px" src="$sbRoot/images/loading32<%= '-dark' if 'dark' == sickbeard.THEME_NAME else '' %>.gif" width="32" height="32" border="0">
<div id="newShowPortal"> <div id="newShowPortal">
<div id="displayText">aoeu</div> <div id="displayText">aoeu</div>
<br /> <br />
<form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8" style="width: 800px;"> <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addNewShow" accept-charset="utf-8">
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-one">
<legend class="legendStep">Find a show on the TVDB or TVRAGE</legend> <legend class="legendStep"><p>Find show at a TV database</p></legend>
<div class="stepDiv"> <div class="stepDiv">
<input type="hidden" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" /> <input type="hidden" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" />
@ -48,10 +50,10 @@
#else #else
<input type="text" id="nameToSearch" value="$default_show_name" class="form-control form-control-inline input-sm input350" /> <input type="text" id="nameToSearch" value="$default_show_name" class="form-control form-control-inline input-sm input350" />
&nbsp; &nbsp;
<span style="float:right">
<select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm"> <select name="indexerLang" id="indexerLangSelect" class="form-control form-control-inline input-sm">
<option value="en" selected="selected">en</option> <option value="en" selected="selected">en</option>
</select><b>*</b> </select><b>&nbsp;*</b>
&nbsp;
<select name="providedIndexer" id="providedIndexer" class="form-control form-control-inline input-sm"> <select name="providedIndexer" id="providedIndexer" class="form-control form-control-inline input-sm">
<option value="0" #if $provided_indexer == 0 then "selected=\"selected\"" else ""#>All Indexers</option> <option value="0" #if $provided_indexer == 0 then "selected=\"selected\"" else ""#>All Indexers</option>
#for $indexer in $indexers #for $indexer in $indexers
@ -60,21 +62,21 @@
</select> </select>
&nbsp; &nbsp;
<input class="btn btn-inline" type="button" id="searchName" value="Search" /> <input class="btn btn-inline" type="button" id="searchName" value="Search" />
</span>
<br />
<p style="margin:5px 0 15px"><b>*</b> SickGear supports english episodes. The language choice is used for fetching metadata and episode filenames</p>
<br /> <div id="searchResults" style="height: 100%"></div>
<b>*</b> This will only affect the language of the retrieved metadata file contents and episode filenames.<br />
This <b>DOES NOT</b> allow SickGear to download non-english TV episodes!<br />
<br />
<div id="searchResults" style="height: 100%;"><br/></div>
#end if #end if
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-two">
<legend class="legendStep">Pick the parent folder</legend> <legend class="legendStep"><p>Pick parent folder</p></legend>
<div class="stepDiv"> <div class="stepDiv parent-folder">
#if $provided_show_dir #if $provided_show_dir
Pre-chosen Destination Folder: <b>$provided_show_dir</b> <br /> Pre-chosen Destination Folder: <b>$provided_show_dir</b> <br />
<input type="hidden" id="fullShowPath" name="fullShowPath" value="$provided_show_dir" /><br /> <input type="hidden" id="fullShowPath" name="fullShowPath" value="$provided_show_dir" /><br />
@ -82,13 +84,15 @@
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_rootDirs.tmpl') #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_rootDirs.tmpl')
#end if #end if
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-three">
<legend class="legendStep">Customize options</legend> <legend class="legendStep"><p>Set custom options</p></legend>
<div class="stepDiv"> <div class="stepDiv">
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_addShowOptions.tmpl') #include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_addShowOptions.tmpl')
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
#for $curNextDir in $other_shows #for $curNextDir in $other_shows

View file

@ -12,7 +12,6 @@
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl")
<link rel="stylesheet" type="text/css" href="$sbRoot/css/formwizard.css?$sbPID" />
<script type="text/javascript" src="$sbRoot/js/formwizard.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/formwizard.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/qualityChooser.js?$sbPID"></script>
<script type="text/javascript" src="$sbRoot/js/recommendedShows.js?$sbPID"></script> <script type="text/javascript" src="$sbRoot/js/recommendedShows.js?$sbPID"></script>
@ -24,35 +23,40 @@
<h1 class="title">$title</h1> <h1 class="title">$title</h1>
#end if #end if
<image class="preload-image" style="position:absolute;top:-999px" src="$sbRoot/images/loading32<%= '-dark' if 'dark' == sickbeard.THEME_NAME else '' %>.gif" width="32" height="32" border="0">
<div id="newShowPortal"> <div id="newShowPortal">
<div id="displayText"></div> <div id="displayText"></div>
<br /> <br />
<form id="recommendedShowsForm" method="post" action="$sbRoot/home/addShows/addRecommendedShow" accept-charset="utf-8" style="width: 800px;"> <form id="addShowForm" method="post" action="$sbRoot/home/addShows/addRecommendedShow" accept-charset="utf-8">
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-one">
<legend class="legendStep">Select a recommended show</legend> <legend class="legendStep"><p>Select a recommended show</p></legend>
<div class="stepDiv"> <div class="stepDiv">
<div id="searchResults" style="height: 100%;"><br/></div> <div id="searchResults" style="height: 100%;"><br/></div>
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-two">
<legend class="legendStep">Pick the parent folder</legend> <legend class="legendStep"><p>Pick parent folder</p></legend>
<div class="stepDiv"> <div class="stepDiv parent-folder">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl") #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_rootDirs.tmpl")
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
<fieldset class="sectionwrap"> <fieldset class="sectionwrap step-three">
<legend class="legendStep">Customize options</legend> <legend class="legendStep"><p>Set custom options</p></legend>
<div class="stepDiv"> <div class="stepDiv">
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl") #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_addShowOptions.tmpl")
</div> </div>
<div style="clear:both">&nbsp;</div>
</fieldset> </fieldset>
</form> </form>

View file

@ -2,62 +2,77 @@
#from sickbeard.common import * #from sickbeard.common import *
#from sickbeard import subtitles #from sickbeard import subtitles
#if $sickbeard.USE_SUBTITLES: <div class="field-pair">
<div class="field-pair alt"> <label for="statusSelect">
<input type="checkbox" name="subtitles" id="subtitles" #if $sickbeard.SUBTITLES_DEFAULT then "checked=\"checked\"" else ""# /> <span class="component-title input">Initial episode status</span>
<label for="subtitles" class="clearfix"> <span class="component-desc">
<span class="component-title">Subtitles</span> <select name="defaultStatus" id="statusSelect" class="form-control form-control-inline input-sm">
<span class="component-desc">Download subtitles for this show?</span> #for $curStatus in [$SKIPPED, $WANTED, $ARCHIVED, $IGNORED]:
</label> <option value="$curStatus" #if $sickbeard.STATUS_DEFAULT == $curStatus then 'selected="selected"' else ''#>$statusStrings[$curStatus]</option>
</div> #end for
#end if </select>
<span>set the initial status of missing episodes</span>
<div class="field-pair"> </span>
<label for="statusSelect" class="nocheck clearfix"> </label>
<span class="component-title"> </div>
<select name="defaultStatus" id="statusSelect" class="form-control form-control-inline input-sm">
#for $curStatus in [$SKIPPED, $WANTED, $ARCHIVED, $IGNORED]:
<option value="$curStatus" #if $sickbeard.STATUS_DEFAULT == $curStatus then 'selected="selected"' else ''#>$statusStrings[$curStatus]</option>
#end for
</select>
</span>
<span class="component-desc">Set the initial status of missing episodes</span>
</label>
</div>
<div class="field-pair alt">
<input class="cb" type="checkbox" name="flatten_folders" id="flatten_folders" #if $sickbeard.FLATTEN_FOLDERS_DEFAULT then "checked=\"checked\"" else ""# />
<label for="flatten_folders" class="clearfix">
<span class="component-title">Flatten Folders</span>
<span class="component-desc">Disregard sub-folders?</span>
</label>
</div>
<div class="field-pair alt"> <div class="field-pair alt">
<input type="checkbox" name="anime" id="anime" #if $sickbeard.ANIME_DEFAULT then "checked=\"checked\"" else ""# /> <p class="grey-text">Tip: The following options are <span style="font-weight:800">edit</span>able later in the detail view of the show</p>
<label for="anime" class="clearfix"> </div>
<span class="component-title">Anime</span>
<span class="component-desc">Is this show an Anime?</span>
</label>
</div>
<div class="field-pair alt"> #if $sickbeard.USE_SUBTITLES:
<input type="checkbox" name="scene" id="scene" #if $sickbeard.SCENE_DEFAULT then "checked=\"checked\"" else ""# /> <div class="field-pair alt">
<label for="scene" class="clearfix"> <label for="subtitles">
<span class="component-title">Scene Numbering</span> <span class="component-title">Subtitles</span>
<span class="component-desc">Is this show scene numbered?</span> <span class="component-desc">
</label> <input type="checkbox" name="subtitles" id="subtitles" #if $sickbeard.SUBTITLES_DEFAULT then "checked=\"checked\"" else ""# />
</div> <p>download subtitles for this show</p>
</span>
</label>
</div>
#end if
#set $qualities = $Quality.splitQuality($sickbeard.QUALITY_DEFAULT) <div class="field-pair alt">
#set global $anyQualities = $qualities[0] <label for="flatten_folders">
#set global $bestQualities = $qualities[1] <span class="component-title">Flatten folders</span>
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl") <span class="component-desc">
<input class="cb" type="checkbox" name="flatten_folders" id="flatten_folders" #if $sickbeard.FLATTEN_FOLDERS_DEFAULT then "checked=\"checked\"" else ""# />
<br> <p>do not create sub folders</p>
<div class="field-pair alt"> </span>
<label for="saveDefaultsButton" class="nocheck clearfix"> </label>
<span class="component-title"><input class="btn btn-inline" type="button" id="saveDefaultsButton" value="Save Defaults" disabled="disabled" /></span> </div>
<span class="component-desc">Persist current values as the defaults</span>
</label> <div class="field-pair alt">
</div> <label for="anime">
<span class="component-title">Anime</span>
<span class="component-desc">
<input type="checkbox" name="anime" id="anime" #if $sickbeard.ANIME_DEFAULT then "checked=\"checked\"" else ""# />
<p>use anime processing for this show</p>
</span>
</label>
</div>
<div class="field-pair alt">
<label for="scene">
<span class="component-title">Scene numbering</span>
<span class="component-desc">
<input type="checkbox" name="scene" id="scene" #if $sickbeard.SCENE_DEFAULT then "checked=\"checked\"" else ""# />
<p>enable if episodes are numbered by scene releases and not by the TV network</p>
</span>
</label>
</div>
#set $qualities = $Quality.splitQuality($sickbeard.QUALITY_DEFAULT)
#set global $anyQualities = $qualities[0]
#set global $bestQualities = $qualities[1]
#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_qualityChooser.tmpl")
<div class="field-pair alt" style="margin-top:30px">
<label for="saveDefaultsButton">
<span class="component-title">Save options as defaults</span>
<span class="component-desc">
<input class="btn btn-inline" type="button" id="saveDefaultsButton" value="Save Defaults" disabled="disabled" />
<p>reuse the above options when adding more shows</p>
</span>
</label>
</div>

View file

@ -2,46 +2,48 @@
#from sickbeard.common import Quality, qualityPresets, qualityPresetStrings #from sickbeard.common import Quality, qualityPresets, qualityPresetStrings
<div class="field-pair"> <div class="field-pair">
<label for="qualityPreset" class="nocheck clearfix"> <label for="qualityPreset" class="clearfix">
#set $overall_quality = $Quality.combineQualities($anyQualities, $bestQualities) #set $overall_quality = $Quality.combineQualities($anyQualities, $bestQualities)
<span class="component-title"> <span class="component-title input">Quality</span>
<span class="component-desc">
#set $selected = None #set $selected = None
<select id="qualityPreset" class="form-control form-control-inline input-sm"> <select id="qualityPreset" class="form-control form-control-inline input-sm">
<option value="0">Custom</option> <option value="0">Custom</option>
#for $curPreset in sorted($qualityPresets): #for $curPreset in sorted($qualityPresets):
<option value="$curPreset" #if $curPreset == $overall_quality then "selected=\"selected\"" else ""# #if $qualityPresetStrings[$curPreset].endswith("0p") then "style=\"padding-left: 15px;\"" else ""#>$qualityPresetStrings[$curPreset]</option> <option value="$curPreset" #if $curPreset == $overall_quality then "selected=\"selected\"" else ""# #if $qualityPresetStrings[$curPreset].endswith("0p") then "style=\"padding-left: 15px;\"" else ""#>$qualityPresetStrings[$curPreset]</option>
#end for #end for
</select> </select>
</span> <span>preferred episode quality to download</span>
<span class="component-desc">Preferred quality of episodes to be download</span> </span>
</label>
</label>
</div> </div>
<div id="customQualityWrapper"> <div id="customQualityWrapper">
<div id="customQuality"> <div id="customQuality">
<div class="component-group-desc"> <div class="component-group-desc">
<p>One of the <b>Initial</b> quality selections must be obtained before SickGear will attempt to process the <b>Archive</b> selections.</p> <p>One of the <em>Initial</em> quality selections must succeed before attempting to process <em>Archive</em> selections.</p>
</div> </div>
<div style="padding-right: 40px; text-align: center;" class="float-left"> <span class="component-desc">
<h4>Initial</h4> <div style="float:left; padding-right: 40px">
#set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings) <h4>Initial</h4>
<select id="anyQualities" name="anyQualities" multiple="multiple" size="$len($anyQualityList)" class="form-control form-control-inline input-sm"> #set $anyQualityList = filter(lambda x: x > $Quality.NONE, $Quality.qualityStrings)
#for $curQuality in sorted($anyQualityList): <select id="anyQualities" name="anyQualities" multiple="multiple" size="$len($anyQualityList)" class="form-control form-control-inline input-sm">
<option value="$curQuality" #if $curQuality in $anyQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option> #for $curQuality in sorted($anyQualityList):
#end for <option value="$curQuality" #if $curQuality in $anyQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option>
</select> #end for
</div> </select>
</div>
<div style="text-align: center;" class="float-left"> <div style="float:left">
<h4>Archive</h4> <h4>Archive</h4>
#set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings) #set $bestQualityList = filter(lambda x: x > $Quality.SDTV and x < $Quality.UNKNOWN, $Quality.qualityStrings)
<select id="bestQualities" name="bestQualities" multiple="multiple" size="$len($bestQualityList)" class="form-control form-control-inline input-sm"> <select id="bestQualities" name="bestQualities" multiple="multiple" size="$len($bestQualityList)" class="form-control form-control-inline input-sm">
#for $curQuality in sorted($bestQualityList): #for $curQuality in sorted($bestQualityList):
<option value="$curQuality" #if $curQuality in $bestQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option> <option value="$curQuality" #if $curQuality in $bestQualities then "selected=\"selected\"" else ""#>$Quality.qualityStrings[$curQuality]</option>
#end for #end for
</select> </select>
</div> </div>
</div> </span>
</div>
</div> </div>

View file

@ -7,7 +7,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>SickGear - BRANCH:[$sickbeard.BRANCH] - $title</title> <title>SickGear - BRANCH:[$sickbeard.BRANCH] - $title</title>
<!--[if lt IE 9]> <!--[if lt IE 9]>

View file

@ -1,78 +1,93 @@
$(document).ready(function() { $(document).ready(function(){
$('#checkAll').live('click', function(){ var tableDiv = $('#tableDiv');
var seasCheck = this;
$('.dirCheck').each(function(){ tableDiv.on('click', '#checkAll', function(){
this.checked = seasCheck.checked;
});
});
$('#submitShowDirs').click(function(){ var cbToggle = this.checked;
var dirArr = new Array(); $('.dirCheck').each(function(){
this.checked = cbToggle;
});
});
$('.dirCheck').each(function(i,w) { $('#submitShowDirs').click(function(){
if (this.checked == true) {
var show = $(this).attr('id');
var indexer = $(this).closest('tr').find('select').val();
dirArr.push(encodeURIComponent(indexer + '|' + show));
}
});
if (dirArr.length == 0) var dirArr = [];
return false;
url = sbRoot+'/home/addShows/addExistingShows?promptForSettings='+ ($('#promptForSettings').prop('checked') ? 'on' : 'off'); $('.dirCheck').each(function(){
if (true == this.checked){
var show = $(this).attr('id');
var indexer = $(this).closest('tr').find('select').val();
dirArr.push(encodeURIComponent(indexer + '|' + show));
}
});
url += '&shows_to_add='+dirArr.join('&shows_to_add='); if (0 == dirArr.length)
return false;
window.location.href = url; window.location.href = sbRoot + '/home/addShows/addExistingShows'
}); + '?promptForSettings=' + ($('#promptForSettings').prop('checked') ? 'on' : 'off')
+ '&shows_to_add=' + dirArr.join('&shows_to_add=');
});
function loadContent() { function loadContent(){
var url = ''; var url = '';
$('.dir_check').each(function(i,w){ $('.dir_check').each(function(i, w){
if ($(w).is(':checked')) { if ($(w).is(':checked')){
if (url.length) url += (url.length ? '&' : '')
url += '&'; + 'rootDir=' + encodeURIComponent($(w).attr('id'));
url += 'rootDir=' + encodeURIComponent($(w).attr('id')); }
} });
});
$('#tableDiv').html('<img id="searchingAnim" src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> loading folders...'); $('#tableDiv').html('<img id="searchingAnim"'
$.get(sbRoot+'/home/addShows/massAddTable', url, function(data) { + ' style="margin-right:10px"'
$('#tableDiv').html(data); + ' src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif"'
$("#addRootDirTable").tablesorter({ + ' height="32" width="32" />'
//sortList: [[1,0]], + ' scanning parent folders...');
widgets: ['zebra'],
headers: {
0: { sorter: false }
}
});
});
} $.get(sbRoot + '/home/addShows/massAddTable',
url,
function(data){
$('#tableDiv').html(data);
$('#addRootDirTable').tablesorter({
sortList: [[1,0]],
widgets: ['zebra'],
headers: {
0: { sorter: false }
}
});
});
}
var last_txt = ''; var last_txt = '', new_text = '', id;
$('#rootDirText').change(function() { $('#rootDirText').change(function(){
if (last_txt == $('#rootDirText').val()) if (last_txt == (new_text = $('#rootDirText').val()))
return false; return false;
else
last_txt = $('#rootDirText').val();
$('#rootDirStaticList').html('');
$('#rootDirs option').each(function(i, w) {
$('#rootDirStaticList').append('<li class="ui-state-default ui-corner-all"><input type="checkbox" class="dir_check" id="'+$(w).val()+'" checked=checked> <label for="'+$(w).val()+'" style="color:#09A2FF;"><b>'+$(w).val()+'</b></label></li>')
});
loadContent();
});
$('.dir_check').live('click', loadContent);
$('.showManage').live('click', function() { last_txt = new_text;
$( "#tabs" ).tabs( 'select', 0 ); $('#rootDirStaticList').html('');
}); $('#rootDirs').find('option').each(function(i, w){
id = $(w).val();
$('#rootDirStaticList').append('<li class="ui-state-default ui-corner-all">'
+ '<input id="' + id + '" type="checkbox"' + ' checked=checked'
+ ' class="dir_check"'
+ ' />'
+ ' <label for="' + id + '"'
+ ' style="color:#09A2FF">'
+ '<b>' + id + '</b></label>'
+ '</li>')
});
loadContent();
});
$('#rootDirStaticList').on('click', '.dir_check', loadContent);
tableDiv.on('click', '.showManage', function(event) {
event.preventDefault();
$('#tabs').tabs('option', 'active', 0);
$('html,body').animate({scrollTop: 0}, 1000);
});
}); });

View file

@ -1,111 +1,136 @@
/*jQuery Form to Form Wizard (Initial: Oct 1st, 2010) /* jQuery Form to Form Wizard (Initial: Oct 1st, 2010)
* This notice must stay intact for usage * This notice must stay intact for usage
* Author: Dynamic Drive at http://www.dynamicdrive.com/ * Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code * Visit http://www.dynamicdrive.com/ for full source code
*/ */
//Oct 21st, 2010: Script updated to v1.1, which adds basic form validation functionality, triggered each time the user goes from one page to the next, or tries to submit the form. // Oct 21st, 2010: Script updated to v1.1, which adds basic form validation functionality, triggered each time the user goes from one page to the next, or tries to submit the form.
// jQuery.noConflict()
//jQuery.noConflict()
function formtowizard(options){ function FormToWizard(options){
this.setting=jQuery.extend({persistsection:false, revealfx:['slide', 500], oninit:function(){}, onpagechangestart:function(){}}, options) this.setting = jQuery.extend({fieldsetborderwidth:2, persistsection:false, revealfx:['slide', 500],
this.currentsection=-1 oninit:function(){}, onpagechangestart:function(){}}, options);
this.currentsection = -1;
this.init(this.setting) this.init(this.setting)
} }
formtowizard.prototype={ FormToWizard.prototype = {
createfieldsets:function($theform, arr){ //reserved function for future version (dynamically wraps form elements with a fieldset element)
$theform.find('fieldset.sectionwrap').removeClass('sectionwrap') //make sure no fieldsets carry 'sectionwrap' before proceeding
var $startelement=$theform.find(':first-child') //reference first element inside form
for (var i=0; i<arr.length; i++){ //loop thru "break" elements
var $fieldsetelements=$startelement.nextUntil('#'+arr[i].breakafter+', *[name='+arr[i].breakafter+']').andSelf() //reference all elements from start element to break element (nextUntil() is jQuery 1.4 function)
$fieldsetelements.add($fieldsetelements.next()).wrapAll('<fieldset class="sectionwrap" />') //wrap these elements with fieldset element
$startelement=$theform.find('fieldset.sectionwrap').eq(i).prepend('<legend class="legendStep">'+arr[i].legend+'</legend>').next() //increment startelement to begin at the end of the just inserted fieldset element
}
},
loadsection:function(rawi, bypasshooks){ loadsection:function(rawi, bypasshooks){
var thiswizard=this
//doload Boolean checks to see whether to load next section (true if bypasshooks param is true or onpagechangestart() event handler doesn't return false) //doload Boolean checks to see whether to load next section (true if bypasshooks param is true or onpagechangestart() event handler doesn't return false)
var doload=bypasshooks || this.setting.onpagechangestart(jQuery, this.currentsection, this.sections.$sections.eq(this.currentsection)) var doload = bypasshooks || this.setting.onpagechangestart(jQuery, this.currentsection, this.sections.$sections.eq(this.currentsection)),
doload=(doload===false)? false : true //unless doload is explicitly false, set to true tabIndex,
if (!bypasshooks && this.setting.validate){ thiswizard = this;
var outcome=this.validate(this.currentsection)
if (outcome===false) doload = (doload !== false); //unless doload is explicitly false, set to true
doload=false if (!bypasshooks && this.setting.validate && false === this.validate(this.currentsection))
} doload = false;
var i=(rawi=="prev")? this.currentsection-1 : (rawi=="next")? this.currentsection+1 : parseInt(rawi) //get index of next section to show
i=(i<0)? this.sections.count-1 : (i>this.sections.count-1)? 0 : i //make sure i doesn't exceed min/max limit //get index of next section to show
if (i<this.sections.count && doload){ //if next section to show isn't the same as the current section shown tabIndex = ('prev' == rawi
this.$thesteps.eq(this.currentsection).addClass('disabledstep').end().eq(i).removeClass('disabledstep') //dull current "step" text then highlight next "step" text ? this.currentsection - 1
if (this.setting.revealfx[0]=="slide"){ : ('next' == rawi
this.sections.$sections.css("visibility", "visible") ? this.currentsection + 1
this.sections.$outerwrapper.stop().animate({height: this.sections.$sections.eq(i).outerHeight()}, this.setting.revealfx[1]) //animate fieldset wrapper's height to accomodate next section's height : parseInt(rawi)));
this.sections.$innerwrapper.stop().animate({left:-i*this.maxfieldsetwidth}, this.setting.revealfx[1], function(){ //slide next section into view
thiswizard.sections.$sections.each(function(thissec){ //don't exceed min/max limit
if (thissec!=i) //hide fieldset sections currently not in veiw, so tabbing doesn't go to elements within them (and mess up layout) tabIndex = (tabIndex < 0
thiswizard.sections.$sections.eq(thissec).css("visibility", "hidden") ? this.sections.count - 1
: (tabIndex > (this.sections.count - 1)
? 0
: tabIndex));
//if next section to show isn't the same as the current section shown
if (tabIndex < this.sections.count && doload){
//dull current 'step' text then highlight next 'step' text
this.$thesteps.eq(this.currentsection).addClass('disabledstep').end().eq(tabIndex).removeClass('disabledstep');
if ('slide' == this.setting.revealfx[0]) {
this.sections.$sections.css('visibility', 'visible');
//animate fieldset wrapper's height to accommodate next section's height
this.sections.$outerwrapper.stop().animate({height: this.sections.$sections.eq(tabIndex).outerHeight()}, this.setting.revealfx[1]);
//slide next section into view
this.sections.$innerwrapper.stop().animate({left: -tabIndex * this.maxfieldsetwidth}, this.setting.revealfx[1], function () {
thiswizard.sections.$sections.each(function (thissec) {
//hide fieldset sections currently not in view, so tabbing doesn't go to elements within them (and mess up layout)
if (tabIndex != thissec)
thiswizard.sections.$sections.eq(thissec).css('visibility', 'hidden')
}) })
}) })
} }
else if (this.setting.revealfx[0]=="fade"){ //if fx is "fade" else if ('fade' == this.setting.revealfx[0]) { //if fx is 'fade'
this.sections.$sections.eq(this.currentsection).hide().end().eq(i).fadeIn(this.setting.revealfx[1], function(){ this.sections.$sections.eq(this.currentsection).hide().end().eq(tabIndex).fadeIn(this.setting.revealfx[1], function () {
if (document.all && this.style && this.style.removeAttribute) if (document.all && this.style && this.style.removeAttribute)
this.style.removeAttribute('filter') //fix IE clearType problem //fix IE clearType problem
this.style.removeAttribute('filter');
}) })
} else {
this.sections.$sections.eq(this.currentsection).hide().end().eq(tabIndex).show()
} }
else{ //update current page status text
this.sections.$sections.eq(this.currentsection).hide().end().eq(i).show() this.paginatediv.$status.text('step ' + (tabIndex + 1) + ' / ' + this.sections.count);
} this.paginatediv.$navlinks.css('visibility', 'visible');
this.paginatediv.$status.text("Page "+(i+1)+" of "+this.sections.count) //update current page status text
this.paginatediv.$navlinks.css('visibility', 'visible') if (0 == tabIndex) //hide 'prev' link
if (i==0) //hide "prev" link this.paginatediv.$navlinks.eq(0).css('visibility', 'hidden');
this.paginatediv.$navlinks.eq(0).css('visibility', 'hidden') else if ((this.sections.count - 1) == tabIndex)
else if (i==this.sections.count-1) //hide "next" link //hide 'next' link
this.paginatediv.$navlinks.eq(1).css('visibility', 'hidden') this.paginatediv.$navlinks.eq(1).css('visibility', 'hidden');
if (this.setting.persistsection) //enable persistence? if (this.setting.persistsection) //enable persistence?
formtowizard.routines.setCookie(this.setting.formid+"_persist", i) FormToWizard.routines.setCookie(this.setting.formid + '_persist', tabIndex);
this.currentsection=i this.currentsection = tabIndex;
if(i === 0) { setTimeout(function() { $('#nameToSearch').focus(); }, 250); } if (0 === tabIndex) {
setTimeout(function () {
$('#nameToSearch').focus();
}, 250);
}
} }
}, },
addvalidatefields:function(){ addvalidatefields:function(){
var $=jQuery, setting=this.setting, theform=this.$theform.get(0), validatefields=[] var $ = jQuery,
var validatefields=setting.validate //array of form element ids to validate setting = this.setting,
for (var i=0; i<validatefields.length; i++){ theform = this.$theform.get(0),
var el=theform.elements[validatefields[i]] //reference form element validatefields = setting.validate; //array of form element ids to validate
if (el){ //if element is defined
var $section=$(el).parents('fieldset.sectionwrap:eq(0)') //find fieldset.sectionwrap this form element belongs to for (var i = 0; i < validatefields.length; i++){
if ($section.length==1){ //if element is within a fieldset.sectionwrap element var el = theform.elements[validatefields[i]]; //reference form element
$section.data('elements').push(el) //cache this element inside corresponding section if (el){
//find fieldset.sectionwrap this form element belongs to
var $section = $(el).parents('fieldset.sectionwrap:eq(0)');
//if element is within a fieldset.sectionwrap element
if ($section.length == 1){
//cache this element inside corresponding section
$section.data('elements').push(el);
} }
} }
} }
}, },
validate:function(section){ validate:function(section){
var elements=this.sections.$sections.eq(section).data('elements') //reference elements within this section that should be validated //reference elements within this section that should be validated
var validated=true, invalidtext=["Please fill out the following fields:\n"] var elements = this.sections.$sections.eq(section).data('elements');
var validated = true, invalidtext = ['Please fill out the following fields:' + "\n"];
function invalidate(el){ function invalidate(el){
validated=false validated = false;
invalidtext.push("- "+ (el.id || el.name)) invalidtext.push('- '+ (el.id || el.name))
} }
for (var i=0; i<elements.length; i++){ for (var i = 0; i < elements.length; i++){
if (/(text)/.test(elements[i].type) && elements[i].value==""){ //text and textarea elements if (/(text)/.test(elements[i].type) && elements[i].value == ''){
//text and textarea elements
invalidate(elements[i]) invalidate(elements[i])
} } else if (/(select)/.test(elements[i].type) && (elements[i].selectedIndex == -1 || elements[i].options[elements[i].selectedIndex].text == '')){
else if (/(select)/.test(elements[i].type) && (elements[i].selectedIndex==-1 || elements[i].options[elements[i].selectedIndex].text=="")){ //select elements //select elements
invalidate(elements[i]) invalidate(elements[i])
} } else if (undefined == elements[i].type && 0 < elements[i].length){
else if (elements[i].type==undefined && elements[i].length>0){ //radio and checkbox elements //radio and checkbox elements
var onechecked=false var onechecked = false;
for (var r=0; r<elements[i].length; r++){ for (var r = 0; r < elements[i].length; r++){
if (elements[i][r].checked==true){ if (elements[i][r].checked == true){
onechecked=true onechecked = true;
break break
} }
} }
@ -115,98 +140,154 @@ formtowizard.prototype={
} }
} }
if (!validated) if (!validated)
alert(invalidtext.join('\n')) alert(invalidtext.join("\n"));
return validated return validated
}, },
init:function(setting){ init:function(setting){
var thiswizard=this var thiswizard = this;
jQuery(function($){ //on document.ready jQuery(function($){ //on document.ready
var $theform=$('#'+setting.formid) var $theform = $('#' + setting.formid),
if ($theform.length==0) //if form with specified ID doesn't exist, try name attribute instead //create Steps Container to house the 'steps' text
$theform=$('form[name='+setting.formid+']') $stepsguide = $('<div class="stepsguide" />'),
if (setting.manualfieldsets && setting.manualfieldsets.length>0)
thiswizard.createfieldsets($theform, setting.manualfieldsets) //find all fieldsets within form and hide them initially
var $stepsguide=$('<div class="stepsguide" />') //create Steps Container to house the "steps" text $sections = $theform.find('fieldset.sectionwrap').hide(),
var $sections=$theform.find('fieldset.sectionwrap').hide() //find all fieldset elements within form and hide them initially $sectionswrapper = '',
if (setting.revealfx[0]=="slide"){ //create outer DIV that will house all the fieldset.sectionwrap elements $sectionswrapper_inner = '';
$sectionswrapper=$('<div style="position:relative;overflow:hidden;"></div>').insertBefore($sections.eq(0)) //add DIV above the first fieldset.sectionwrap element
$sectionswrapper_inner=$('<div style="position:absolute;left:0;top:0;"></div>') //create inner DIV of $sectionswrapper that will scroll to reveal a fieldset element if (0 == $theform.length)
//if form with specified ID doesn't exist, try name attribute instead
$theform = $('form[name=' + setting.formid + ']');
if ('slide' == setting.revealfx[0]) {
//create outer DIV that will house all the fieldset.sectionwrap elements
//add DIV above the first fieldset.sectionwrap element
$sectionswrapper = $('<div class="step-outer" style="position:relative"></div>').insertBefore($sections.eq(0));
//create inner DIV of $sectionswrapper that will scroll to reveal a fieldset element
$sectionswrapper_inner = $('<div class="step-inner" style="position:absolute; left:0"></div>');
} }
var maxfieldsetwidth=$sections.eq(0).outerWidth() //variable to get width of widest fieldset.sectionwrap
$sections.slice(1).each(function(i){ //loop through $sections (starting from 2nd one) //variable to get width of widest fieldset.sectionwrap
maxfieldsetwidth=Math.max($(this).outerWidth(), maxfieldsetwidth) var maxfieldsetwidth = $sections.eq(0).outerWidth();
})
maxfieldsetwidth+=2 //add 2px to final width to reveal fieldset border (if not removed via CSS) //loop through $sections (starting from 2nd one)
thiswizard.maxfieldsetwidth=maxfieldsetwidth $sections.slice(1).each(function(){
$sections.each(function(i){ //loop through $sections again maxfieldsetwidth = Math.max($(this).outerWidth(), maxfieldsetwidth)
var $section=$(this) });
if (setting.revealfx[0]=="slide"){
$section.data('page', i).css({position:'absolute', top:0, left:maxfieldsetwidth*i}).appendTo($sectionswrapper_inner) //set fieldset position to "absolute" and move it to inside sectionswrapper_inner DIV //add default 2px or param px to final width to reveal fieldset border (if not removed via CSS)
maxfieldsetwidth += setting.fieldsetborderwidth;
thiswizard.maxfieldsetwidth = maxfieldsetwidth;
//loop through $sections again
$sections.each(function(i){
var $section = $(this);
if ('slide' == setting.revealfx[0]) {
//set fieldset position to 'absolute' and move it to inside sectionswrapper_inner DIV
$section.data('page', i).css({position: 'absolute', left: maxfieldsetwidth * i}).appendTo($sectionswrapper_inner);
} }
$section.data('elements', []) //empty array to contain elements within this section that should be validated for data (applicable only if validate option is defined) //empty array to contain elements within this section that should be validated for data (applicable only if validate option is defined)
//create each "step" DIV and add it to main Steps Container: $section.data('elements', []);
var $thestep=$('<div class="step disabledstep" />').data('section', i).html('Step '+(i+1)+'<div class="smalltext">'+$section.find('legend:eq(0)').text()+'<p></p></div>').appendTo($stepsguide)
$thestep.click(function(){ //assign behavior to each step div //create each 'step' DIV and add it to main Steps Container:
var $stepwords = ['first', 'second', 'third'], $thestep = $('<div class="step disabledstep" />').data('section', i).html(($stepwords[i]
+ ' step') + '<div class="smalltext">' + $section.find('legend:eq(0)').text() + '<p></p></div>').appendTo($stepsguide);
//assign behavior to each step div
$thestep.click(function(){
thiswizard.loadsection($(this).data('section')) thiswizard.loadsection($(this).data('section'))
}) })
}) });
if (setting.revealfx[0]=="slide"){
$sectionswrapper.width(maxfieldsetwidth) //set fieldset wrapper to width of widest fieldset if ('slide' == setting.revealfx[0]) {
$sectionswrapper.append($sectionswrapper_inner) //add $sectionswrapper_inner as a child of $sectionswrapper $sectionswrapper.width(maxfieldsetwidth); //set fieldset wrapper to width of widest fieldset
$sectionswrapper.append($sectionswrapper_inner); //add $sectionswrapper_inner as a child of $sectionswrapper
$stepsguide.append('<div style="clear:both">&nbsp;</div>')
} }
$theform.prepend($stepsguide) //add $thesteps div to the beginning of the form
//add $thesteps div to the beginning of the form
$theform.prepend($stepsguide);
//$stepsguide.insertBefore($sectionswrapper) //add Steps Container before sectionswrapper container //$stepsguide.insertBefore($sectionswrapper) //add Steps Container before sectionswrapper container
var $thesteps=$stepsguide.find('div.step') var $thesteps = $stepsguide.find('div.step');
//create pagination DIV and add it to end of form: //create pagination DIV and add it to end of form:
var $paginatediv=$('<div class="formpaginate" style="overflow:hidden;"><span class="prev" style="float:left">Prev</span> <span class="status">Step 1 of </span> <span class="next" style="float:right">Next</span></div>') var $paginatediv = $('<div class="formpaginate">'
$theform.append($paginatediv) + '<span class="prev" style="float:left">Prev</span>'
thiswizard.$theform=$theform + ' <span class="status">step 1 of </span>'
if (setting.revealfx[0]=="slide"){ + ' <span class="next" style="float:right">Next</span>'
thiswizard.sections={$outerwrapper:$sectionswrapper, $innerwrapper:$sectionswrapper_inner, $sections:$sections, count:$sections.length} //remember various parts of section container + '</div>');
$theform.append($paginatediv);
thiswizard.$theform = $theform;
if ('slide' == setting.revealfx[0]) {
//remember various parts of section container
thiswizard.sections = {
$outerwrapper: $sectionswrapper,
$innerwrapper: $sectionswrapper_inner,
$sections: $sections,
count: $sections.length
};
thiswizard.sections.$sections.show() thiswizard.sections.$sections.show()
} else {
//remember various parts of section container
thiswizard.sections = {
$sections: $sections,
count: $sections.length
};
} }
else{ thiswizard.$thesteps = $thesteps;
thiswizard.sections={$sections:$sections, count:$sections.length} //remember various parts of section container
} //remember various parts of pagination DIV
thiswizard.$thesteps=$thesteps //remember this ref thiswizard.paginatediv = {
thiswizard.paginatediv={$main:$paginatediv, $navlinks:$paginatediv.find('span.prev, span.next'), $status:$paginatediv.find('span.status')} //remember various parts of pagination DIV $main: $paginatediv,
thiswizard.paginatediv.$main.click(function(e){ //assign behavior to pagination buttons $navlinks: $paginatediv.find('span.prev, span.next'),
$status: $paginatediv.find('span.status')
};
//assign behavior to pagination buttons
thiswizard.paginatediv.$main.click(function(e){
if (/(prev)|(next)/.test(e.target.className)) if (/(prev)|(next)/.test(e.target.className))
thiswizard.loadsection(e.target.className) thiswizard.loadsection(e.target.className)
}) });
var i=(setting.persistsection)? formtowizard.routines.getCookie(setting.formid+"_persist") : 0
thiswizard.loadsection(i||0, true) //show the first section var i = (setting.persistsection ? FormToWizard.routines.getCookie(setting.formid + '_persist') : 0);
thiswizard.setting.oninit($, i, $sections.eq(i)) //call oninit event handler
if (setting.validate){ //if validate array defined //show the first section
thiswizard.addvalidatefields() //seek out and cache form elements that should be validated thiswizard.loadsection(i||0, true);
//call oninit event handler
thiswizard.setting.oninit($, i, $sections.eq(i));
//if validate array defined
if (setting.validate){
//seek out and cache form elements that should be validated
thiswizard.addvalidatefields();
thiswizard.$theform.submit(function(){ thiswizard.$theform.submit(function(){
var returnval=true for (var i = 0; i < thiswizard.sections.count; i++){
for (var i=0; i<thiswizard.sections.count; i++){
if (!thiswizard.validate(i)){ if (!thiswizard.validate(i)){
thiswizard.loadsection(i, true) thiswizard.loadsection(i, true);
returnval=false return false;
break
} }
} }
return returnval //allow or disallow form submission return true;
}) })
} }
}) })
} }
} };
formtowizard.routines={ FormToWizard.routines = {
getCookie:function(Name){ getCookie:function(Name){
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair var re = new RegExp(Name + '=[^;]+', 'i'); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value return document.cookie.match(re)[0].split('=')[1]; //return its value
return null return null
}, },
setCookie:function(name, value){ setCookie:function(name, value){
document.cookie = name+"=" + value + ";path=/" document.cookie = name + '=' + value + ';path=/';
} }
} };

View file

@ -1,227 +1,278 @@
$(document).ready(function () { $(document).ready(function () {
function populateSelect() { function populateSelect() {
if (!$('#nameToSearch').length) { if (!$('#nameToSearch').length)
return; return;
}
if ($('#indexerLangSelect option').length <= 1) { if (1 >= $('#indexerLangSelect').find('option').length) {
$.getJSON(sbRoot + '/home/addShows/getIndexerLanguages', {}, function (data) {
var selected, resultStr = '';
if (data.results.length === 0) { $.getJSON(sbRoot + '/home/addShows/getIndexerLanguages', {}, function (data) {
resultStr = '<option value="en" selected="selected">en</option>';
} else {
$.each(data.results, function (index, obj) {
if (resultStr == '') {
selected = ' selected="selected"';
} else {
selected = '';
}
resultStr += '<option value="' + obj + '"' + selected + '>' + obj + '</option>'; var resultStr = '',
}); selected = ' selected="selected"',
} elIndexerLang = $('#indexerLangSelect');
$('#indexerLangSelect').html(resultStr); if (0 === data.results.length) {
$('#indexerLangSelect').change(function () { searchIndexers(); }); resultStr = '<option value="en"' + selected + '>en</option>';
}); } else {
} $.each(data.results, function (index, obj) {
} resultStr += '<option value="' + obj + '"'
+ ('' == resultStr ? selected : '')
+ '>' + obj + '</option>';
});
}
var searchRequestXhr = null; elIndexerLang.html(resultStr);
elIndexerLang.change(function () {
searchIndexers();
});
});
}
}
function searchIndexers() { var searchRequestXhr = null;
if (!$('#nameToSearch').val().length) {
return;
}
if (searchRequestXhr) searchRequestXhr.abort(); function searchIndexers() {
var elNameToSearch = $('#nameToSearch');
var searchingFor = $('#nameToSearch').val() + ' on ' + $('#providedIndexer option:selected').text() + ' in ' + $('#indexerLangSelect').val(); if (!elNameToSearch.val().length)
$('#searchResults').empty().html('<img id="searchingAnim" src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> searching ' + searchingFor + '...'); return;
searchRequestXhr = $.ajax({ if (searchRequestXhr)
url: sbRoot + '/home/addShows/searchIndexersForShowName', searchRequestXhr.abort();
data: {'search_term': $('#nameToSearch').val(), 'lang': $('#indexerLangSelect').val(), 'indexer': $('#providedIndexer').val()},
timeout: parseInt($('#indexer_timeout').val(), 10) * 1000,
dataType: 'json',
error: function () {
$('#searchResults').empty().html('search timed out, try again or try another indexer');
},
success: function (data) {
var firstResult = true;
var resultStr = '<fieldset>\n<legend>Search Results:</legend>\n';
var checked = '';
if (data.results.length === 0) { var elTvDatabase = $('#providedIndexer'),
resultStr += '<b>No results found, try a different search.</b>'; elIndexerLang = $('#indexerLangSelect'),
} else { searchingFor = elNameToSearch.val() + ' on ' + elTvDatabase.find('option:selected').text() + ' in ' + elIndexerLang.val();
$.each(data.results, function (index, obj) {
if (firstResult) {
checked = ' checked';
firstResult = false;
} else {
checked = '';
}
var whichSeries = obj.join('|'); $('#searchResults').empty().html('<img id="searchingAnim" src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif" height="32" width="32" /> searching ' + searchingFor + '...');
searchRequestXhr = $.ajax({
url: sbRoot + '/home/addShows/searchIndexersForShowName',
data: {
'search_term': elNameToSearch.val(),
'lang': elIndexerLang.val(),
'indexer': elTvDatabase.val()
},
timeout: parseInt($('#indexer_timeout').val(), 10) * 1000,
dataType: 'json',
error: function () {
$('#searchResults').empty().html('search timed out, try again or try another database');
},
success: function (data) {
var resultStr = '', checked = '', rowType, row = 0;
resultStr += '<input type="radio" id="whichSeries" name="whichSeries" value="' + whichSeries + '"' + checked + ' /> '; if (0 === data.results.length) {
if (data.langid && data.langid != "") { resultStr += '<span class="boldest">Sorry, no results found. Try a different search.</span>';
resultStr += '<a href="' + anonURL + obj[2] + obj[3] + '&lid=' + data.langid + '" onclick=\"window.open(this.href, \'_blank\'); return false;\" ><b>' + obj[4] + '</b></a>'; } else {
} else { $.each(data.results, function (index, obj) {
resultStr += '<a href="' + anonURL + obj[2] + obj[3] + '" onclick=\"window.open(this.href, \'_blank\'); return false;\" ><b>' + obj[4] + '</b></a>'; checked = (0 == row ? ' checked' : '');
} rowType = (0 == row % 2 ? '' : ' class="alt"');
row++;
if (obj[5] !== null) { var whichSeries = obj.join('|'),
var startDate = new Date(obj[5]); showstartdate = '';
var today = new Date();
if (startDate > today) {
resultStr += ' (will debut on ' + obj[5] + ')';
} else {
resultStr += ' (started on ' + obj[5] + ')';
}
}
if (obj[0] !== null) { if (null !== obj[5]) {
resultStr += ' [' + obj[0] + ']'; var startDate = new Date(obj[5]);
} var today = new Date();
showstartdate = '&nbsp;<span class="stepone-result-date">('
+ (startDate > today ? 'will debut' : 'started')
+ ' on ' + obj[5] + ')</span>';
}
resultStr += '<br />'; resultStr += '<div' + rowType + '>'
}); + '<input id="whichSeries" type="radio"'
resultStr += '</ul>'; + ' class="stepone-result-radio"'
} + ' title="Add show <span style=\'color: rgb(66, 139, 202)\'>' + obj[4] + '</span>"'
resultStr += '</fieldset>'; + ' name="whichSeries"'
$('#searchResults').html(resultStr); + ' value="' + whichSeries + '"'
updateSampleText(); + checked
myform.loadsection(0); + ' />'
} + '<a'
}); + ' class="stepone-result-title"'
} + ' title="View detail for <span style=\'color: rgb(66, 139, 202)\'>' + obj[4] + '</span>"'
+ ' href="' + anonURL + obj[2] + obj[3] + ((data.langid && '' != data.langid) ? '&lid=' + data.langid : '') + '"'
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
+ '>' + obj[4] + '</a>'
+ showstartdate
+ (null == obj[0] ? ''
: '&nbsp;<span class="stepone-result-db grey-text">' + '[' + obj[0] + ']' + '</span>')
+ '</div>' + "\n";
});
}
$('#searchResults').html(
'<fieldset>' + "\n" + '<legend class="legendStep" style="margin-bottom: 15px">'
+ (0 < row ? row : 'No')
+ ' search result' + (1 == row ? '' : 's') + '...</legend>' + "\n"
+ resultStr
+ '</fieldset>'
);
updateSampleText();
myform.loadsection(0);
$('.stepone-result-radio, .stepone-result-title').each(addQTip);
}
});
}
$('#searchName').click(function () { searchIndexers(); }); var elNameToSearch = $('#nameToSearch'),
elSearchName = $('#searchName');
if ($('#nameToSearch').length && $('#nameToSearch').val().length) { elSearchName.click(function () { searchIndexers(); });
$('#searchName').click();
}
$('#addShowButton').click(function () { if (elNameToSearch.length && elNameToSearch.val().length) {
// if they haven't picked a show don't let them submit elSearchName.click();
if (!$("input:radio[name='whichSeries']:checked").val() && !$("input:hidden[name='whichSeries']").val().length) { }
alert('You must choose a show to continue');
return false;
}
$('#addShowForm').submit(); $('#addShowButton').click(function () {
}); // if they haven't picked a show don't let them submit
if (!$('input:radio[name="whichSeries"]:checked').val()
&& !$('input:hidden[name="whichSeries"]').val().length) {
alert('You must choose a show to continue');
return false;
}
$('#addShowForm').submit();
});
$('#skipShowButton').click(function () { $('#skipShowButton').click(function () {
$('#skipShow').val('1'); $('#skipShow').val('1');
$('#addShowForm').submit(); $('#addShowForm').submit();
}); });
$('#qualityPreset').change(function () { $('#qualityPreset').change(function () {
myform.loadsection(2); myform.loadsection(2);
}); });
/*********************************************** /***********************************************
* jQuery Form to Form Wizard- (c) Dynamic Drive (www.dynamicdrive.com) * jQuery Form to Form Wizard- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use * This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more. * Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/ ***********************************************/
var myform = new formtowizard({ var myform = new FormToWizard({
formid: 'addShowForm', fieldsetborderwidth: 0,
revealfx: ['slide', 500], formid: 'addShowForm',
oninit: function () { revealfx: ['slide', 500],
populateSelect(); oninit: function () {
updateSampleText(); populateSelect();
if ($('input:hidden[name=whichSeries]').length && $('#fullShowPath').length) { updateSampleText();
goToStep(3); if ($('input:hidden[name="whichSeries"]').length && $('#fullShowPath').length) {
} goToStep(3);
} }
}); }
});
function goToStep(num) { function goToStep(num) {
$('.step').each(function () { $('.step').each(function () {
if ($.data(this, 'section') + 1 == num) { if ($.data(this, 'section') + 1 == num) {
$(this).click(); $(this).click();
} }
}); });
} }
$('#nameToSearch').focus(); elNameToSearch.focus();
function updateSampleText() { function updateSampleText() {
// if something's selected then we have some behavior to figure out // if something's selected then we have some behavior to figure out
var show_name, sep_char; var show_name,
// if they've picked a radio button then use that sep_char,
if ($('input:radio[name=whichSeries]:checked').length) { elRadio = $('input:radio[name="whichSeries"]:checked'),
show_name = $('input:radio[name=whichSeries]:checked').val().split('|')[4]; elInput = $('input:hidden[name="whichSeries"]'),
} elRootDirs = $('#rootDirs'),
// if we provided a show in the hidden field, use that elFullShowPath = $('#fullShowPath');
else if ($('input:hidden[name=whichSeries]').length && $('input:hidden[name=whichSeries]').val().length) {
show_name = $('#providedName').val();
} else {
show_name = '';
}
var sample_text = 'Adding show <b>' + show_name + '</b> into <b>'; // if they've picked a radio button then use that
if (elRadio.length) {
show_name = elRadio.val().split('|')[4];
}
// if we provided a show in the hidden field, use that
else if (elInput.length && elInput.val().length) {
show_name = $('#providedName').val();
} else {
show_name = '';
}
// if we have a root dir selected, figure out the path var sample_text = '<p>Adding show <span class="show-name">' + show_name + '</span>'
if ($("#rootDirs option:selected").length) { + ('' == show_name ? 'into<br />' : '<br />into')
var root_dir_text = $('#rootDirs option:selected').val(); + ' <span class="show-dest">';
if (root_dir_text.indexOf('/') >= 0) {
sep_char = '/';
} else if (root_dir_text.indexOf('\\') >= 0) {
sep_char = '\\';
} else {
sep_char = '';
}
if (root_dir_text.substr(sample_text.length - 1) != sep_char) { // if we have a root dir selected, figure out the path
root_dir_text += sep_char; if (elRootDirs.find('option:selected').length) {
} var root_dir_text = elRootDirs.find('option:selected').val();
root_dir_text += '<i>||</i>' + sep_char; if (root_dir_text.indexOf('/') >= 0) {
sep_char = '/';
} else if (root_dir_text.indexOf('\\') >= 0) {
sep_char = '\\';
} else {
sep_char = '';
}
sample_text += root_dir_text; if (root_dir_text.substr(sample_text.length - 1) != sep_char) {
} else if ($('#fullShowPath').length && $('#fullShowPath').val().length) { root_dir_text += sep_char;
sample_text += $('#fullShowPath').val(); }
} else { root_dir_text += '<i>||</i>' + sep_char;
sample_text += 'unknown dir.';
}
sample_text += '</b>'; sample_text += root_dir_text;
} else if (elFullShowPath.length && elFullShowPath.val().length) {
sample_text += elFullShowPath.val();
} else {
sample_text += 'unknown dir.';
}
// if we have a show name then sanitize and use it for the dir name sample_text += '</span></p>';
if (show_name.length) {
$.get(sbRoot + '/home/addShows/sanitizeFileName', {name: show_name}, function (data) {
$('#displayText').html(sample_text.replace('||', data));
});
// if not then it's unknown
} else {
$('#displayText').html(sample_text.replace('||', '??'));
}
// also toggle the add show button // if we have a show name then sanitize and use it for the dir name
if (($("#rootDirs option:selected").length || ($('#fullShowPath').length && $('#fullShowPath').val().length)) && if (show_name.length) {
($('input:radio[name=whichSeries]:checked').length) || ($('input:hidden[name=whichSeries]').length && $('input:hidden[name=whichSeries]').val().length)) { $.get(sbRoot + '/home/addShows/sanitizeFileName', {name: show_name}, function (data) {
$('#addShowButton').attr('disabled', false); $('#displayText').html(sample_text.replace('||', data));
} else { });
$('#addShowButton').attr('disabled', true); // if not then it's unknown
} } else {
} $('#displayText').html(sample_text.replace('||', '??'));
}
$('#rootDirText').change(updateSampleText); // also toggle the add show button
$('#whichSeries').live('change', updateSampleText); if ((elRootDirs.find('option:selected').length || (elFullShowPath.length && elFullShowPath.val().length)) &&
(elRadio.length) || (elInput.length && elInput.val().length)) {
$('#addShowButton').attr('disabled', false);
} else {
$('#addShowButton').attr('disabled', true);
}
}
$('#nameToSearch').keyup(function (event) { $('#rootDirText').change(updateSampleText);
if (event.keyCode == 13) {
$('#searchName').click(); $('#searchResults').on('click', '.stepone-result-radio', updateSampleText);
}
}); elNameToSearch.keyup(function (event) {
if (event.keyCode == 13) {
elSearchName.click();
}
});
var addQTip = (function() {
$(this).css('cursor', 'help');
$(this).qtip({
show: {
solo: true
},
position: {
viewport: $(window),
my: 'left center',
adjust: {
y: -10,
x: 2
}
},
style: {
tip: {
corner: true,
method: 'polygon'
},
classes: 'qtip-rounded qtip-bootstrap qtip-shadow ui-tooltip-sb'
}
});
});
}); });

View file

@ -1,36 +1,31 @@
function setFromPresets (preset) {
var elCustomQuality = $('#customQuality'),
selected = 'selected';
if (0 == preset) {
elCustomQuality.show();
return;
}
elCustomQuality.hide();
$('#anyQualities').find('option').each(function() {
var result = preset & $(this).val();
$(this).attr(selected, (0 < result ? selected : false));
});
$('#bestQualities').find('option').each(function() {
var result = preset & ($(this).val() << 16);
$(this).attr(selected, (result > 0 ? selected: false));
});
}
$(document).ready(function() { $(document).ready(function() {
function setFromPresets (preset) { var elQualityPreset = $('#qualityPreset'),
if (preset == 0) { selected = ':selected';
$('#customQuality').show();
return;
} else {
$('#customQuality').hide();
}
$('#anyQualities option').each(function(i) { elQualityPreset.change(function() {
var result = preset & $(this).val(); setFromPresets($('#qualityPreset').find(selected).val());
if (result > 0) { });
$(this).attr('selected', 'selected');
} else {
$(this).attr('selected', false);
}
});
$('#bestQualities option').each(function(i) { setFromPresets(elQualityPreset.find(selected).val());
var result = preset & ($(this).val() << 16); });
if (result > 0) {
$(this).attr('selected', 'selected');
} else {
$(this).attr('selected', false);
}
});
return;
}
$('#qualityPreset').change(function() {
setFromPresets($('#qualityPreset :selected').val());
});
setFromPresets($('#qualityPreset :selected').val());
});

View file

@ -1,144 +1,211 @@
$(document).ready(function () { $(document).ready(function (){
function getRecommendedShows() {
$.getJSON(sbRoot + '/home/addShows/getRecommendedShows', {}, function (data) {
var firstResult = true;
var resultStr = '<fieldset>\n<legend>Recommended Shows:</legend>\n';
var checked = '';
if (data.results.length === 0) { function getRecommendedShows(){
resultStr += '<b>No recommended shows found, update your watched shows list on trakt.tv.</b>';
} else {
$.each(data.results, function (index, obj) {
if (firstResult) {
checked = ' checked';
firstResult = false;
} else {
checked = '';
}
var whichSeries = obj.join('|'); $('#searchResults').empty().html('<img id="searchingAnim"'
+ ' src="' + sbRoot + '/images/loading32' + themeSpinner + '.gif"'
+ ' height="32" width="32" />'
+ ' fetching recommendations...');
resultStr += '<input type="radio" id="whichSeries" name="whichSeries" value="' + whichSeries + '"' + checked + ' /> '; $.getJSON(sbRoot + '/home/addShows/getRecommendedShows',
resultStr += '<a href="' + anonURL + obj[1] + '" onclick="window.open(this.href, \'_blank\'); return false;"><b>' + obj[2] + '</b></a>'; {},
function (data){
var resultStr = '', checked = '', rowType, row = 0;
if (obj[4] !== null) { if (null === data || 0 === data.results.length){
var startDate = new Date(obj[4]); resultStr += '<p>Sorry, no recommended shows found, this can happen from time to time.</p>'
var today = new Date(); + '<p>However, if the issue persists, then try updating your watched shows list on trakt.tv</p>';
if (startDate > today) { } else {
resultStr += ' (will debut on ' + obj[4] + ')';
} else {
resultStr += ' (started on ' + obj[4] + ')';
}
}
if (obj[0] !== null) { $.each(data.results, function (index, obj){
resultStr += ' [' + obj[0] + ']'; checked = (0 == row ? ' checked' : '');
} rowType = (0 == row % 2 ? '' : ' class="alt"');
row++;
if (obj[3] !== null) { var whichSeries = obj[6] + '|' + obj[0] + '|' + obj[1] + '|' + obj[2] + '|' + obj[3],
resultStr += '<br />' + obj[3]; showstartdate = '';
}
resultStr += '<p /><br />'; if (null !== obj[3]){
}); var startDate = new Date(obj[3]);
resultStr += '</ul>'; var today = new Date();
} showstartdate = '&nbsp;<span class="stepone-result-date">('
resultStr += '</fieldset>'; + (startDate > today ? 'will debut' : 'started')
$('#searchResults').html(resultStr); + ' on ' + obj[3] + ')</span>';
updateSampleText(); }
myform.loadsection(0);
});
}
$('#addShowButton').click(function () { resultStr += '<div' + rowType + '>'
// if they haven't picked a show don't let them submit + '<input id="whichSeries" type="radio"'
if (!$("input:radio[name='whichSeries']:checked").val() && !$("input:hidden[name='whichSeries']").val().length) { + ' class="stepone-result-radio"'
alert('You must choose a show to continue'); + ' style="float:left;margin-top:4px"'
return false; + ' title="Add show <span style=\'color: rgb(66, 139, 202)\'>' + obj[1] + '</span>"'
} + ' name="whichSeries"'
+ ' value="' + whichSeries + '"'
+ checked
+ ' />'
+ '<div style="margin-left:20px">'
+ '<a'
+ ' class="stepone-result-title"'
+ ' style="margin-left:5px"'
+ ' title="View <span class=\'boldest\'>Trakt</span> detail for <span style=\'color: rgb(66, 139, 202)\'>' + obj[1] + '</span>"'
+ ' href="' + anonURL + obj[0] + '"'
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
+ '>' + obj[1] + '</a>'
+ showstartdate
+ (null == obj[6] ? ''
: '&nbsp;'
+ '<span class="stepone-result-db grey-text">'
+ '<a class="service" href="' + anonURL + obj[7] + '"'
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
+ ' title="View <span class=\'boldest\'>' + obj[4] + '</span> detail for <span style=\'color: rgb(66, 139, 202)\'>' + obj[1] + '</span>"'
+ '>'
+ '<img alt="' + obj[4] + '" height="16" width="16" src="' + sbRoot + '/images/' + obj[5] + '" />'
+ ''
+ '</a>'
+ '</span>'
)
+ (null == obj[10] ? ''
: '&nbsp;'
+ '<span class="stepone-result-db grey-text">'
+ '<a class="service" href="' + anonURL + obj[11] + '"'
+ ' onclick="window.open(this.href, \'_blank\'); return false;"'
+ ' title="View <span class=\'boldest\'>' + obj[8] + '</span> detail for <span style=\'color: rgb(66, 139, 202)\'>' + obj[1] + '</span>"'
+ '>'
+ '<img alt="' + obj[8] + '" height="16" width="16" src="' + sbRoot + '/images/' + obj[9] + '" />'
+ ''
+ '</a>'
+ '</span>'
)
+ (null == obj[2] ? ''
: '&nbsp;<div class="stepone-result-overview grey-text">' + obj[2] + '</div>')
+ '</div></div>';
});
}
$('#recommendedShowsForm').submit(); $('#searchResults').html(
}); '<fieldset>' + "\n" + '<legend class="legendStep" style="margin-bottom: 15px">'
+ (0 < row ? row : 'No')
+ ' recommended result' + (1 == row ? '' : 's') + '...</legend>' + "\n"
+ resultStr
+ '</fieldset>'
);
updateSampleText();
myform.loadsection(0);
$('.stepone-result-radio, .stepone-result-title, .service').each(addQTip);
}
);
}
$('#qualityPreset').change(function () { $('#addShowButton').click(function () {
myform.loadsection(2); // if they haven't picked a show don't let them submit
}); if (!$('input:radio[name="whichSeries"]:checked').val()
&& !$('input:hidden[name="whichSeries"]').val().length) {
alert('You must choose a show to continue');
return false;
}
$('#addShowForm').submit();
});
var myform = new formtowizard({ $('#qualityPreset').change(function (){
formid: 'recommendedShowsForm', myform.loadsection(2);
revealfx: ['slide', 500], });
oninit: function () {
getRecommendedShows();
updateSampleText();
}
});
function goToStep(num) { var myform = new FormToWizard({
$('.step').each(function () { fieldsetborderwidth: 0,
if ($.data(this, 'section') + 1 == num) { formid: 'addShowForm',
$(this).click(); revealfx: ['slide', 500],
} oninit: function (){
}); getRecommendedShows();
} updateSampleText();
}
});
function updateSampleText() { function goToStep(num){
// if something's selected then we have some behavior to figure out $('.step').each(function (){
if ($.data(this, 'section') + 1 == num){
$(this).click();
}
});
}
var show_name, sep_char; function updateSampleText(){
// if they've picked a radio button then use that // if something's selected then we have some behavior to figure out
if ($('input:radio[name=whichSeries]:checked').length) {
show_name = $('input:radio[name=whichSeries]:checked').val().split('|')[2];
} else {
show_name = '';
}
var sample_text = 'Adding show <b>' + show_name + '</b> into <b>'; var elRadio = $('input:radio[name="whichSeries"]:checked'),
elFullShowPath = $('#fullShowPath'),
sep_char = '',
root_dirs = $('#rootDirs'),
// if they've picked a radio button then use that
show_name = (elRadio.length ? elRadio.val().split('|')[2] : ''),
sample_text = '<p>Adding show <span class="show-name">' + show_name + '</span>'
+ ('' == show_name ? 'into<br />' : '<br />into')
+ ' <span class="show-dest">';
// if we have a root dir selected, figure out the path // if we have a root dir selected, figure out the path
if ($("#rootDirs option:selected").length) { if (root_dirs.find('option:selected').length){
var root_dir_text = $('#rootDirs option:selected').val(); var root_dir_text = root_dirs.find('option:selected').val();
if (root_dir_text.indexOf('/') >= 0) { if (0 <= root_dir_text.indexOf('/')){
sep_char = '/'; sep_char = '/';
} else if (root_dir_text.indexOf('\\') >= 0) { } else if (0 <= root_dir_text.indexOf('\\')){
sep_char = '\\'; sep_char = '\\';
} else { }
sep_char = '';
}
if (root_dir_text.substr(sample_text.length - 1) != sep_char) { root_dir_text += (sep_char != root_dir_text.substr(sample_text.length - 1)
root_dir_text += sep_char; ? sep_char : '')
} + '<i>||</i>' + sep_char;
root_dir_text += '<i>||</i>' + sep_char;
sample_text += root_dir_text; sample_text += root_dir_text;
} else if ($('#fullShowPath').length && $('#fullShowPath').val().length) { } else if (elFullShowPath.length && elFullShowPath.val().length){
sample_text += $('#fullShowPath').val(); sample_text += elFullShowPath.val();
} else { } else {
sample_text += 'unknown dir.'; sample_text += 'unknown dir.';
} }
sample_text += '</b>'; sample_text += '</span></p>';
// if we have a show name then sanitize and use it for the dir name // if we have a show name then sanitize and use it for the dir name
if (show_name.length) { if (show_name.length){
$.get(sbRoot + '/home/addShows/sanitizeFileName', {name: show_name}, function (data) { $.get(sbRoot + '/home/addShows/sanitizeFileName', {name: show_name}, function (data){
$('#displayText').html(sample_text.replace('||', data)); $('#displayText').html(sample_text.replace('||', data));
}); });
// if not then it's unknown // if not then it's unknown
} else { } else {
$('#displayText').html(sample_text.replace('||', '??')); $('#displayText').html(sample_text.replace('||', '??'));
} }
// also toggle the add show button // also toggle the add show button
if (($("#rootDirs option:selected").length || ($('#fullShowPath').length && $('#fullShowPath').val().length)) && $('#addShowButton').attr('disabled',
($('input:radio[name=whichSeries]:checked').length)) { ((root_dirs.find('option:selected').length
$('#addShowButton').attr('disabled', false); || (elFullShowPath.length && elFullShowPath.val().length))
} else { && elRadio.length
$('#addShowButton').attr('disabled', true); ? false : true));
} }
}
$('#rootDirText').change(updateSampleText); var addQTip = (function(){
$('#whichSeries').live('change', updateSampleText); $(this).css('cursor', 'help');
$(this).qtip({
show: {
solo: true
},
position: {
viewport: $(window),
my: 'left center',
adjust: {
y: -10,
x: 2
}
},
style: {
tip: {
corner: true,
method: 'polygon'
},
classes: 'qtip-rounded qtip-bootstrap qtip-shadow ui-tooltip-sb'
}
});
});
$('#rootDirText').change(updateSampleText);
$('#searchResults').on('click', '.stepone-result-radio', updateSampleText);
}); });

View file

@ -2810,7 +2810,7 @@ class NewHomeAddShows(MainHandler):
cur_dir = { cur_dir = {
'dir': cur_path, 'dir': cur_path,
'display_dir': '<b>' + ek.ek(os.path.dirname, cur_path) + os.sep + '</b>' + ek.ek( 'display_dir': '<span class="filepath">' + ek.ek(os.path.dirname, cur_path) + os.sep + '</span>' + ek.ek(
os.path.basename, os.path.basename,
cur_path), cur_path),
} }
@ -2827,6 +2827,9 @@ class NewHomeAddShows(MainHandler):
indexer_id = show_name = indexer = None indexer_id = show_name = indexer = None
for cur_provider in sickbeard.metadata_provider_dict.values(): for cur_provider in sickbeard.metadata_provider_dict.values():
if indexer_id and show_name:
continue
(indexer_id, show_name, indexer) = cur_provider.retrieveShowMetadata(cur_path) (indexer_id, show_name, indexer) = cur_provider.retrieveShowMetadata(cur_path)
# default to TVDB if indexer was not detected # default to TVDB if indexer was not detected
@ -2854,6 +2857,10 @@ class NewHomeAddShows(MainHandler):
Display the new show page which collects a tvdb id, folder, and extra options and Display the new show page which collects a tvdb id, folder, and extra options and
posts them to addNewShow posts them to addNewShow
""" """
self.set_header('Cache-Control', 'no-cache, no-store, must-revalidate')
self.set_header('Pragma', 'no-cache')
self.set_header('Expires', '0')
t = PageTemplate(headers=self.request.headers, file="home_newShow.tmpl") t = PageTemplate(headers=self.request.headers, file="home_newShow.tmpl")
t.submenu = HomeMenu() t.submenu = HomeMenu()
@ -2899,6 +2906,10 @@ class NewHomeAddShows(MainHandler):
Display the new show page which collects a tvdb id, folder, and extra options and Display the new show page which collects a tvdb id, folder, and extra options and
posts them to addNewShow posts them to addNewShow
""" """
self.set_header('Cache-Control', 'no-cache, no-store, must-revalidate')
self.set_header('Pragma', 'no-cache')
self.set_header('Expires', '0')
t = PageTemplate(headers=self.request.headers, file="home_recommendedShows.tmpl") t = PageTemplate(headers=self.request.headers, file="home_recommendedShows.tmpl")
t.submenu = HomeMenu() t.submenu = HomeMenu()
@ -2920,11 +2931,21 @@ class NewHomeAddShows(MainHandler):
return return
map(final_results.append, map(final_results.append,
([int(show['tvdb_id'] or 0) if sickbeard.TRAKT_DEFAULT_INDEXER == 1 else int(show['tvdb_id'] or 0), ([show['url'],
show['url'], show['title'], show['overview'], show['title'],
datetime.date.fromtimestamp(int(show['first_aired']) / 1000.0).strftime('%Y%m%d')] for show in show['overview'],
recommendedlist if not helpers.findCertainShow(sickbeard.showList, indexerid=int(show['tvdb_id'])))) sbdatetime.sbdatetime.sbfdate(datetime.date.fromtimestamp(int(show['first_aired']))),
sickbeard.indexerApi(1).name,
sickbeard.indexerApi(1).config['icon'],
int(show['tvdb_id'] or 0),
'%s%s' % (sickbeard.indexerApi(1).config['show_url'], int(show['tvdb_id'] or 0)),
sickbeard.indexerApi(2).name,
sickbeard.indexerApi(2).config['icon'],
int(show['tvrage_id'] or 0),
'%s%s' % (sickbeard.indexerApi(2).config['show_url'], int(show['tvrage_id'] or 0))
] for show in recommendedlist if not helpers.findCertainShow(sickbeard.showList, indexerid=int(show['tvdb_id']))))
self.set_header('Content-Type', 'application/json')
return json.dumps({'results': final_results}) return json.dumps({'results': final_results})
def addRecommendedShow(self, whichSeries=None, indexerLang="en", rootDir=None, defaultStatus=None, def addRecommendedShow(self, whichSeries=None, indexerLang="en", rootDir=None, defaultStatus=None,