mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-01 02:29:26 +01:00
Merge branch 'new-interface' into develop
This commit is contained in:
310
data/css/data_table.css
Normal file
310
data/css/data_table.css
Normal file
@@ -0,0 +1,310 @@
|
||||
.dataTables_wrapper {
|
||||
border-radius: 20px;
|
||||
-webkit-border-radius: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
width: 88%;
|
||||
margin: 20px auto 0 auto;
|
||||
padding: 25px;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
min-height: 155px;
|
||||
clear: both;
|
||||
_height: 302px;
|
||||
zoom: 1; /* Feeling sorry for IE */
|
||||
}
|
||||
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
width: 50%;
|
||||
float: left;
|
||||
background-color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 44px;
|
||||
* width: 50px;
|
||||
float: right;
|
||||
text-align: right;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Pagination nested */
|
||||
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
margin-left: 3px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous {
|
||||
background-image: url('../images/back_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_previous {
|
||||
background-image: url('../images/back_enabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_disabled_next {
|
||||
background-image: url('../images/forward_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_next {
|
||||
background-image: url('../images/forward_enabled.jpg');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables display
|
||||
*/
|
||||
table.display {
|
||||
margin: 20px auto;
|
||||
clear: both;
|
||||
|
||||
/* Note Firefox 3.5 and before have a bug with border-collapse
|
||||
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
|
||||
* border-spacing: 0; is one possible option. Conditional-css.com is
|
||||
* useful for this kind of thing
|
||||
*
|
||||
* Further note IE 6/7 has problems when calculating widths with border width.
|
||||
* It subtracts one px relative to the other browsers from the first column, and
|
||||
* adds one to the end...
|
||||
*
|
||||
* If you want that effect I'd suggest setting a border-top/left on th/td's and
|
||||
* then filling in the gaps with other borders.
|
||||
*/
|
||||
}
|
||||
|
||||
table.display thead th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
background-color: white;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
table.display tfoot th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-top: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.display tr.heading2 td {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.display td {
|
||||
padding: 3px 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
table.display td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background: url('../images/sort_asc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background: url('../images/sort_desc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background: url('../images/sort_both.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_asc_disabled {
|
||||
background: url('../images/sort_asc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc_disabled {
|
||||
background: url('../images/sort_desc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables row classes
|
||||
*/
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeU {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
table.display tr.odd.gradeZ {
|
||||
background-color: #FCFAFA;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeZ {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Misc
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.top .dataTables_info {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_empty {
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-color: white;
|
||||
height: 50px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
tfoot input {
|
||||
margin: 0.5em 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
tfoot input.search_init {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
td.group {
|
||||
background-color: #d1cfd0;
|
||||
border-bottom: 2px solid #A19B9E;
|
||||
border-top: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
td.details {
|
||||
background-color: #d1cfd0;
|
||||
border: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
.paging_full_numbers {
|
||||
width: 400px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button,
|
||||
.paging_full_numbers span.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
table.display tr.even.row_selected td {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
table.display tr.odd.row_selected td {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
div.box {
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
border: 1px solid #8080FF;
|
||||
background-color: #E5E5FF;
|
||||
}
|
||||
431
data/css/style.css
Normal file → Executable file
431
data/css/style.css
Normal file → Executable file
@@ -1,149 +1,85 @@
|
||||
body{
|
||||
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial,
|
||||
Helvetica, sans-serif;
|
||||
font-size:16px;
|
||||
background-color: #ebf4fb;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h1{
|
||||
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial,
|
||||
Helvetica, sans-serif;
|
||||
size:30px;
|
||||
color: #8B8989;
|
||||
}
|
||||
.container{
|
||||
width: 95%;
|
||||
}
|
||||
.header{
|
||||
background-color: #EEB4B4;
|
||||
width: 80%;
|
||||
}
|
||||
.config{
|
||||
font-size:14px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.configtable{
|
||||
background-color: #eeeeee;
|
||||
width: 95%;
|
||||
padding: 15px;
|
||||
line-height: 12px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.logo{
|
||||
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial,
|
||||
Helvetica, sans-serif;
|
||||
font-size:20px;
|
||||
color: #8B8989;
|
||||
margin-left: 30px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.search{
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 70px;
|
||||
}
|
||||
.data{
|
||||
background-color: #ebf4fb;
|
||||
font-size:24px;
|
||||
}
|
||||
.datanil{
|
||||
background-color: #ebf4fb;
|
||||
font-size:36px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
top:150px;
|
||||
}
|
||||
.table{
|
||||
padding: 10px;
|
||||
font-size:24px;
|
||||
background-color: #ffffff;
|
||||
width: 95%;
|
||||
margin-top: 25px;
|
||||
margin-left: auto;
|
||||
margin-right: 0px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.tableleft{
|
||||
padding: 3px;
|
||||
background-color: #ffffff;
|
||||
float: left;
|
||||
width: 46%;
|
||||
height: 200px;
|
||||
margin-top: 25px;
|
||||
margin-left: 25px;
|
||||
margin-right: auto;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.tableright{
|
||||
padding: 3px;
|
||||
background-color: #ffffff;
|
||||
width: 46%;
|
||||
height: 200px;
|
||||
margin-top: 25px;
|
||||
margin-left: auto;
|
||||
margin-right: 0px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.nav{
|
||||
padding: 2px;
|
||||
font-size:19px;
|
||||
color: grey;
|
||||
background-color: #bbbbbb;
|
||||
width: 95%;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: 10px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
word-spacing: 18px;
|
||||
}
|
||||
.center{
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.smalltext{
|
||||
font-size: 11px;
|
||||
}
|
||||
.smalltext2{
|
||||
font-size: 11px;
|
||||
margin-left: 45px;
|
||||
}
|
||||
.smalltext3{
|
||||
font-size: 11px;
|
||||
margin-left: 30px;
|
||||
color: #867970;
|
||||
}
|
||||
.mediumtext{
|
||||
font-size: 16px;
|
||||
margin-left: 100px;
|
||||
}
|
||||
.mediumcentered{
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.bluecenter{
|
||||
color: #0000FF;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.logtext{
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
}
|
||||
.bigtext{
|
||||
font-size: 22px;
|
||||
}
|
||||
.updatebar{
|
||||
text-align: center;
|
||||
}
|
||||
.version{
|
||||
font-size: 12px;
|
||||
}
|
||||
/* HTML5 ✰ Boilerplate */
|
||||
|
||||
html, body, div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
|
||||
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
blockquote, q { quotes: none; }
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after { content: ''; content: none; }
|
||||
ins { background-color: #ff9; color: #000; text-decoration: none; }
|
||||
mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
|
||||
del { text-decoration: line-through; }
|
||||
abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
|
||||
table { border-collapse: collapse; border-spacing: 0; }
|
||||
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
|
||||
input, select { vertical-align: middle; }
|
||||
|
||||
body { font:13px/1.231 sans-serif; *font-size:small; }
|
||||
select, input, textarea, button { font:99% sans-serif; }
|
||||
pre, code, kbd, samp { font-family: monospace, sans-serif; }
|
||||
|
||||
html { overflow-y: scroll; }
|
||||
a:hover, a:active { outline: none; }
|
||||
ul, ol { margin-left: 2em; }
|
||||
ol { list-style-type: decimal; }
|
||||
nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
|
||||
small { font-size: 85%; }
|
||||
strong, th { font-weight: bold; }
|
||||
td { vertical-align: top; }
|
||||
|
||||
sub, sup { font-size: 75%; line-height: 0; position: relative; }
|
||||
sup { top: -0.5em; }
|
||||
sub { bottom: -0.25em; }
|
||||
|
||||
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
|
||||
textarea { overflow: auto; }
|
||||
.ie6 legend, .ie7 legend { margin-left: -7px; }
|
||||
input[type="radio"] { vertical-align: text-bottom; }
|
||||
input[type="checkbox"] { vertical-align: bottom; }
|
||||
.ie7 input[type="checkbox"] { vertical-align: baseline; }
|
||||
.ie6 input { vertical-align: text-bottom; }
|
||||
label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
|
||||
button, input, select, textarea { margin: 0; }
|
||||
input:valid, textarea:valid { }
|
||||
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
|
||||
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
|
||||
|
||||
::-moz-selection{ background: grey; color:#fff; text-shadow: none; }
|
||||
::selection { background: grey; color:#fff; text-shadow: none; }
|
||||
|
||||
button { width: auto; overflow: visible; }
|
||||
.ie7 img { -ms-interpolation-mode: bicubic; }
|
||||
|
||||
body, select, input, textarea { color: #444; }
|
||||
h1, h2, h3, h4, h5, h6 { font-weight: bold; }
|
||||
|
||||
/*
|
||||
// ========================================== \\
|
||||
|| ||
|
||||
|| Custom Styles ||
|
||||
|| ||
|
||||
\\ ========================================== //
|
||||
*/
|
||||
|
||||
a:link {
|
||||
color: #5E2612;
|
||||
text-decoration: none;
|
||||
@@ -160,45 +96,134 @@ a:active {/*colour in NN4.xx is red*/
|
||||
color: #5E2612;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a.gray {
|
||||
color: #CFCFCF
|
||||
}
|
||||
a.external {
|
||||
color: blue;
|
||||
font-size:12px;
|
||||
}
|
||||
a.blue {
|
||||
color: blue;
|
||||
}
|
||||
a.green {
|
||||
color: #3ee343;
|
||||
}
|
||||
a.externalred {
|
||||
color: red;
|
||||
font-size:12px;
|
||||
}
|
||||
div.progress-container {
|
||||
border: 1px solid #ccc;
|
||||
width: 100px;
|
||||
height: 12px;
|
||||
margin: 2px 5px 2px 0;
|
||||
padding: 1px;
|
||||
float: left;
|
||||
background: white;
|
||||
}
|
||||
a.center {
|
||||
color: blue;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.progress-container > div {
|
||||
background-color: #ACE97C;
|
||||
height: 12px
|
||||
}
|
||||
.cloud{
|
||||
padding: 0px;
|
||||
font-size:16px;
|
||||
}
|
||||
container { }
|
||||
|
||||
body { background-color: #EBF4FB; min-width: 930px; }
|
||||
|
||||
header { min-height: 68px; width: 100%; min-width: 930px; padding-left: 0px; padding-right: 10px; background-color: #CDC9C9; position: fixed; z-index: 998; }
|
||||
|
||||
h1 { font-size: 24px; }
|
||||
h2 { font-size: 20px; }
|
||||
h3 { font-size: 16px; }
|
||||
|
||||
p.indented { padding-top: 20px; margin-left: 20px; font-size: 14px; }
|
||||
p.center { text-align: center; font-size: 18px; }
|
||||
.smalltext2 { font-size: 11px; margin-left: 45px; }
|
||||
|
||||
div#updatebar { text-align: center; min-width: 970px; width: 100%; background-color: light-blue; float: left; }
|
||||
div#logo { float: left; padding-left: 10px; }
|
||||
|
||||
ul#nav { margin: 25px 0 0 0; float: left; list-style-type: none; }
|
||||
ul#nav li { margin: 40px 0px auto 10px; display: inline; }
|
||||
ul#nav li a { padding: 5px; font-size: 16px; font-weight: bold; color: #330000; text-decoration: none; }
|
||||
ul#nav li a:hover { background-color: #a3e532; }
|
||||
|
||||
div#subhead_container { height: 30px; width:100%; min-width: 1000px; background-color:#330000; float: left; list-style-type: none; z-index: 998; overflow: hidden; }
|
||||
ul#subhead_menu { margin-top: 5px; }
|
||||
ul#subhead_menu li { width: 100%; height: 100%; display: inline; }
|
||||
ul#subhead_menu li a { padding: 5px 15px 10px 15px; vertical-align: middle; color: white; font-size: 16px; text-decoration: none; }
|
||||
ul#subhead_menu li a:hover { width: 100%; height: 100%; background-color: #grey; }
|
||||
|
||||
div#searchbar { margin: 24px 30px auto auto; float: right; }
|
||||
|
||||
div#main { margin: 0; padding: 80px 0 0 0; }
|
||||
|
||||
.table_wrapper { border-radius: 20px; -webkit-border-radius: 20px; -moz-border-radius: 20px; width: 88%; margin: 20px auto 0 auto; padding: 25px; background-color: white; position: relative; min-height: 200px; clear: both; _height: 302px; zoom: 1; }
|
||||
.manage_wrapper { width: 88%; margin: 20px auto 0 auto; padding: 25px; min-height: 150px; clear: both; _height: 302px; zoom: 1; }
|
||||
.table_wrapper_left { padding: 25px; background-color: #ffffff; float: left; width: 40%; min-height: 100px; margin-top: 25px; margin-left: 30px; margin-right: auto; -moz-border-radius: 20px; border-radius: 20px; }
|
||||
.table_wrapper_right{ padding: 25px; background-color: #ffffff; width: 40%; min-height: 100px; margin-top: 25px; margin-left: auto; margin-right: 30px; -moz-border-radius: 20px; border-radius: 20px; }
|
||||
|
||||
.configtable { font-size: 14px; line-height:18px; }
|
||||
.configtable td { width: 350px; padding: 10px; vertical-align: middle; }
|
||||
.configtable tr { vertical-align: text-top; }
|
||||
|
||||
table#artist_table { background-color: white; width: 100%; padding: 20px; }
|
||||
|
||||
table#artist_table th#name { text-align: left; min-width: 200px; }
|
||||
table#artist_table th#status { text-align: left; min-width: 50px; }
|
||||
table#artist_table th#album { text-align: left; min-width: 300px; }
|
||||
table#artist_table th#have { text-align: center; }
|
||||
table#artist_table td#name { vertical-align: middle; text-align: left; min-width:200px; }
|
||||
table#artist_table td#status { vertical-align: middle; text-align: left; min-width: 50px; }
|
||||
table#artist_table td#album { vertical-align: middle; text-align: left; min-width: 300px; }
|
||||
table#artist_table td#have { vertical-align: middle; }
|
||||
|
||||
div#paddingheader { padding-top: 48px; font-size: 24px; font-weight: bold; text-align: center; }
|
||||
div#nopaddingheader { font-size: 24px; font-weight: bold; text-align: center; }
|
||||
table#album_table { background-color: white; }
|
||||
|
||||
table#album_table th#select { vertical-align: middle; text-align: left; min-width: 25px; }
|
||||
table#album_table th#albumart { text-align: left; min-width: 50px; }
|
||||
table#album_table th#albumname { text-align: center; min-width: 150px; }
|
||||
table#album_table th#reldate { width: 175px; text-align: center; min-width: 100px; }
|
||||
table#album_table th#status { width: 175px; text-align: center; min-width: 100px; }
|
||||
table#album_table th#type { width: 175px; text-align: center; min-width: 100px; }
|
||||
table#album_table td#select { vertical-align: middle; text-align: left; }
|
||||
table#album_table td#albumart { vertical-align: middle; text-align: left; }
|
||||
table#album_table td#albumname { vertical-align: middle; text-align: center; }
|
||||
table#album_table td#reldate { vertical-align: middle; text-align: center; }
|
||||
table#album_table td#status { vertical-align: middle; text-align: center; }
|
||||
table#album_table td#type { vertical-align: middle; text-align: center; }
|
||||
table#album_table td#have { vertical-align: middle; }
|
||||
|
||||
img.albumArt { float: left; padding-right: 5px; }
|
||||
div#albumheader { padding-top: 48px; height: 200px; }
|
||||
div#track_wrapper { padding-top: 20px; text-align: center; font-size: 16px; }
|
||||
|
||||
table#track_table th#number { text-align: right; min-width: 20px; }
|
||||
table#track_table th#name { text-align: center; min-width: 350px; }
|
||||
table#track_table th#duration { width: 175px; text-align: center; min-width: 100px; }
|
||||
table#track_table th#have { width: 175px; text-align: center; min-width: 100px; }
|
||||
|
||||
table#track_table td#number { vertical-align: middle; text-align: right; }
|
||||
table#track_table td#name { vertical-align: middle; text-align: center; }
|
||||
table#track_table td#duration { vertical-align: middle; text-align: center; }
|
||||
table#track_table td#have { vertical-align: middle; text-align: center; }
|
||||
|
||||
table#history_table { background-color: white; width: 100%; }
|
||||
|
||||
table#log_table { background-color: white; }
|
||||
|
||||
table#log_table th#timestamp { text-align: left; min-width: 165px; }
|
||||
table#log_table th#level { text-align: left; min-width: 75px; }
|
||||
table#log_table th#message { text-align: left; min-width: 200px; }
|
||||
|
||||
table#upcoming_table th#albumart { text-align: center; min-width: 50px; }
|
||||
table#upcoming_table th#albumname { text-align: center; min-width: 200px; }
|
||||
table#upcoming_table th#artistname { text-align: center; min-width: 150px; }
|
||||
table#upcoming_table th#reldate { text-align: center; min-width: 100px; }
|
||||
table#upcoming_table th#type { text-align: center; min-width: 75px; }
|
||||
|
||||
table#upcoming_table td#albumart { vertical-align: middle; text-align: center; min-width: 50px; }
|
||||
table#upcoming_table td#albumname { vertical-align: middle; text-align: center; min-width: 200px; }
|
||||
table#upcoming_table td#artistname { vertical-align: middle; text-align: center; min-width: 150px; }
|
||||
table#upcoming_table td#reldate { vertical-align: middle; text-align: center; min-width: 100px; }
|
||||
table#upcoming_table td#type { vertical-align: middle; text-align: center; min-width: 75px; }
|
||||
table#upcoming_table td#status { vertical-align: middle; text-align: center; }
|
||||
|
||||
table#searchresults_table th#albumname { text-align: left; min-width: 225px; }
|
||||
table#searchresults_table th#artistname { text-align: center; min-width: 325px; }
|
||||
table#searchresults_table th#score { text-align: center; min-width: 75px; }
|
||||
|
||||
table#searchresults_table td#albumname { vertical-align: middle; text-align: left; min-width: 200px; }
|
||||
table#searchresults_table td#artistname { vertical-align: middle; text-align: left; min-width: 300px; }
|
||||
table#searchresults_table td#score { vertical-align: middle; text-align: center; min-width: 75px; }
|
||||
|
||||
div.progress-container { border: 1px solid #ccc; width: 100px; height: 14px; margin: 2px 5px 2px 0; padding: 1px; float: left; background: white; }
|
||||
div.progress-container > div { background-color: #a3e532; height: 14px; }
|
||||
.havetracks { font-size: 13px; margin-left: 36px; padding-bottom: 3px; vertical-align: middle; }
|
||||
|
||||
footer { margin: 20px auto 20px auto; }
|
||||
div#version { text-align: center; font-weight: bold; }
|
||||
div#donate { text-align: center; margin: 20px auto 20px auto; }
|
||||
|
||||
div#shutdown{ text-align: center; vertical-align: middle; }
|
||||
|
||||
.cloudtag { padding-top: 30px; font-size:16px; }
|
||||
#cloud a.tag1 { font-size: 0.7em; font-weight: 100; }
|
||||
#cloud a.tag2 { font-size: 0.8em; font-weight: 200; }
|
||||
#cloud a.tag3 { font-size: 0.9em; font-weight: 300; }
|
||||
@@ -213,4 +238,46 @@ div.progress-container > div {
|
||||
#cloud { padding: 2px; line-height: 1.5em; text-align: center; }
|
||||
#cloud a { padding: 0px; }
|
||||
#cloud { margin: 0; }
|
||||
#cloud li { display: inline; }
|
||||
#cloud li { display: inline; }
|
||||
|
||||
|
||||
|
||||
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
|
||||
.hidden { display: none; visibility: hidden; }
|
||||
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
|
||||
.invisible { visibility: hidden; }
|
||||
.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
|
||||
.clearfix:after { clear: both; }
|
||||
.clearfix { zoom: 1; }
|
||||
|
||||
|
||||
@media all and (orientation:portrait) {
|
||||
|
||||
}
|
||||
|
||||
@media all and (orientation:landscape) {
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
|
||||
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
|
||||
}
|
||||
|
||||
|
||||
@media print {
|
||||
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
|
||||
-ms-filter: none !important; }
|
||||
a, a:visited { color: #444 !important; text-decoration: underline; }
|
||||
a[href]:after { content: " (" attr(href) ")"; }
|
||||
abbr[title]:after { content: " (" attr(title) ")"; }
|
||||
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
|
||||
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
|
||||
thead { display: table-header-group; }
|
||||
tr, img { page-break-inside: avoid; }
|
||||
@page { margin: 0.5cm; }
|
||||
p, h2, h3 { orphans: 3; widows: 3; }
|
||||
h2, h3{ page-break-after: avoid; }
|
||||
}
|
||||
@@ -1,827 +0,0 @@
|
||||
#form_container
|
||||
{
|
||||
background:#fff;
|
||||
border:1px solid #ccc;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
width:640px;
|
||||
}
|
||||
|
||||
#top
|
||||
{
|
||||
display:block;
|
||||
height:10px;
|
||||
margin:10px auto 0;
|
||||
width:650px;
|
||||
}
|
||||
|
||||
#footer
|
||||
{
|
||||
width:640px;
|
||||
clear:both;
|
||||
color:#999999;
|
||||
text-align:center;
|
||||
width:640px;
|
||||
padding-bottom: 15px;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
#footer a{
|
||||
color:#999999;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #999999;
|
||||
}
|
||||
|
||||
#bottom
|
||||
{
|
||||
display:block;
|
||||
height:10px;
|
||||
margin:0 auto;
|
||||
width:650px;
|
||||
}
|
||||
|
||||
form.appnitro
|
||||
{
|
||||
margin:20px 20px 0;
|
||||
padding:0 0 20px;
|
||||
}
|
||||
|
||||
/**** Form Section ****/
|
||||
.appnitro
|
||||
{
|
||||
font-family:Lucida Grande, Tahoma, Arial, Verdana, sans-serif;
|
||||
font-size:small;
|
||||
}
|
||||
|
||||
.appnitro li
|
||||
{
|
||||
width:61%;
|
||||
}
|
||||
|
||||
form ul
|
||||
{
|
||||
font-size:100%;
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
form li
|
||||
{
|
||||
display:block;
|
||||
margin:0;
|
||||
padding:4px 5px 2px 9px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
form li:after
|
||||
{
|
||||
clear:both;
|
||||
content:".";
|
||||
display:block;
|
||||
height:0;
|
||||
visibility:hidden;
|
||||
}
|
||||
|
||||
.buttons:after
|
||||
{
|
||||
clear:both;
|
||||
content:".";
|
||||
display:block;
|
||||
height:0;
|
||||
visibility:hidden;
|
||||
}
|
||||
|
||||
.buttons
|
||||
{
|
||||
clear:both;
|
||||
display:block;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
* html form li
|
||||
{
|
||||
height:1%;
|
||||
}
|
||||
|
||||
* html .buttons
|
||||
{
|
||||
height:1%;
|
||||
}
|
||||
|
||||
* html form li div
|
||||
{
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
form li div
|
||||
{
|
||||
color:#444;
|
||||
margin:0 4px 0 0;
|
||||
padding:0 0 8px;
|
||||
}
|
||||
|
||||
form li span
|
||||
{
|
||||
color:#444;
|
||||
float:left;
|
||||
margin:0 4px 0 0;
|
||||
padding:0 0 8px;
|
||||
}
|
||||
|
||||
form li div.left
|
||||
{
|
||||
display:inline;
|
||||
float:left;
|
||||
width:48%;
|
||||
}
|
||||
|
||||
form li div.right
|
||||
{
|
||||
display:inline;
|
||||
float:right;
|
||||
width:48%;
|
||||
}
|
||||
|
||||
form li div.left .medium
|
||||
{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
form li div.right .medium
|
||||
{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.clear
|
||||
{
|
||||
clear:both;
|
||||
}
|
||||
|
||||
form li div label
|
||||
{
|
||||
clear:both;
|
||||
color:#444;
|
||||
display:block;
|
||||
font-size:9px;
|
||||
line-height:9px;
|
||||
margin:0;
|
||||
padding-top:3px;
|
||||
}
|
||||
|
||||
form li span label
|
||||
{
|
||||
clear:both;
|
||||
color:#444;
|
||||
display:block;
|
||||
font-size:9px;
|
||||
line-height:9px;
|
||||
margin:0;
|
||||
padding-top:3px;
|
||||
}
|
||||
|
||||
form li .datepicker
|
||||
{
|
||||
cursor:pointer !important;
|
||||
float:left;
|
||||
height:16px;
|
||||
margin:.1em 5px 0 0;
|
||||
padding:0;
|
||||
width:16px;
|
||||
}
|
||||
|
||||
.form_description
|
||||
{
|
||||
border-bottom:1px dotted #ccc;
|
||||
clear:both;
|
||||
display:inline-block;
|
||||
margin:0 0 1em;
|
||||
}
|
||||
|
||||
.form_description[class]
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
|
||||
.form_description h2
|
||||
{
|
||||
clear:left;
|
||||
font-size:160%;
|
||||
font-weight:400;
|
||||
margin:0 0 3px;
|
||||
}
|
||||
|
||||
.form_description p
|
||||
{
|
||||
font-size:95%;
|
||||
line-height:130%;
|
||||
margin:0 0 12px;
|
||||
}
|
||||
|
||||
form hr
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
|
||||
form li.section_break
|
||||
{
|
||||
border-top:1px dotted #ccc;
|
||||
margin-top:9px;
|
||||
padding-bottom:0;
|
||||
padding-left:9px;
|
||||
padding-top:13px;
|
||||
width:97% !important;
|
||||
}
|
||||
|
||||
form ul li.first
|
||||
{
|
||||
border-top:none !important;
|
||||
margin-top:0 !important;
|
||||
padding-top:0 !important;
|
||||
}
|
||||
|
||||
form .section_break h3
|
||||
{
|
||||
font-size:110%;
|
||||
font-weight:400;
|
||||
line-height:130%;
|
||||
margin:0 0 2px;
|
||||
}
|
||||
|
||||
form .section_break p
|
||||
{
|
||||
font-size:85%;
|
||||
|
||||
margin:0 0 10px;
|
||||
}
|
||||
|
||||
/**** Buttons ****/
|
||||
input.button_text
|
||||
{
|
||||
overflow:visible;
|
||||
padding:0 7px;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
.buttons input
|
||||
{
|
||||
font-size:120%;
|
||||
margin-right:5px;
|
||||
}
|
||||
|
||||
/**** Inputs and Labels ****/
|
||||
label.description
|
||||
{
|
||||
border:none;
|
||||
color:#222;
|
||||
display:block;
|
||||
font-size:95%;
|
||||
font-weight:700;
|
||||
line-height:150%;
|
||||
padding:0 0 1px;
|
||||
}
|
||||
|
||||
span.symbol
|
||||
{
|
||||
font-size:115%;
|
||||
line-height:130%;
|
||||
}
|
||||
|
||||
input.text
|
||||
{
|
||||
background:#fff url(../../../images/shadow.gif) repeat-x top;
|
||||
border-bottom:1px solid #ddd;
|
||||
border-left:1px solid #c3c3c3;
|
||||
border-right:1px solid #c3c3c3;
|
||||
border-top:1px solid #7c7c7c;
|
||||
color:#333;
|
||||
font-size:100%;
|
||||
margin:0;
|
||||
padding:2px 0;
|
||||
}
|
||||
|
||||
input.file
|
||||
{
|
||||
color:#333;
|
||||
font-size:100%;
|
||||
margin:0;
|
||||
padding:2px 0;
|
||||
}
|
||||
|
||||
textarea.textarea
|
||||
{
|
||||
background:#fff url(../../../images/shadow.gif) repeat-x top;
|
||||
border-bottom:1px solid #ddd;
|
||||
border-left:1px solid #c3c3c3;
|
||||
border-right:1px solid #c3c3c3;
|
||||
border-top:1px solid #7c7c7c;
|
||||
color:#333;
|
||||
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
|
||||
font-size:100%;
|
||||
margin:0;
|
||||
width:99%;
|
||||
}
|
||||
|
||||
select.select
|
||||
{
|
||||
color:#333;
|
||||
font-size:100%;
|
||||
margin:1px 0;
|
||||
padding:1px 0 0;
|
||||
background:#fff url(../../../images/shadow.gif) repeat-x top;
|
||||
border-bottom:1px solid #ddd;
|
||||
border-left:1px solid #c3c3c3;
|
||||
border-right:1px solid #c3c3c3;
|
||||
border-top:1px solid #7c7c7c;
|
||||
}
|
||||
|
||||
|
||||
input.currency
|
||||
{
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
input.checkbox
|
||||
{
|
||||
display:block;
|
||||
height:13px;
|
||||
line-height:1.4em;
|
||||
margin:6px 0 0 3px;
|
||||
width:13px;
|
||||
}
|
||||
|
||||
input.radio
|
||||
{
|
||||
display:block;
|
||||
height:13px;
|
||||
line-height:1.4em;
|
||||
margin:6px 0 0 3px;
|
||||
width:13px;
|
||||
}
|
||||
|
||||
label.choice
|
||||
{
|
||||
color:#444;
|
||||
display:block;
|
||||
font-size:100%;
|
||||
line-height:1.4em;
|
||||
margin:-1.55em 0 0 25px;
|
||||
padding:4px 0 5px;
|
||||
width:90%;
|
||||
}
|
||||
|
||||
select.select[class]
|
||||
{
|
||||
margin:0;
|
||||
padding:1px 0;
|
||||
}
|
||||
|
||||
*:first-child+html select.select[class]
|
||||
{
|
||||
margin:1px 0;
|
||||
}
|
||||
|
||||
.safari select.select
|
||||
{
|
||||
font-size:120% !important;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
input.small
|
||||
{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
select.small
|
||||
{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
input.medium
|
||||
{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
select.medium
|
||||
{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
input.large
|
||||
{
|
||||
width:99%;
|
||||
}
|
||||
|
||||
select.large
|
||||
{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
textarea.small
|
||||
{
|
||||
height:5.5em;
|
||||
}
|
||||
|
||||
textarea.medium
|
||||
{
|
||||
height:10em;
|
||||
}
|
||||
|
||||
textarea.large
|
||||
{
|
||||
height:20em;
|
||||
}
|
||||
|
||||
/**** Errors ****/
|
||||
#error_message
|
||||
{
|
||||
background:#fff;
|
||||
border:1px dotted red;
|
||||
margin-bottom:1em;
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
padding-top:4px;
|
||||
text-align:center;
|
||||
width:99%;
|
||||
}
|
||||
|
||||
#error_message_title
|
||||
{
|
||||
color:#DF0000;
|
||||
font-size:125%;
|
||||
margin:7px 0 5px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#error_message_desc
|
||||
{
|
||||
color:#000;
|
||||
font-size:100%;
|
||||
margin:0 0 .8em;
|
||||
}
|
||||
|
||||
#error_message_desc strong
|
||||
{
|
||||
background-color:#FFDFDF;
|
||||
color:red;
|
||||
padding:2px 3px;
|
||||
}
|
||||
|
||||
form li.error
|
||||
{
|
||||
background-color:#FFDFDF !important;
|
||||
border-bottom:1px solid #EACBCC;
|
||||
border-right:1px solid #EACBCC;
|
||||
margin:3px 0;
|
||||
}
|
||||
|
||||
form li.error label
|
||||
{
|
||||
color:#DF0000 !important;
|
||||
}
|
||||
|
||||
form p.error
|
||||
{
|
||||
clear:both;
|
||||
color:red;
|
||||
font-size:10px;
|
||||
font-weight:700;
|
||||
margin:0 0 5px;
|
||||
}
|
||||
|
||||
form .required
|
||||
{
|
||||
color:red;
|
||||
float:none;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
/**** Guidelines and Error Highlight ****/
|
||||
form li.highlighted
|
||||
{
|
||||
background-color:#fff7c0;
|
||||
}
|
||||
|
||||
form .guidelines
|
||||
{
|
||||
background:#f5f5f5;
|
||||
border:1px solid #e6e6e6;
|
||||
color:#444;
|
||||
font-size:80%;
|
||||
left:100%;
|
||||
line-height:130%;
|
||||
margin:0 0 0 8px;
|
||||
padding:8px 10px 9px;
|
||||
position:absolute;
|
||||
top:0;
|
||||
visibility:hidden;
|
||||
width:42%;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
form .guidelines small
|
||||
{
|
||||
font-size:105%;
|
||||
}
|
||||
|
||||
form li.highlighted .guidelines
|
||||
{
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
form li:hover .guidelines
|
||||
{
|
||||
visibility:visible;
|
||||
}
|
||||
|
||||
.no_guidelines .guidelines
|
||||
{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
.no_guidelines form li
|
||||
{
|
||||
width:97%;
|
||||
}
|
||||
|
||||
.no_guidelines li.section
|
||||
{
|
||||
padding-left:9px;
|
||||
}
|
||||
|
||||
/*** Success Message ****/
|
||||
.form_success
|
||||
{
|
||||
clear: both;
|
||||
margin: 0;
|
||||
padding: 90px 0pt 100px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.form_success h2 {
|
||||
clear:left;
|
||||
font-size:160%;
|
||||
font-weight:normal;
|
||||
margin:0pt 0pt 3px;
|
||||
}
|
||||
|
||||
/*** Password ****/
|
||||
ul.password{
|
||||
margin-top:60px;
|
||||
margin-bottom: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.password h2{
|
||||
color:#DF0000;
|
||||
font-weight:bold;
|
||||
margin:0pt auto 10px;
|
||||
}
|
||||
|
||||
.password input.text {
|
||||
font-size:170% !important;
|
||||
width:380px;
|
||||
text-align: center;
|
||||
}
|
||||
.password label{
|
||||
display:block;
|
||||
font-size:120% !important;
|
||||
padding-top:10px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#li_captcha{
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
#li_captcha span{
|
||||
float:none;
|
||||
}
|
||||
|
||||
/** Embedded Form **/
|
||||
|
||||
.embed #form_container{
|
||||
border: none;
|
||||
}
|
||||
|
||||
.embed #top, .embed #bottom, .embed h1{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.embed #form_container{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.embed #footer{
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
.embed #footer.success{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.embed form.appnitro
|
||||
{
|
||||
margin:0px 0px 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*** Calendar **********************/
|
||||
div.calendar { position: relative; }
|
||||
|
||||
.calendar table {
|
||||
cursor:pointer;
|
||||
border:1px solid #ccc;
|
||||
font-size: 11px;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
.calendar .button {
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.calendar .nav {
|
||||
background:#f5f5f5;
|
||||
}
|
||||
|
||||
.calendar thead .title {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background: #dedede;
|
||||
color: #000;
|
||||
padding: 2px 0 3px 0;
|
||||
}
|
||||
|
||||
.calendar thead .headrow {
|
||||
background: #f5f5f5;
|
||||
color: #444;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.calendar thead .daynames {
|
||||
background: #fff;
|
||||
color:#333;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.calendar thead .name {
|
||||
border-bottom: 1px dotted #ccc;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.calendar thead .weekend {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.calendar thead .hilite {
|
||||
background-color: #444;
|
||||
color: #fff;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar thead .active {
|
||||
background-color: #d12f19;
|
||||
color:#fff;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
|
||||
.calendar tbody .day {
|
||||
width:1.8em;
|
||||
color: #222;
|
||||
text-align: right;
|
||||
padding: 2px 2px 2px 2px;
|
||||
}
|
||||
.calendar tbody .day.othermonth {
|
||||
font-size: 80%;
|
||||
color: #bbb;
|
||||
}
|
||||
.calendar tbody .day.othermonth.oweekend {
|
||||
color: #fbb;
|
||||
}
|
||||
|
||||
.calendar table .wn {
|
||||
padding: 2px 2px 2px 2px;
|
||||
border-right: 1px solid #000;
|
||||
background: #666;
|
||||
}
|
||||
|
||||
.calendar tbody .rowhilite td {
|
||||
background: #FFF1AF;
|
||||
}
|
||||
|
||||
.calendar tbody .rowhilite td.wn {
|
||||
background: #FFF1AF;
|
||||
}
|
||||
|
||||
.calendar tbody td.hilite {
|
||||
padding: 1px 1px 1px 1px;
|
||||
background:#444 !important;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
.calendar tbody td.active {
|
||||
color:#fff;
|
||||
background: #529214 !important;
|
||||
padding: 2px 2px 0px 2px;
|
||||
}
|
||||
|
||||
.calendar tbody td.selected {
|
||||
font-weight: bold;
|
||||
border: 1px solid #888;
|
||||
padding: 1px 1px 1px 1px;
|
||||
background: #f5f5f5 !important;
|
||||
color: #222 !important;
|
||||
}
|
||||
|
||||
.calendar tbody td.weekend {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.calendar tbody td.today {
|
||||
font-weight: bold;
|
||||
color: #529214;
|
||||
background:#D9EFC2;
|
||||
}
|
||||
|
||||
.calendar tbody .disabled { color: #999; }
|
||||
|
||||
.calendar tbody .emptycell {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.calendar tbody .emptyrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.calendar tfoot .footrow {
|
||||
text-align: center;
|
||||
background: #556;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar tfoot .ttip {
|
||||
background: #222;
|
||||
color: #fff;
|
||||
font-size:10px;
|
||||
border-top: 1px solid #dedede;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.calendar tfoot .hilite {
|
||||
background: #aaf;
|
||||
border: 1px solid #04f;
|
||||
color: #000;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar tfoot .active {
|
||||
background: #77c;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
.calendar .combo {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 4em;
|
||||
border: 1px solid #ccc;
|
||||
background: #f5f5f5;
|
||||
color: #222;
|
||||
font-size: 90%;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.calendar .combo .label,
|
||||
.calendar .combo .label-IEfix {
|
||||
text-align: center;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar .combo .label-IEfix {
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.calendar .combo .hilite {
|
||||
background: #444;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.calendar .combo .active {
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #999;
|
||||
background: #dedede;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
BIN
data/images/back_disabled.jpg
Normal file
BIN
data/images/back_disabled.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 612 B |
BIN
data/images/back_enabled.jpg
Normal file
BIN
data/images/back_enabled.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 807 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
data/images/forward_disabled.jpg
Normal file
BIN
data/images/forward_disabled.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 635 B |
BIN
data/images/forward_enabled.jpg
Normal file
BIN
data/images/forward_enabled.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 852 B |
@@ -1,6 +0,0 @@
|
||||
</div>
|
||||
<div class="footer">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,30 +0,0 @@
|
||||
#attr title = ""
|
||||
#attr rootPath = ""
|
||||
#attr scripts = ""
|
||||
#attr styles = ""
|
||||
<html>
|
||||
<head>
|
||||
<title>Headphones $title</title>
|
||||
<link rel="stylesheet" type="text/css" href="$rootPath/data/css/style.css" />
|
||||
<link rel="icon" type="image/x-icon" href="$rootPath/data/images/favicon.ico" />
|
||||
<link rel="apple-touch-icon" href="$rootPath/data/images/headphoneslogo.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo"><a href="/">
|
||||
<img src="$rootPath/data/images/headphoneslogo.png" border="0">headphones<a></div>
|
||||
<div class="search"><form action="findArtist" method="GET">
|
||||
<input type="text" value="Add an artist" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="name" />
|
||||
<input type="submit" /></form></div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="nav">
|
||||
<a href="/">HOME</a>
|
||||
<a href="/upcoming">UPCOMING</a>
|
||||
<a href="/manage">MANAGE</a>
|
||||
<a href="/history">HISTORY</a>
|
||||
<a href="/config">SETTINGS</a>
|
||||
<a href="/shutdown"><font color="red">SHUTDOWN</font></a>
|
||||
</div>
|
||||
<div class="table">
|
||||
105
data/interfaces/default/album.html
Normal file
105
data/interfaces/default/album.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<%inherit file="base.html" />
|
||||
<%!
|
||||
from headphones import db, helpers
|
||||
myDB = db.DBConnection()
|
||||
%>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
%if album['Status'] == 'Skipped':
|
||||
<li><a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=False">Mark Album as Wanted</a></li>
|
||||
%elif album['Status'] == 'Snatched' or 'Downloaded':
|
||||
<li><a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=False">Retry Download</a></li>
|
||||
<li><a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True">Try New Version</a></li>
|
||||
%else:
|
||||
<li><a href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=False">Mark Album as Skipped</a></li>
|
||||
%endif
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h2><a href="artistPage?ArtistID=${album['ArtistID']}"><- Back to ${album['ArtistName']}</a></h2>
|
||||
<div id="albumheader">
|
||||
<img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.LZZZZZZZ.jpg" height="200" width="200" alt="albumart" class="albumArt">
|
||||
<h1>${album['AlbumTitle']}</h1>
|
||||
<h2>${album['ArtistName']}</h2>
|
||||
<br>
|
||||
<%
|
||||
totalduration = myDB.action("SELECT SUM(TrackDuration) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
|
||||
totaltracks = len(myDB.select("SELECT TrackTitle from tracks WHERE AlbumID=?", [album['AlbumID']]))
|
||||
try:
|
||||
albumduration = helpers.convert_milliseconds(totalduration)
|
||||
except:
|
||||
albumduration = 'n/a'
|
||||
|
||||
%>
|
||||
<h3>Tracks: ${totaltracks}</h3>
|
||||
<h3>Duration: ${albumduration}</h3>
|
||||
%if description:
|
||||
<h3>Description: </h3>
|
||||
${description['Summary']}
|
||||
%endif
|
||||
</div>
|
||||
<div id="track_wrapper">
|
||||
<table class="display" id="track_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="number">#</th>
|
||||
<th id="name">Track Title</th>
|
||||
<th id="duration">Duration</th>
|
||||
<th id="have"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
i = 0
|
||||
%>
|
||||
%for track in tracks:
|
||||
<%
|
||||
i += 1
|
||||
have = myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ? AND TrackTitle like ?', [track['ArtistName'], track['AlbumTitle'], track['TrackTitle']])
|
||||
if len(have):
|
||||
grade = 'A'
|
||||
check = '<img src="images/checkmark.png" alt="checkmark">'
|
||||
else:
|
||||
grade = 'Z'
|
||||
check = ''
|
||||
try:
|
||||
trackduration = helpers.convert_milliseconds(track['TrackDuration'])
|
||||
except:
|
||||
trackduration = 'n/a'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="number">${i}</td>
|
||||
<td id="name">${track['TrackTitle']}</td>
|
||||
<td id="duration">${trackduration}</td>
|
||||
<td id="have">${check}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#track_table').dataTable(
|
||||
{
|
||||
"bFilter": false,
|
||||
"bInfo": false,
|
||||
"bPaginate": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -1,45 +0,0 @@
|
||||
#attr $albumASIN = ""
|
||||
#attr $albumTitle = ""
|
||||
#attr $albumID = ""
|
||||
#attr $artitstID = ""
|
||||
#attr $artistName = ""
|
||||
#import os.path
|
||||
#import time
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
|
||||
<table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<td colspan="4" align="center">
|
||||
#if $albumASIN:
|
||||
<img src="http://ec1.images-amazon.com/images/P/${albumASIN}.01.LZZZZZZZ.jpg" height="200" width="200">
|
||||
<br />
|
||||
#end if
|
||||
<br />
|
||||
<a href="artistPage?ArtistID=$artistID">${artistName}</a> -${albumTitle}<br />
|
||||
<a href="queueAlbum?AlbumID=${albumID}&ArtistID=${artistID}">Download <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left" width="100">Track #</th>
|
||||
<th align="left" width="100">Track Title</th>
|
||||
<th align="center" width="300">Duration</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
#for $track in $tracks
|
||||
<tr>
|
||||
<td align="left" width="120">${track[7]}</td>
|
||||
<td align="left" width="240">
|
||||
${track[3]}(<a class="external" href="http://musicbrainz.org/recording/${track[5]}.html">link</a>)
|
||||
</td>
|
||||
<td align="center">
|
||||
#try
|
||||
#echo time.strftime("%M:%S", time.gmtime(int($track[4])/1000))
|
||||
#except
|
||||
n/a
|
||||
#end try
|
||||
</td>
|
||||
</tr>
|
||||
#end for
|
||||
</table>
|
||||
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
127
data/interfaces/default/artist.html
Normal file
127
data/interfaces/default/artist.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from headphones import db
|
||||
%>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="refreshArtist?ArtistID=${artist['ArtistID']}">Refresh Artist</a></li>
|
||||
<li><a href="deleteArtist?ArtistID=${artist['ArtistID']}">Delete Artist</a></li>
|
||||
%if artist['Status'] == 'Paused':
|
||||
<li><a href="resumeArtist?ArtistID=${artist['ArtistID']}">Resume Artist</a></li>
|
||||
%else:
|
||||
<li><a href="pauseArtist?ArtistID=${artist['ArtistID']}">Pause Artist</a></li>
|
||||
%endif
|
||||
<li><a href="getExtras?ArtistID=${artist['ArtistID']}">Get Extras</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
<h1>${artist['ArtistName']}<h1>
|
||||
</div>
|
||||
<form action="markAlbums" method="get"><input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
|
||||
<p class="indented">Mark selected albums as
|
||||
<select name="action">
|
||||
<option value="Wanted">Wanted</option>
|
||||
<option value="WantedNew">Wanted (new only)</option>
|
||||
<option value="Skipped">Skipped</option>
|
||||
<option value="Downloaded">Downloaded</option>
|
||||
</select>
|
||||
<input type="submit" value="Go">
|
||||
</p>
|
||||
<table class="display" id="album_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
|
||||
<th id="albumart"></th>
|
||||
<th id="albumname">Album Name</th>
|
||||
<th id="reldate">Release Date</th>
|
||||
<th id="type">Release Type</th>
|
||||
<th id="status">Status</th>
|
||||
<th id="have">Have</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for album in albums:
|
||||
<%
|
||||
if album['Status'] == 'Skipped':
|
||||
grade = 'Z'
|
||||
elif album['Status'] == 'Wanted':
|
||||
grade = 'X'
|
||||
elif album['Status'] == 'Snatched':
|
||||
grade = 'C'
|
||||
else:
|
||||
grade = 'A'
|
||||
|
||||
myDB = db.DBConnection()
|
||||
totaltracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=?', [album['AlbumID']]))
|
||||
havetracks = len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ?', [album['ArtistName'], album['AlbumTitle']]))
|
||||
|
||||
try:
|
||||
percent = (havetracks*100.0)/totaltracks
|
||||
if percent > 100:
|
||||
percent = 100
|
||||
except (ZeroDivisionError, TypeError):
|
||||
percent = 0
|
||||
totaltracks = '?'
|
||||
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
|
||||
<td id="albumart"><img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.MZZZZZZZ.jpg" height="50" width="50"></td>
|
||||
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
||||
<td id="reldate">${album['ReleaseDate']}</td>
|
||||
<td id="type">${album['Type']}</td>
|
||||
<td id="status">${album['Status']}
|
||||
%if album['Status'] == 'Skipped':
|
||||
[<a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}">want</a>]
|
||||
%elif album['Status'] == 'Wanted':
|
||||
[<a href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}">skip</a>]
|
||||
%else:
|
||||
[<a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry the same download again">retry</a>][<a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try a new download, skipping all previously tried nzbs">new</a>]
|
||||
%endif
|
||||
</td>
|
||||
<td id="have"><span title="${percent}"><span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#album_table').dataTable(
|
||||
{
|
||||
"aoColumns": [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ "sType": "title-numeric"}
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ albums per page",
|
||||
"sEmptyTable": "No album information available",
|
||||
"sInfo":"Showing _TOTAL_ albums",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 albums",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total albums)"},
|
||||
"bPaginate": false,
|
||||
"aaSorting": [[4, 'asc'],[3,'desc']]
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -1,13 +0,0 @@
|
||||
#attr $artistName = ""
|
||||
#attr $artistUuid = ""
|
||||
#attr $releaseGroups = []
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
Artist Name: $artistName <br />
|
||||
Unique ID: $artistUuid <br />
|
||||
<br />
|
||||
Albums:<br />
|
||||
#for $releaseGroup in $releaseGroups:
|
||||
$releaseGroup <br />
|
||||
#end for
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
@@ -1,39 +0,0 @@
|
||||
#attr $artistName = ""
|
||||
#attr $artistID = ""
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
<table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<th colspan="4">
|
||||
<p align="center">$artistName <br /></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" width="50"></td>
|
||||
<td align="left" width="120">Album Name</td>
|
||||
<td align="center" width="100">Release Date</td>
|
||||
<td align="center" width="300">Status</td>
|
||||
</tr>
|
||||
#for $album in $albums
|
||||
<tr>
|
||||
<td align="left">
|
||||
<img src="http://ec1.images-amazon.com/images/P/$album[5].01.MZZZZZZZ.jpg" height="50" widtd="50">
|
||||
</td>
|
||||
<td align="left" width="240"><a href="albumPage?AlbumID=$album[2]">$album[0]</a>
|
||||
(<A class="external" href="http://musicbrainz.org/release/${album[2]}.html">link</a>)</td>
|
||||
<td align="center" widtd="160">$album[1]</td>
|
||||
<td align="center">
|
||||
#if $album[3] == 'Skipped':
|
||||
<b>$album[3]</b>[<A class="external" href="queueAlbum?AlbumID=${album[2]}&ArtistID=$artistID">want</a>]
|
||||
#elif $album[3] == 'Wanted':
|
||||
<b>$album[3]</b>[<a class="external" href="unqueueAlbum?AlbumID=$album[2]&ArtistID=$artistID">skip</a>]
|
||||
#elif $album[3] == 'Downloaded' or $album[3] == 'Snatched':
|
||||
<b>$album[3]</b>[<a class="external" href="queueAlbum?AlbumID=$album[2]&ArtistID=$artistID">retry</a>]
|
||||
#else:
|
||||
$album[3]
|
||||
#end if
|
||||
</td>
|
||||
</tr>
|
||||
#end for
|
||||
</table>
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
101
data/interfaces/default/base.html
Executable file
101
data/interfaces/default/base.html
Executable file
@@ -0,0 +1,101 @@
|
||||
<%
|
||||
import headphones
|
||||
%>
|
||||
<!doctype html>
|
||||
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
|
||||
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
|
||||
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
|
||||
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
|
||||
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
||||
<title>Headphones - ${title}</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="images/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="images/headphoneslogo.png">
|
||||
<link rel="stylesheet" href="css/style.css?v=2">
|
||||
${next.headIncludes()}
|
||||
|
||||
<script src="js/libs/modernizr-1.7.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<header>
|
||||
% if not headphones.CURRENT_VERSION:
|
||||
<div id="updatebar">
|
||||
You're running an unknown version of Headphones. <a class="blue" href="update">Click here to update</a>
|
||||
</div>
|
||||
% elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win':
|
||||
<div id="updatebar">
|
||||
A <a class="blue" href="http://github.com/rembo10/headphones/compare/${headphones.CURRENT_VERSION}...${headphones.LATEST_VERSION}"> newer version</a> is available. You're ${headphones.COMMITS_BEHIND} commits behind. <a class="blue" href="update">Click here to update</a>
|
||||
</div>
|
||||
% endif
|
||||
<div id="logo">
|
||||
<a href="home"><img src="images/headphoneslogo.png" alt="headphones"></a>
|
||||
</div>
|
||||
<ul id="nav">
|
||||
<li><a href="home">home</a></li>
|
||||
<li><a href="upcoming">upcoming</a></li>
|
||||
<li><a href="extras">extras</a></li>
|
||||
<li><a href="manage">manage</a></li>
|
||||
<li><a href="history">history</a></li>
|
||||
<li><a href="logs">logs</a></li>
|
||||
<li><a href="config">settings</a></li>
|
||||
</ul>
|
||||
<div id="searchbar">
|
||||
<form action="search" method="get">
|
||||
<input type="text" value="" onfocus="if(this.value==this.defaultValue) this.value='';" name="name" />
|
||||
<select name="type">
|
||||
<option value="artist">Artist</option>
|
||||
<option value="album">Album</option>
|
||||
</select>
|
||||
<input type="submit" value="Add"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="subhead">
|
||||
${next.headerIncludes()}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div id="main" class="main">
|
||||
${next.body()}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div id="version">
|
||||
Version: ${headphones.CURRENT_VERSION}
|
||||
</div>
|
||||
<div id="donate">
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
<input type="hidden" name="hosted_button_id" value="93FFC6WDV97QS">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
</form>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.6.2.min.js"%3E%3C/script%3E'))</script>
|
||||
${next.javascriptIncludes()}
|
||||
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/script.js"></script>
|
||||
|
||||
<!--[if lt IE 7 ]>
|
||||
<script src="js/libs/dd_belatedpng.js"></script>
|
||||
<script> DD_belatedPNG.fix('img, .png_bg');</script>
|
||||
<![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<%def name="javascriptIncludes()"></%def>
|
||||
<%def name="headIncludes()"></%def>
|
||||
<%def name="headerIncludes()"></%def>
|
||||
257
data/interfaces/default/config.html
Normal file
257
data/interfaces/default/config.html
Normal file
@@ -0,0 +1,257 @@
|
||||
<%inherit file="base.html"/>
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="shutdown">Shut Down</a></li>
|
||||
<li><a href="restart">Restart</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
<h1><h1>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<form action="configUpdate" method="post">
|
||||
<a name="web_interface"><h1><u>Web Interface</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Web Interface">
|
||||
<tr>
|
||||
<td>
|
||||
<h3>HTTP Host:</h3>
|
||||
<input type="text" name="http_host" value="${config['http_host']}" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. localhost or 0.0.0.0</i>
|
||||
</td>
|
||||
<td>
|
||||
<h3>HTTP Username:</h3>
|
||||
<input type="text" name="http_username" value="${config['http_user']}" size="30" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>HTTP Port:</h3>
|
||||
<input type="text" name="http_port" value="${config['http_port']}" size="10" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>HTTP Password:</h3>
|
||||
<input type="password" name="http_password" value="${config['http_pass']}" size="30" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Launch Browser on Startup: <input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} /></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="download"><h1><u>Download Settings</u></h1></a>
|
||||
<table class="configtable" summary="Download Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<h3>SABnzbd Host:</h3><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">usually localhost:8080</i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>SABnzbd Username:</h3><input type="text" name="sab_username" value="${config['sab_user']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>SABnzbd API:</h3><input type="text" name="sab_apikey" value="${config['sab_api']}" size="36" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>SABnzbd Password:</h3><input type="password" name="sab_password" value="${config['sab_pass']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>SABnzbd Category:</h3><input type="text" name="sab_category" value="${config['sab_cat']}" size="20" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>Music Download Directory:</h3><input type="text" name="download_dir" value="${config['download_dir']}" size="50"><br>
|
||||
|
||||
<i class="smalltext">Full path to the directory where SAB downloads your music<br>
|
||||
i.e. /Users/name/Downloads/music</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Use Black Hole:</h3><input type="checkbox" name="blackhole" value=1 ${config['use_blackhole']} />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>Black Hole Directory:</h3><input type="text" name="blackhole_dir" value="${config['blackhole_dir']}" size="50"><br>
|
||||
|
||||
<i class="smalltext">Folder your Download program watches for NZBs</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Usenet Retention:</h3><input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="providers"><h1><u>Search Providers</u></h1></a>
|
||||
<table class="configtable" summary="Search Providers">
|
||||
<tr>
|
||||
<td>
|
||||
<h3>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" ${config['use_nzbmatrix']} /></h3>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>NZBMatrix Username: </h3>
|
||||
<input type="text" name="nzbmatrix_username" value="${config['nzbmatrix_user']}" size="30" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>NZBMatrix API: </h3>
|
||||
<input type="text" name="nzbmatrix_apikey" value="${config['nzbmatrix_api']}" size="36" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Newznab: <input type="checkbox" name="newznab" value="1" ${config['use_newznab']} /></h3>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>Newznab Host:</h3>
|
||||
<input type="text" name="newznab_host" value="${config['newznab_host']}" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. http://nzb.su</i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<h3>
|
||||
Newznab API:</h3>
|
||||
<input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="36" maxlength="40">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<h3>NZBs.org:<input type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} /></h3>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<h3>NZBs.org UID:</h3>
|
||||
<input type="text" name="nzbsorg_uid" value="${config['nzbsorg_uid']}" size="30" maxlength="40">
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<h3>NZBs.org Hash:</h3>
|
||||
<input type="text" name="nzbsorg_hash" value="${config['nzbsorg_hash']}" size="36" maxlength="40">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Newzbin:<input type="checkbox" name="newzbin" value="1" ${config['use_newzbin']} /></h3>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h3>Newzbin UID:</h3>
|
||||
<input type="text" name="newzbin_uid" value="${config['newzbin_uid']}" size="30" maxlength="40">
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<h3>Newzbin Password:</h3>
|
||||
<input type="text" name="newzbin_password" value="${config['newzbin_pass']}" size="36" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="post_processing"><h1><u>Quality & Post Processing</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Quality & Post Processing">
|
||||
<tr>
|
||||
<td>
|
||||
<h2>Album Quality:</h2><br>
|
||||
<input type="radio" name="preferred_quality" value="0" ${config['pref_qual_0']} />Highest Quality excluding Lossless<br>
|
||||
<input type="radio" name="preferred_quality" value="1" ${config['pref_qual_1']} />Highest Quality including Lossless<br>
|
||||
<input type="radio" name="preferred_quality" value="3" ${config['pref_qual_3']} />Lossless Only<br>
|
||||
<input type="radio" name="preferred_quality" value="2" ${config['pref_qual_2']} />Preferred Bitrate:
|
||||
<input type="text" name="preferred_bitrate" value="${config['pref_bitrate']}" size="5" maxlength="5" />kbps <br>
|
||||
<i class="smalltext2"><input type="checkbox" name="detect_bitrate" value="1" ${config['detect_bitrate']} />Auto-Detect Preferred Bitrate </i>
|
||||
</td>
|
||||
<td>
|
||||
<h2>Post-Processing:</h2>
|
||||
<input type="checkbox" name="move_files" value="1" ${config['move_files']} />Move downloads to Destination Folder<br />
|
||||
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} />Rename files<br>
|
||||
<input type="checkbox" name="correct_metadata" value="1" ${config['correct_metadata']} />Correct metadata<br>
|
||||
<input type="checkbox" name="cleanup_files" value="1" ${config['cleanup_files']} />Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)<br>
|
||||
<input type="checkbox" name="add_album_art" value="1" ${config['add_album_art']}>Add album art as 'folder.jpg' to album folder<br>
|
||||
<input type="checkbox" name="embed_album_art" value="1" ${config['embed_album_art']}>Embed album art in each file
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<h3>Path to Destination folder:</h3><input type="text" name="destination_dir" value="${config['dest_dir']}" size="50">
|
||||
<br>
|
||||
<i class="smalltext">i.e. /Users/name/Music/iTunes or /Volumes/share/music</i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table_wrapper">
|
||||
<a name="advanced_settings"><h1><u>Advanced Settings</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Advanced Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<h2>Renaming Options:</h2>
|
||||
<br>
|
||||
<h3>Folder Format:</h3><input type="text" name="folder_format" value="${config['folder_format']}" size="43">
|
||||
<i class="smalltext">Use: artist, album, year and first (first letter in artist name)<br />
|
||||
E.g.: first/artist/album [year] = G/Girl Talk/All Day [2010]</i>
|
||||
<br><br>
|
||||
<h3>File Format:</h3><input type="text" name="file_format" value="${config['file_format']}" size="43">
|
||||
<br>
|
||||
<i class="smalltext">Use: tracknumber, title, artist, album and year</i>
|
||||
</td>
|
||||
<td>
|
||||
<h2>Miscellaneous:</h2>
|
||||
<br>
|
||||
<h3><input type="checkbox" name="include_extras" value="1" ${config['include_extras']} />Automatically Include Extras When Adding an Artist</h3><br />
|
||||
<i class="smalltext">Extras includes: EPs, Compilations, Live Albums, Remix Albums and Singles</i>
|
||||
<br><br><br>
|
||||
<h3>Log Directory:</h3><input type="text" name="log_dir" value="${config['log_dir']}" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="center"><input type="submit" value="Save Changes"><br>
|
||||
(Web Interface changes require a restart to take effect)</h3>
|
||||
</form>
|
||||
</%def>
|
||||
<%inherit file="base.html" />
|
||||
@@ -1,238 +0,0 @@
|
||||
#import os.path
|
||||
#import config
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
<center>
|
||||
<div class="smalltext">
|
||||
<a href="#web_interface" >Web Interface</a> |
|
||||
<a href="#download" class="smalltext">Download Settings</a> |
|
||||
<a href="#providers" class="smalltext">Search Providers</a> |
|
||||
<a href="#post_processing" class="smalltext">Quality & Post Processing</a>
|
||||
</div>
|
||||
</center>
|
||||
<div class="config">
|
||||
<form action="configUpdate" method="post">
|
||||
<a name="web_interface"><h1><u>Web Interface</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Web Interface">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Host: <br><br>
|
||||
<input type="text" name="http_host" value="${config.General['http_host']}" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. localhost or 0.0.0.0</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Username: <br><br>
|
||||
<input type="text" name="http_username" value="${config.General['http_username']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
HTTP Port: <br><br>
|
||||
<input type="text" name="http_port" value="${config.General['http_port']}" size="20" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
HTTP Password: <br><br>
|
||||
<input type="password" name="http_password" value="${config.General['http_password']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<p>Launch Browser on Startup:<input type="checkbox" name="launch_browser" value="1" #if (config.General['launch_browser'] == '1') then "CHECKED" else ""#/></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="download"><h1><u>Download Settings</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Download Settings">
|
||||
<tr>
|
||||
<td>
|
||||
<p>SABnzbd Host:</p><input type="text" name="sab_host" value="${config.SABnzbd['sab_host']}" size="30" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">usually localhost:8080</i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>SABnzbd Username:</p><input type="text" name="sab_username" value="${config.SABnzbd['sab_username']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd API:</p><input type="text" name="sab_apikey" value="${config.SABnzbd['sab_apikey']}" size="46" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd Password:</p><input type="password" name="sab_password" value="${config.SABnzbd['sab_password']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>SABnzbd Category:</p><input type="text" name="sab_category" value="${config.SABnzbd['sab_category']}" size="20" maxlength="40">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Music Download Directory:</p><input type="text" name="music_download_dir" value="${config.General['music_download_dir']}" size="60" maxlength="40"><br>
|
||||
|
||||
<i class="smalltext">Absolute or relative path to the dir where SAB downloads your music<br>
|
||||
i.e. Downloads/music or /Users/name/Downloads/music</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Usenet Retention:</p><input type="text" name="usenet_retention" value="${config.General['usenet_retention']}" size="20" maxlength="40">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="providers"><h1><u>Search Providers</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Search Providers">
|
||||
<tr>
|
||||
<td>
|
||||
<p>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" #if (config.NZBMatrix['nzbmatrix'] == '1') then "checked" else ""#/></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
NZBMatrix Username: <br>
|
||||
<input type="text" name="nzbmatrix_username" value="${config.NZBMatrix['nzbmatrix_username']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
NZBMatrix API: <br>
|
||||
<input type="text" name="nzbmatrix_apikey" value="${config.NZBMatrix['nzbmatrix_apikey']}" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Newznab: <input type="checkbox" name="newznab" value="1" #if (config.Newznab['newznab'] == '1') then "checked" else ""# /></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
Newznab Host:<br>
|
||||
<input type="text" name="newznab_host" value="${config.Newznab['newznab_host']}" size="30" maxlength="40"><br>
|
||||
<i class="smalltext">i.e. http://nzb.su</i>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
Newznab API:<br>
|
||||
<input type="text" name="newznab_apikey" value="${config.Newznab['newznab_apikey']}" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>NZBs.org:<input type="checkbox" name="nzbsorg" value="1" #if (config.NZBsorg['nzbsorg'] == '1') then "CHECKED" else ""# /></p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
NZBs.org UID:<br>
|
||||
<input type="text" name="nzbsorg_uid" value="${config.NZBsorg['nzbsorg_uid']}" size="30" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>
|
||||
NZBs.org Hash:<br>
|
||||
<input type="text" name="nzbsorg_hash" value="${config.NZBsorg['nzbsorg_hash']}" size="46" maxlength="40">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a name="post_processing"><h1><u>Quality & Post Processing</u></h1></a>
|
||||
|
||||
<table class="configtable" summary="Quality & Post Processing">
|
||||
<tr>
|
||||
<td>
|
||||
<p><b>Album Quality:</b></p>
|
||||
<input type="checkbox" name="include_lossless" value="1" #if (config.General['include_lossless'] == '1') then "CHECKED" else ""# />Include lossless <br>
|
||||
<input type="checkbox" name="flac_to_mp3" value="1" #if (config.General['flac_to_mp3'] == '1') then "CHECKED" else ""# />Convert lossless to mp3
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<p>
|
||||
<p><b>iTunes:</b></p>
|
||||
<input type="checkbox" name="move_to_itunes" value="1" #if (config.General['move_to_itunes'] == '1') then "CHECKED" else ""# />Move downloads to iTunes
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p><b>Path to iTunes folder</b>:<br><input type="text" name="path_to_itunes" value="${config.General['path_to_itunes']}" size="60" maxlength="40">
|
||||
<br>
|
||||
<i class="smalltext">i.e. Music/iTunes or /Users/name/Music/iTunes</i>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<b>Renaming & Metadata:</b>
|
||||
<p>
|
||||
<input type="checkbox" name="rename_mp3s" value="1" #if (config.General['rename_mp3s'] == '1') then "CHECKED" else ""# />Rename & add metadata
|
||||
<br>
|
||||
<input type="checkbox" name="cleanup" value="1" #if (config.General['cleanup'] == '1') then "CHECKED" else ""# />Delete leftover files
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<p><b>Album Art:</b></p>
|
||||
<input type="checkbox" name="add_album_art" value="1" #if (config.General['add_album_art'] == '1') then "CHECKED" else ""#>Add album art
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="center"><input type="submit" value="Save Changes"><br>
|
||||
(For now, all changes require a restart to take effect)</p>
|
||||
</form>
|
||||
</div>
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
13
data/interfaces/default/extras.html
Normal file
13
data/interfaces/default/extras.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Artists You Might Like</h1>
|
||||
<div class="cloudtag">
|
||||
<ul id="cloud">
|
||||
%for artist in cloudlist:
|
||||
<li><a href="addArtist?artistid=${artist['ArtistID']}" class="tag${artist['Count']}">${artist['ArtistName']}</a></li>
|
||||
%endfor
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
79
data/interfaces/default/history.html
Normal file
79
data/interfaces/default/history.html
Normal file
@@ -0,0 +1,79 @@
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from headphones import helpers
|
||||
%>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="clearhistory?type=all">Clear All History</a></li>
|
||||
<li><a href="clearhistory?type=Processed">Clear Processed</a></li>
|
||||
<li><a href="clearhistory?type=Unprocessed">Clear Unprocessed</a></li>
|
||||
<li><a href="clearhistory?type=Snatched">Clear Snatched</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
History
|
||||
</div>
|
||||
<table class="display" id="history_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="dateadded">Date Added</th>
|
||||
<th id="filename">File Name</th>
|
||||
<th id="size">Size</th>
|
||||
<th id="status">Status</th>
|
||||
<th id="action"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for item in history:
|
||||
<%
|
||||
if item['Status'] == 'Processed':
|
||||
grade = 'A'
|
||||
elif item['Status'] == 'Snatched':
|
||||
grade = 'C'
|
||||
elif item['Status'] == 'Unprocessed':
|
||||
grade = 'X'
|
||||
else:
|
||||
grade = 'U'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="dateadded">${item['DateAdded']}</td>
|
||||
<td id="filename"><a href="${item['URL']}">${item['Title']}</a></td>
|
||||
<td id="size">${helpers.bytes_to_mb(item['Size'])}</td>
|
||||
<td id="status">${item['Status']}</td>
|
||||
<td id="action">[<a href="queueAlbum?AlbumID=${item['AlbumID']}&redirect=history">retry</a>][<a href="queueAlbum?AlbumID=${item['AlbumID']}&new=True&redirect=history">new</a>]</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#history_table').dataTable(
|
||||
{
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ items per page",
|
||||
"sEmptyTable": "No History to Display",
|
||||
"sInfo":"Showing _START_ to _END_ of _TOTAL_ items",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 items",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total items)"},
|
||||
"bStateSave": true,
|
||||
"iDisplayLength": 25,
|
||||
"sPaginationType": "full_numbers"
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -1,3 +0,0 @@
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
86
data/interfaces/default/index.html
Normal file
86
data/interfaces/default/index.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from headphones import helpers
|
||||
%>
|
||||
|
||||
<%def name="body()">
|
||||
<table class="display" id="artist_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="name">Artist Name</th>
|
||||
<th id="status">Status</th>
|
||||
<th id="album">Latest Album</th>
|
||||
<th id="have">Have</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for artist in artists:
|
||||
<%
|
||||
totaltracks = artist['TotalTracks']
|
||||
havetracks = artist['HaveTracks']
|
||||
if not havetracks:
|
||||
havetracks = 0
|
||||
try:
|
||||
percent = (havetracks*100.0)/totaltracks
|
||||
if percent > 100:
|
||||
percent = 100
|
||||
except (ZeroDivisionError, TypeError):
|
||||
percent = 0
|
||||
totaltracks = '?'
|
||||
|
||||
if artist['ReleaseDate'] and artist['LatestAlbum']:
|
||||
releasedate = artist['ReleaseDate']
|
||||
albumdisplay = '<i>%s</i> (%s)' % (artist['LatestAlbum'], artist['ReleaseDate'])
|
||||
if releasedate > helpers.today():
|
||||
grade = 'A'
|
||||
else:
|
||||
grade = 'Z'
|
||||
elif artist['LatestAlbum']:
|
||||
releasedate = ''
|
||||
grade = 'Z'
|
||||
albumdisplay = '<i>%s</i>' % artist['LatestAlbum']
|
||||
else:
|
||||
releasedate = ''
|
||||
grade = 'Z'
|
||||
albumdisplay = '<i>None</i>'
|
||||
|
||||
if artist['Status'] == 'Paused':
|
||||
grade = 'X'
|
||||
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
|
||||
<td id="status">${artist['Status']}</td>
|
||||
<td id="album"><span title="${releasedate}"></span><a href="albumPage?AlbumID=${artist['AlbumID']}">${albumdisplay}</a></td>
|
||||
<td id="have"><span title="${percent}"></span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#artist_table').dataTable(
|
||||
{
|
||||
"aoColumns": [
|
||||
{ "sType": "title-string"},
|
||||
null,
|
||||
{ "sType": "title-string"},
|
||||
{ "sType": "title-numeric"}
|
||||
],
|
||||
"bStateSave": true,
|
||||
"iDisplayLength": 50,
|
||||
"sPaginationType": "full_numbers",
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -1,33 +0,0 @@
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
<table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<th align="left" width="170">Artist Name</th>
|
||||
<th align="center" width="100">Status</th>
|
||||
<th align="center" width="300">Upcoming Albums</th>
|
||||
</tr>
|
||||
#for $artist in $artists
|
||||
<tr>
|
||||
<td align="left" width="300">
|
||||
<a href="artistPage?ArtistID=$artist[1]">$artist[0]</a>
|
||||
(<a class="external" href="http://musicbrainz.org/artist/$artist[1]">link</a>)
|
||||
[<a class="externalred" href="deleteArtist?ArtistID=$artist[1]">delete</a>]
|
||||
</td>
|
||||
<td align="center" width="160">
|
||||
#if $artist[2] == 'Active':
|
||||
$artist[2] (<a class="external" href="pauseArtist?ArtistID=$artist[1]">pause</a>)
|
||||
#else:
|
||||
<font color="red"><b>$artist[2]</b></font>(<A class="external" href="resumeArtist?ArtistID=$artist[1]">resume</a>)
|
||||
#end if
|
||||
</td>
|
||||
<td align="center">
|
||||
#try
|
||||
$artist[3] $artist[4]
|
||||
#except
|
||||
<font color="#CFCFCF">None</font>
|
||||
#end try
|
||||
</td>
|
||||
</tr>
|
||||
#end for
|
||||
</table>
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
64
data/interfaces/default/logs.html
Normal file
64
data/interfaces/default/logs.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<%inherit file="base.html"/>
|
||||
<%!
|
||||
from headphones import helpers
|
||||
%>
|
||||
|
||||
<%def name="body()">
|
||||
<table class="display" id="log_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="timestamp">Timestamp</th>
|
||||
<th id="level">Level</th>
|
||||
<th id="message">Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for line in lineList:
|
||||
<%
|
||||
out_tuple = helpers.extract_logline(line)
|
||||
%>
|
||||
%if out_tuple:
|
||||
<%
|
||||
if out_tuple[1] == 'DEBUG':
|
||||
continue
|
||||
elif out_tuple[1] == 'WARNING' or out_tuple[1] == 'ERROR':
|
||||
grade = 'X'
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="timestamp">${out_tuple[0]}</td>
|
||||
<td id="level">${out_tuple[1]}</td>
|
||||
<td id="message">${out_tuple[3].decode('utf-8')}</td>
|
||||
</tr>
|
||||
%endif
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#log_table').dataTable(
|
||||
{
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ lines per page",
|
||||
"sEmptyTable": "No log information available",
|
||||
"sInfo":"Showing _START_ to _END_ of _TOTAL_ lines",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 lines",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total lines)"},
|
||||
"bStateSave": true,
|
||||
"iDisplayLength": 100,
|
||||
"sPaginationType": "full_numbers",
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
57
data/interfaces/default/manage.html
Normal file
57
data/interfaces/default/manage.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<%inherit file="base.html" />
|
||||
<%!
|
||||
import headphones
|
||||
%>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Scan Music Library</h1><br />
|
||||
Where do you keep your music?<br /><br />
|
||||
You can put in any directory, and it will scan for audio files in that folder
|
||||
(including all subdirectories)<br /><br /> For example: '/Users/name/Music'
|
||||
<br /> <br />
|
||||
It may take a while depending on how many files you have. You can navigate away from the page<br />
|
||||
as soon as you click 'Submit'
|
||||
<br /><br />
|
||||
<form action="musicScan" method="GET" align="center">
|
||||
%if headphones.MUSIC_DIR:
|
||||
<input type="text" value="${headphones.MUSIC_DIR}" name="path" size="70" />
|
||||
%else:
|
||||
<input type="text" value="Enter a Music Directory to scan" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="path" size="70" />
|
||||
%endif
|
||||
<input type="submit" /></form>
|
||||
</div>
|
||||
|
||||
<div class="table_wrapper_left">
|
||||
<h1>Import Last.FM Artists</h1><br />
|
||||
Enter the username whose artists you want to import:<br /><br />
|
||||
<form action="importLastFM" method="GET" align="center">
|
||||
<%
|
||||
if headphones.LASTFM_USERNAME:
|
||||
lastfmvalue = headphones.LASTFM_USERNAME
|
||||
else:
|
||||
lastfmvalue = 'Last.fm Username'
|
||||
%>
|
||||
<input type="text" value="${lastfmvalue}" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="username" size="18" />
|
||||
<input type="submit" /></form><br /><br />
|
||||
</div>
|
||||
|
||||
<div class="table_wrapper_right">
|
||||
<h1>Placeholder :-)</h1><br />
|
||||
<br /><br />
|
||||
<form action="" method="GET" align="center">
|
||||
<input type="text" value="" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="" size="18" />
|
||||
<input type="submit" /></form><br /><br />
|
||||
</div>
|
||||
|
||||
<div class="table_wrapper">
|
||||
<h1>Force Search</h1><br />
|
||||
<h3><a href="forceSearch">Force Check for Wanted Albums</a></h3>
|
||||
<h3><a href="forceUpdate">Force Update Active Artists</a></h3>
|
||||
<h3><a href="forcePostProcess">Force Post-Process Albums in Download Folder</a></h3><br><br>
|
||||
<h3><a href="checkGithub">Check for Headphones Updates</a></h3>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -1,28 +0,0 @@
|
||||
#attr $path = ""
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
|
||||
<div class="config">
|
||||
<h1>Import or Sync Your iTunes Library/Music Folder</h1>
|
||||
<p> Enter the full path to your iTunes XML file or music folder
|
||||
i.e. /Users/"username"/Music/iTunes/iTunes Music Library.xml
|
||||
<i>or</i> /Users/"username"/Music/iTunes/iTunes Media/Music
|
||||
(artists should have their own directories for folder import to work)
|
||||
<b>note: This process can take a LONG time!</b>
|
||||
Once you click "Submit" you can navigate away from this
|
||||
page while the process runs. </p>
|
||||
<form action="importItunes" method="GET" align="center">
|
||||
<input type="text" value="${path}" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="path" size="70" />
|
||||
<input type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="config">
|
||||
<h1>Force Search</h1>
|
||||
<a href="forceSearch">Force Check for Wanted Albums</a><br />
|
||||
<a href="forceUpdate">Force Update Active Artists </a><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
@@ -1,31 +0,0 @@
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
<div id="search" style="float:left;">
|
||||
<table border="0" cellpadding="3">
|
||||
<form name="search">
|
||||
<tr>
|
||||
<td><label for="artist">Artist</label></td>
|
||||
<td><input type="textbox" id="artist" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="artist">Release</label></td>
|
||||
<td><input type="textbox" id="artist" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="artist">Label</label></td>
|
||||
<td><input type="textbox" id="artist" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="right"><input type="submit" value="search" onclick="$.getJSON"/></td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
<div id="results" style="float:left;">
|
||||
<b>Results:</b>
|
||||
<ul id="resultsList">
|
||||
<ul>
|
||||
</div>
|
||||
<p style="clear:both;"></p>
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
70
data/interfaces/default/searchresults.html
Normal file
70
data/interfaces/default/searchresults.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<%inherit file="base.html" />
|
||||
|
||||
<%def name="body()">
|
||||
|
||||
<div id="paddingheader">
|
||||
<h1>Search Results<h1>
|
||||
</div>
|
||||
<table class="display" id="searchresults_table">
|
||||
<thead>
|
||||
<tr>
|
||||
%if type == 'album':
|
||||
<th id="albumname">Album Name</th>
|
||||
%endif
|
||||
<th id="artistname">Artist Name</th>
|
||||
<th id="score">Score</th>
|
||||
<th id="add"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%if searchresults:
|
||||
%for result in searchresults:
|
||||
<%
|
||||
if result['score'] == 100:
|
||||
grade = 'A'
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
%if type == 'album':
|
||||
<td id="albumname"><a href="${result['albumurl']}">${result['title']}</a></td>
|
||||
%endif
|
||||
<td id="artistname"><a href="${result['url']}">${result['uniquename']}</a></td>
|
||||
<td id="score">${result['score']}</td>
|
||||
%if type == 'album':
|
||||
<td id="add"><a href="addReleaseById?rid=${result['albumid']}">Add this album</a></td>
|
||||
%else:
|
||||
<td id="add"><a href="addArtist?artistid=${result['id']}">Add this artist</a></td>
|
||||
%endif
|
||||
</tr>
|
||||
%endfor
|
||||
%endif
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#searchresults_table').dataTable(
|
||||
{
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ results per page",
|
||||
"sEmptyTable": "No results",
|
||||
"sInfo":"Showing _TOTAL_ results",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 results",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total results)"},
|
||||
"bPaginate": false,
|
||||
"bFilter": false,
|
||||
"aaSorting": []
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
13
data/interfaces/default/shutdown.html
Normal file
13
data/interfaces/default/shutdown.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<%inherit file="base.html"/>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<meta http-equiv="refresh" content="${timer};url=index">
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<div id="shutdown">
|
||||
<h1>Headphones is ${message}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</%def>
|
||||
86
data/interfaces/default/upcoming.html
Normal file
86
data/interfaces/default/upcoming.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<%inherit file="base.html" />
|
||||
<%def name="body()">
|
||||
<div class="table_wrapper">
|
||||
<h1>Upcoming Albums</h1>
|
||||
<table class="display" id="upcoming_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="albumart"></th>
|
||||
<th id="artistname">Artist</th>
|
||||
<th id="albumname">Album Name</th>
|
||||
<th id="reldate">Release Date</th>
|
||||
<th id="type">Type</th>
|
||||
<th id="status">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for album in upcoming:
|
||||
<tr class="gradeZ">
|
||||
<td id="albumart"><img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.MZZZZZZZ.jpg" height="50" width="50"></td>
|
||||
<td id="artistname">${album['ArtistName']}</td>
|
||||
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
||||
<td id="reldate">${album['ReleaseDate']}</td>
|
||||
<td id="type">${album['Type']}</td>
|
||||
<td id="status">${album['Status']}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form action="markAlbums" method="get">
|
||||
<p class="indented">Mark selected albums as
|
||||
<select name="action">
|
||||
<option value="Skipped">Skipped</option>
|
||||
<option value="Downloaded">Downloaded</option>
|
||||
</select>
|
||||
<input type="submit" value="Go">
|
||||
</p>
|
||||
<div class="table_wrapper">
|
||||
<h1>Wanted Albums</h1>
|
||||
<table class="display" id="upcoming_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
|
||||
<th id="albumart"></th>
|
||||
<th id="artistname">Artist</th>
|
||||
<th id="albumname">Album Name</th>
|
||||
<th id="reldate">Release Date</th>
|
||||
<th id="type">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for album in wanted:
|
||||
<tr class="gradeZ">
|
||||
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
|
||||
<td id="albumart"><img src="http://ec1.images-amazon.com/images/P/${album['AlbumASIN']}.01.MZZZZZZZ.jpg" height="50" width="50"></td>
|
||||
<td id="artistname">${album['ArtistName']}</td>
|
||||
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
||||
<td id="reldate">${album['ReleaseDate']}</td>
|
||||
<td id="type">${album['Type']}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#track_table').dataTable(
|
||||
{
|
||||
"bFilter": false,
|
||||
"bInfo": false,
|
||||
"bPaginate": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
@@ -1,3 +0,0 @@
|
||||
#import os.path
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
|
||||
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
|
||||
13
data/js/libs/dd_belatedpng.js
Executable file
13
data/js/libs/dd_belatedpng.js
Executable file
File diff suppressed because one or more lines are too long
8981
data/js/libs/jquery-1.6.2.js
vendored
Normal file
8981
data/js/libs/jquery-1.6.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
18
data/js/libs/jquery-1.6.2.min.js
vendored
Normal file
18
data/js/libs/jquery-1.6.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
151
data/js/libs/jquery.dataTables.min.js
vendored
Normal file
151
data/js/libs/jquery.dataTables.min.js
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* File: jquery.dataTables.min.js
|
||||
* Version: 1.8.1
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Info: www.datatables.net
|
||||
*
|
||||
* Copyright 2008-2011 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* This source file is free software, under either the GPL v2 license or a
|
||||
* BSD style license, as supplied with this software.
|
||||
*
|
||||
* This source file is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
||||
*/
|
||||
(function(i,wa,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var o=i.fn.dataTableExt;o.sVersion="1.8.1";o.sErrMode="alert";o.iApiIndex=0;o.oApi={};o.afnFiltering=[];o.aoFeatures=[];o.ofnSearch={};o.afnSortData=[];o.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",
|
||||
sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",
|
||||
sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};o.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",
|
||||
sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",
|
||||
sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",
|
||||
sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll",
|
||||
sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};o.oPagination={two_button:{fnInit:function(g,l,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;
|
||||
s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(s);l.appendChild(w);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(s).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false});
|
||||
if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,r=0,s=l.length;r<s;r++)if(l[r].childNodes.length!==0){l[r].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[r].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
|
||||
g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,r){var s=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),G=p.createElement("span"),x=p.createElement("span");s.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;G.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;s.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;G.className=
|
||||
v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(s);l.appendChild(w);l.appendChild(y);l.appendChild(G);l.appendChild(x);i(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&r(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});i(G).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&r(g)});i("span",l).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",
|
||||
function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");G.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var r=o.oPagination.iFullNumbersShowPages,s=Math.floor(r/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,G=
|
||||
"",x,v=g.oClasses;if(w<r){s=1;x=w}else if(y<=s){s=1;x=r}else if(y>=w-s){s=w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)G+=y!=r?'<span class="'+v.sPageButton+'">'+r+"</span>":'<span class="'+v.sPageButtonActive+'">'+r+"</span>";x=g.aanFeatures.p;var z,Y=function(L){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);L.preventDefault()},V=function(){return false};r=0;for(s=x.length;r<s;r++)if(x[r].childNodes.length!==0){z=i("span:eq(2)",x[r]);z.html(G);i("span",z).bind("click.DT",
|
||||
Y).bind("mousedown.DT",V).bind("selectstart.DT",V);z=x[r].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
|
||||
v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};o.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<
|
||||
l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<l?1:g>l?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l-
|
||||
g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};o.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,r=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var s=1;s<g.length;s++){l=g.charAt(s);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(r)return null;r=true}}return"numeric"},function(g){var l=Date.parse(g);
|
||||
if(l!==null&&!isNaN(l)||typeof g=="string"&&g.length===0)return"date";return null},function(g){if(typeof g=="string"&&g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];o.fnVersionCheck=function(g){var l=function(x,v){for(;x.length<v;)x+="0";return x},r=o.sVersion.split(".");g=g.split(".");for(var s="",w="",y=0,G=g.length;y<G;y++){s+=l(r[y],3);w+=l(g[y],3)}return parseInt(s,10)>=parseInt(w,10)};o._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal=
|
||||
function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance=
|
||||
this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ artists per page",sZeroRecords:"No matching records found",sEmptyTable:"",
|
||||
sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ artists",sInfoEmpty:"Showing 0 to 0 of 0 artists",sInfoFiltered:"(filtered from _MAX_ total artists)",sInfoPostFix:"",sSearch:"Filter:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,
|
||||
bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";
|
||||
this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})};
|
||||
this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=o.oStdClasses;this.bSortCellsTop=this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=
|
||||
[A(this[o.iApiIndex])].concat(Array.prototype.slice.call(arguments));return o.oApi[a].apply(this,b)}}function s(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===false)setTimeout(function(){s(a)},200);else{xa(a);V(a);L(a,a.aoHeader);a.nTFoot&&L(a,a.aoFooter);K(a,true);a.oFeatures.bAutoWidth&&ea(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=u(a.aoColumns[b].sWidth);if(a.oFeatures.bSort)R(a);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);
|
||||
else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide)a.fnServerData.call(a.oInstance,a.sAjaxSource,[],function(f){var e=f;if(a.sAjaxDataProp!=="")e=Z(a.sAjaxDataProp)(f);for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)R(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,f)},a);else if(!a.oFeatures.bServerSide){K(a,false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!=
|
||||
"undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){n(a.oLanguage,b,"sProcessing");n(a.oLanguage,b,"sLengthMenu");n(a.oLanguage,b,"sEmptyTable");n(a.oLanguage,b,"sLoadingRecords");n(a.oLanguage,b,"sZeroRecords");n(a.oLanguage,b,"sInfo");n(a.oLanguage,b,"sInfoEmpty");n(a.oLanguage,b,"sInfoFiltered");n(a.oLanguage,b,"sInfoPostFix");n(a.oLanguage,b,"sSearch");if(typeof b.oPaginate!="undefined"){n(a.oLanguage.oPaginate,b.oPaginate,"sFirst");n(a.oLanguage.oPaginate,
|
||||
b.oPaginate,"sPrevious");n(a.oLanguage.oPaginate,b.oPaginate,"sNext");n(a.oLanguage.oPaginate,b.oPaginate,"sLast")}typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sEmptyTable");typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sLoadingRecords");c&&s(a)}function G(a,b){var c=a.aoColumns.length;b={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],
|
||||
sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null};a.aoColumns.push(b);if(typeof a.aoPreSearchCols[c]=="undefined"||a.aoPreSearchCols[c]===null)a.aoPreSearchCols[c]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[c].bRegex==
|
||||
"undefined")a.aoPreSearchCols[c].bRegex=true;if(typeof a.aoPreSearchCols[c].bSmart=="undefined")a.aoPreSearchCols[c].bSmart=true}x(a,c,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}n(b,c,"bVisible");n(b,c,"bSearchable");n(b,c,"bSortable");n(b,c,"sTitle");n(b,c,"sName");n(b,c,"sWidth");n(b,c,"sWidth","sWidthOrig");n(b,c,"sClass");n(b,c,"fnRender");n(b,c,"bUseRendered");n(b,c,"iDataSort");n(b,c,"mDataProp");
|
||||
n(b,c,"asSorting");n(b,c,"sSortDataType");n(b,c,"sDefaultContent");n(b,c,"sContentPadding")}b.fnGetData=Z(b.mDataProp);b.fnSetData=ya(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortable;b.sSortingClassJUI=a.oClasses.sSortJUI}else if(i.inArray("asc",
|
||||
b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function v(a,b){var c;c=typeof b.length=="number"?b.slice():i.extend(true,{},b);b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var f,
|
||||
e=0,h=a.aoColumns.length;e<h;e++){c=a.aoColumns[e];typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&N(a,b,e,c.fnRender({iDataRow:b,iDataColumn:e,aData:d._aData,oSettings:a}));if(c._bAutoType&&c.sType!="string"){f=H(a,b,e,"type");if(f!==null&&f!==""){f=fa(f);if(c.sType===null)c.sType=f;else if(c.sType!=f)c.sType="string"}}}a.aiDisplayMaster.push(b);a.oFeatures.bDeferRender||z(a,b);return b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr");typeof c._aData.DT_RowId!=
|
||||
"undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId);typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,e=a.aoColumns.length;f<e;f++){var h=a.aoColumns[f];d=p.createElement("td");d.innerHTML=typeof h.fnRender=="function"&&(!h.bUseRendered||h.mDataProp===null)?h.fnRender({iDataRow:b,iDataColumn:f,aData:c._aData,oSettings:a}):H(a,b,f,"display");if(h.sClass!==null)d.className=h.sClass;if(h.bVisible){c.nTr.appendChild(d);c._anHidden[f]=null}else c._anHidden[f]=
|
||||
d}}}function Y(a){var b,c,d,f,e,h,j,k,m;if(a.bDeferLoading||a.sAjaxSource===null){j=a.nTBody.childNodes;b=0;for(c=j.length;b<c;b++)if(j[b].nodeName.toUpperCase()=="TR"){k=a.aoData.length;a.aoData.push({nTr:j[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(k);h=j[b].childNodes;d=e=0;for(f=h.length;d<f;d++){m=h[d].nodeName.toUpperCase();if(m=="TD"||m=="TH"){N(a,k,e,i.trim(h[d].innerHTML));e++}}}}j=$(a);h=[];b=0;for(c=j.length;b<c;b++){d=0;for(f=j[b].childNodes.length;d<
|
||||
f;d++){e=j[b].childNodes[d];m=e.nodeName.toUpperCase();if(m=="TD"||m=="TH")h.push(e)}}h.length!=j.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+j.length*a.aoColumns.length+" and got "+h.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");d=0;for(f=a.aoColumns.length;d<f;d++){if(a.aoColumns[d].sTitle===null)a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML;j=a.aoColumns[d]._bAutoType;
|
||||
m=typeof a.aoColumns[d].fnRender=="function";e=a.aoColumns[d].sClass!==null;k=a.aoColumns[d].bVisible;var t,q;if(j||m||e||!k){b=0;for(c=a.aoData.length;b<c;b++){t=h[b*f+d];if(j&&a.aoColumns[d].sType!="string"){q=H(a,b,d,"type");if(q!==""){q=fa(q);if(a.aoColumns[d].sType===null)a.aoColumns[d].sType=q;else if(a.aoColumns[d].sType!=q)a.aoColumns[d].sType="string"}}if(m){q=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a});t.innerHTML=q;a.aoColumns[d].bUseRendered&&
|
||||
N(a,b,d,q)}if(e)t.className+=" "+a.aoColumns[d].sClass;if(k)a.aoData[b]._anHidden[d]=null;else{a.aoData[b]._anHidden[d]=t;t.parentNode.removeChild(t)}}}}}function V(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}}else{var f=p.createElement("tr");b=0;
|
||||
for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);f.appendChild(c)}i(a.nTHead).html("")[0].appendChild(f);W(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var e=p.createElement("span");e.className=a.oClasses.sSortIcon;f.appendChild(e);c.appendChild(f)}}d=function(){this.onselectstart=
|
||||
function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ga(a,a.aoColumns[b].nTh,b);i(a.aoColumns[b].nTh).bind("mousedown.DT",d)}else i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(">tr>th",a.nTFoot).addClass(a.oClasses.sFooterTH);if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)if(typeof c[b]!="undefined")a.aoColumns[b].nTf=c[b]}}function L(a,b,c){var d,f,
|
||||
e,h=[],j=[],k=a.aoColumns.length;if(typeof c=="undefined")c=false;d=0;for(f=b.length;d<f;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(e=k-1;e>=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d<f;d++){if(h[d].nTr){a=0;for(e=h[d].nTr.childNodes.length;a<e;a++)h[d].nTr.removeChild(h[d].nTr.childNodes[0])}e=0;for(b=h[d].length;e<b;e++){k=c=1;if(typeof j[d][e]=="undefined"){h[d].nTr.appendChild(h[d][e].cell);for(j[d][e]=1;typeof h[d+c]!="undefined"&&h[d][e].cell==h[d+
|
||||
c][e].cell;){j[d+c][e]=1;c++}for(;typeof h[d][e+k]!="undefined"&&h[d][e].cell==h[d][e+k].cell;){for(a=0;a<c;a++)j[d+a][e+k]=1;k++}h[d][e].cell.setAttribute("rowspan",c);h[d][e].cell.setAttribute("colspan",k)}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripClasses.length;c=a.aoOpenRows.length;if(!(a.fnPreDrawCallback!==null&&a.fnPreDrawCallback.call(a.oInstance,a)===false)){a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?
|
||||
a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!za(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=h;h<j;h++){var k=a.aoData[a.aiDisplay[h]];k.nTr===null&&z(a,a.aiDisplay[h]);var m=k.nTr;if(b!==0){var t=a.asStripClasses[f%b];if(k._sRowStripe!=
|
||||
t){i(m).removeClass(k._sRowStripe).addClass(t);k._sRowStripe=t}}if(typeof a.fnRowCallback=="function"){m=a.fnRowCallback.call(a.oInstance,m,a.aoData[a.aiDisplay[h]]._aData,f,h);if(!m&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(m);f++;if(c!==0)for(k=0;k<c;k++)m==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");if(typeof a.asStripClasses[0]!="undefined")d[0].className=a.asStripClasses[0];e=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));
|
||||
if(a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide)e=a.oLanguage.sLoadingRecords;else if(typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0)e=a.oLanguage.sEmptyTable;b=p.createElement("td");b.setAttribute("valign","top");b.colSpan=X(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=e;d[f].appendChild(b)}typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,i(">tr",a.nTHead)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback==
|
||||
"function"&&a.fnFooterCallback.call(a.oInstance,i(">tr",a.nTFoot)[0],aa(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-
|
||||
1;b>=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function ba(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)M(a,a.oPreviousSearch);else{E(a);C(a)}}function za(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d,f;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ha(a)});
|
||||
c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});for(f=0;f<b;f++){d=a.aoColumns[f].mDataProp;c.push({name:"mDataProp_"+f,value:typeof d=="function"?"function":d})}if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++){c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch});c.push({name:"bRegex_"+
|
||||
f,value:a.aoPreSearchCols[f].bRegex});c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}}if(a.oFeatures.bSort!==false){d=a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var e=a.aaSorting.length;c.push({name:"iSortingCols",value:d+e});for(f=0;f<d;f++){c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]});c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]})}for(f=0;f<e;f++){c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]});c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]})}for(f=
|
||||
0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(h){Aa(a,h)},a);return false}else return true}function Aa(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))ia(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ha(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=
|
||||
Ba(a,b.sColumns);b=Z(a.sAjaxDataProp)(b);for(var f=0,e=b.length;f<e;f++)if(c){for(var h=[],j=0,k=a.aoColumns.length;j<k;j++)h.push(b[f][d[j]]);v(a,h)}else v(a,b[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function xa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");
|
||||
a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,h,j,k,m,t,q=0;q<d.length;q++){e=0;h=d[q];if(h=="<"){j=p.createElement("div");k=d[q+1];if(k=="'"||k=='"'){m="";for(t=2;d[q+t]!=k;){m+=d[q+t];t++}if(m=="H")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(m=="F")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(m.indexOf(".")!=-1){k=m.split(".");j.setAttribute("id",k[0].substr(1,
|
||||
k[0].length-1));j.className=k[1]}else if(m.charAt(0)=="#")j.setAttribute("id",m.substr(1,m.length-1));else j.className=m;q+=t}c.appendChild(j);c=j}else if(h==">")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ca(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Da(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ea(a);e=1}else if(h=="t"){f=Fa(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ga(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=Ha(a);e=1}else if(o.aoFeatures.length!==
|
||||
0){j=o.aoFeatures;t=0;for(k=j.length;t<k;t++)if(h==j[t].cFeature){if(f=j[t].fnInit(a))e=1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[h]!="object")a.aanFeatures[h]=[];a.aanFeatures[h].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function Fa(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(false),
|
||||
k=a.nTable.cloneNode(false),m=a.nTable.getElementsByTagName("thead")[0],t=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],q=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?o.oJUIClasses:o.oStdClasses;c.appendChild(d);e.appendChild(h);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(j);j.appendChild(m);if(t!==null){b.appendChild(e);h.appendChild(k);k.appendChild(t)}b.className=q.sScrollWrapper;c.className=q.sScrollHead;d.className=
|
||||
q.sScrollHeadInner;f.className=q.sScrollBody;e.className=q.sScrollFoot;h.className=q.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow="hidden";c.style.position="relative";e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";j.removeAttribute("id");j.style.marginLeft="0";a.nTable.style.marginLeft="0";if(t!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=i(">caption",a.nTable);h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);
|
||||
if(a.oScroll.sX!==""){c.style.width=u(a.oScroll.sX);f.style.width=u(a.oScroll.sX);if(t!==null)e.style.width=u(a.oScroll.sX);i(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(t!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=u(a.oScroll.sY);a.aoDrawCallback.push({fn:Ia,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){if(!a.bDrawing)if(i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ja(a,
|
||||
"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ia(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,e,h,j,k,m,t,q,I=[];h=a.nTable.getElementsByTagName("thead");h.length>0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);
|
||||
a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var O=S(a,h);f=0;for(e=O.length;f<e;f++){t=Ja(a,f);O[f].style.width=a.aoColumns[t].sWidth}a.nTFoot!==null&&P(function(B){B.style.width=""},k.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(i.browser.msie&&i.browser.version<=7)a.nTable.style.width=u(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!==
|
||||
"")a.nTable.style.width=u(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){a.nTable.style.width=u(f-a.oScroll.iBarWidth);if(i(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=u(f)}else a.nTable.style.width=u(f);f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){d.style.width=u(f+a.oScroll.iBarWidth);b.parentNode.style.width=u(f+a.oScroll.iBarWidth)}e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop=
|
||||
"0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(B,F){m=B.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;q=i(B).width();F.style.width=u(q);I.push(q)},j,k);i(j).height(0)}P(function(B){B.innerHTML="";B.style.width=u(I.shift())},h);a.nTFoot!==null&&P(function(B){B.innerHTML=
|
||||
"";B.style.width=u(I.shift())},j);if(i(a.nTable).outerWidth()<f)if(a.oScroll.sX==="")J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you enable x-scrolling or increase the width the table has in which to be drawn");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation");
|
||||
if(a.oScroll.sY==="")if(i.browser.msie&&i.browser.version<=7)d.style.height=u(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=u(a.oScroll.sY);j=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=u(i(a.nTable).height()+j)}j=i(a.nTable).outerWidth();c.style.width=u(j);b.style.width=u(j+a.oScroll.iBarWidth);if(a.nTFoot!==null){b=a.nScrollFoot.getElementsByTagName("div")[0];
|
||||
c=b.getElementsByTagName("table")[0];b.style.width=u(a.nTable.offsetWidth+a.oScroll.iBarWidth);c.style.width=u(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function ca(a){if(a.oFeatures.bAutoWidth===false)return false;ea(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Da(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';
|
||||
var c=p.createElement("div");c.className=a.oClasses.sFilter;c.innerHTML="<label>"+b+"</label>";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f<e;f++)d[f]!=this.parentNode&&i("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&M(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});
|
||||
b.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return c}function M(a,b,c){Ka(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)La(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);o.afnFiltering.length!==0&&Ma(a);a.bFiltered=true;a._iDisplayStart=0;E(a);C(a);ka(a,0)}function Ma(a){for(var b=o.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,h=a.aiDisplay.length;e<h;e++){var j=a.aiDisplay[e-f];if(!b[c](a,da(a,j,"filter"),
|
||||
j)){a.aiDisplay.splice(e-f,1);f++}}}function La(a,b,c,d,f){if(b!==""){var e=0;b=la(b,d,f);for(d=a.aiDisplay.length-1;d>=0;d--){f=ma(H(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Ka(a,b,c,d,f){var e=la(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(o.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>
|
||||
b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);ka(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var h=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-h,1);h++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function ka(a,b){a.asDataSearch.splice(0,a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:
|
||||
a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=na(a,da(a,b[c],"filter"))}function na(a,b){var c="";if(typeof a.__nTmpFilter=="undefined")a.__nTmpFilter=p.createElement("div");for(var d=a.__nTmpFilter,f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=ma(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,"")}return c}function la(a,b,c){if(c){a=b?a.split(" "):oa(a).split(" ");
|
||||
a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:oa(a);return new RegExp(a,"i")}}function ma(a,b){if(typeof o.ofnSearch[b]=="function")return o.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=o.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!==
|
||||
null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<h.length;c++){var t=h[c][0];f=pa(a,t);e=a.aoColumns[t].sSortDataType;if(typeof o.afnSortData[e]!="undefined"){var q=o.afnSortData[e](a,t,f);f=0;for(e=d.length;f<e;f++)N(a,f,t,q[f])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)j[a.aiDisplayMaster[c]]=c;var I=h.length;a.aiDisplayMaster.sort(function(O,B){var F,qa;for(c=0;c<I;c++){F=m[h[c][0]].iDataSort;qa=m[F].sType;F=k[(qa?qa:"string")+"-"+h[c][1]](H(a,O,F,"sort"),H(a,B,F,"sort"));
|
||||
if(F!==0)return F}return k["numeric-asc"](j[O],j[B])})}if((typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender)T(a);a.bSorted=true;if(a.oFeatures.bFilter)M(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;E(a);C(a)}}function ga(a,b,c,d){i(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var h,j;if(f.shiftKey){for(var k=false,m=0;m<a.aaSorting.length;m++)if(a.aaSorting[m][0]==c){k=true;h=a.aaSorting[m][0];j=a.aaSorting[m][2]+
|
||||
1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")a.aaSorting.splice(m,1);else{a.aaSorting[m][1]=a.aoColumns[h].asSorting[j];a.aaSorting[m][2]=j}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){h=a.aaSorting[0][0];j=a.aaSorting[0][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")j=0;a.aaSorting[0][1]=a.aoColumns[h].asSorting[j];a.aaSorting[0][2]=j}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],
|
||||
0])}R(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function T(a){var b,c,d,f,e,h=a.aoColumns.length,j=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;
|
||||
d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=i("span",a.aoColumns[b].nTh);c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?j.sSortJUIAsc:j.sSortJUIDesc)}}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);e=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=
|
||||
Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(e+"1 "+e+"2 "+e+"3");else if(d.length>=h)for(b=0;b<h;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+
|
||||
e+"3",""))}j=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+k].className+=" "+e+j;j<3&&j++}}}function Ha(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;o.oPagination[a.sPaginationType].fnInit(a,b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){o.oPagination[c.sPaginationType].fnUpdate(c,function(d){E(d);C(d)})},sName:"pagination"});return b}
|
||||
function ja(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay())a._iDisplayStart+=a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(a._iDisplayLength>=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=
|
||||
0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Ga(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Na,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Na(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j=
|
||||
a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",
|
||||
e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(e)}}function Ca(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]==
|
||||
"object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+
|
||||
a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function Ea(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r==
|
||||
"undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Ja(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function pa(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===
|
||||
true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function U(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function X(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||
|
||||
a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Oa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=u(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",a.nTHead);for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Oa(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==
|
||||
null)a.aoColumns[e].sWidth=u(c);b++}}if(f==h.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=i(h[e]).width();if(c!==null)a.aoColumns[e].sWidth=u(c)}else{b=a.nTable.cloneNode(false);e=a.nTHead.cloneNode(true);d=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(e);if(a.nTFoot!==null){b.appendChild(a.nTFoot.cloneNode(true));P(function(k){k.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(d);d.appendChild(c);
|
||||
d=i("thead th",b);if(d.length===0)d=i("tbody tr:eq(0)>td",b);h=S(a,e);for(e=d=0;e<f;e++){var j=a.aoColumns[e];if(j.bVisible&&j.sWidthOrig!==null&&j.sWidthOrig!=="")h[e-d].style.width=u(j.sWidthOrig);else if(j.bVisible)h[e-d].style.width="";else d++}for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Pa(a,e);if(d!==null){d=d.cloneNode(true);if(a.aoColumns[e].sContentPadding!=="")d.innerHTML+=a.aoColumns[e].sContentPadding;c.appendChild(d)}}f=a.nTable.parentNode;f.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!==
|
||||
"")b.style.width=u(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(i(b).width()<f.offsetWidth)b.style.width=u(f.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=u(f.offsetWidth);b.style.visibility="hidden";Qa(a,b);f=i("tbody tr:eq(0)",b).children();if(f.length===0)f=S(a,i("thead",b)[0]);if(a.oScroll.sX!==""){for(e=d=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c+=a.aoColumns[e].sWidthOrig===null?i(f[d]).outerWidth():parseInt(a.aoColumns[e].sWidth.replace("px",""),
|
||||
10)+(i(f[d]).outerWidth()-i(f[d]).width());d++}b.style.width=u(c);a.nTable.style.width=u(c)}for(e=d=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c=i(f[d]).width();if(c!==null&&c>0)a.aoColumns[e].sWidth=u(c);d++}a.nTable.style.width=u(i(b).outerWidth());b.parentNode.removeChild(b)}}function Qa(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=u(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=u(i(b).outerWidth())}function Pa(a,b){var c=
|
||||
Ra(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=H(a,c,b,"");return d}return Q(a,c)[b]}function Ra(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var e=H(a,f,b,"display")+"";e=e.replace(/<.*?>/g,"");if(e.length>c){c=e.length;d=f}}return d}function u(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Va(a,b){if(a.length!=b.length)return 1;for(var c=
|
||||
0;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function fa(a){for(var b=o.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function aa(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function $(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);return b}function Q(a,b){var c=[],d,f,e,h,j;f=0;var k=a.aoData.length;
|
||||
if(typeof b!="undefined"){f=b;k=b+1}for(f=f;f<k;f++){j=a.aoData[f];if(j.nTr!==null){b=[];e=0;for(h=j.nTr.childNodes.length;e<h;e++){d=j.nTr.childNodes[e].nodeName.toLowerCase();if(d=="td"||d=="th")b.push(j.nTr.childNodes[e])}e=d=0;for(h=a.aoColumns.length;e<h;e++)if(a.aoColumns[e].bVisible)c.push(b[e-d]);else{c.push(j._anHidden[e]);d++}}}return c}function oa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ra(a,b){for(var c=-1,d=
|
||||
0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Ba(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ha(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(o.sErrMode==
|
||||
"alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function ia(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function sa(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",";f+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:
|
||||
a._iDisplayEnd)+",";f+='"iLength":'+a._iDisplayLength+",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+"],";f=f.substring(0,f.length-
|
||||
1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+=a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";Sa(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Ta(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=ta(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,'"')):eval("("+d+")")}catch(e){return}d=
|
||||
0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]=
|
||||
{sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Sa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=wa.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;if(f!==null){h=typeof i.parseJSON=="function"?i.parseJSON(b):eval("("+b+")");b=f(a,h,e.toGMTString(),
|
||||
c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/";f="";e=9999999999999;if((ta(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(t){continue}if(typeof h.iCreate!="undefined"&&h.iCreate<e){f=m[0];e=h.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+
|
||||
"/"}p.cookie=b}function ta(a){var b=wa.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function W(a,b){b=b.getElementsByTagName("tr");var c,d,f,e,h,j,k,m,t=function(O,B,F){for(;typeof O[B][F]!="undefined";)F++;return F};a.splice(0,a.length);d=0;for(j=b.length;d<
|
||||
j;d++)a.push([]);d=0;for(j=b.length;d<j;d++){f=0;for(k=b[d].childNodes.length;f<k;f++){c=b[d].childNodes[f];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var q=c.getAttribute("colspan")*1,I=c.getAttribute("rowspan")*1;q=!q||q===0||q===1?1:q;I=!I||I===0||I===1?1:I;m=t(a,d,0);for(h=0;h<q;h++)for(e=0;e<I;e++){a[d+e][m+h]={cell:c,unique:q==1?true:false};a[d+e].nTr=b[d]}}}}}function S(a,b,c){var d=[];if(typeof c=="undefined"){c=a.aoHeader;if(typeof b!="undefined"){c=[];W(c,b)}}b=0;
|
||||
for(var f=c.length;b<f;b++)for(var e=0,h=c[b].length;e<h;e++)if(c[b][e].unique&&(typeof d[e]=="undefined"||!a.bSortCellsTop))d[e]=c[b][e].cell;return d}function Ua(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=
|
||||
c.clientWidth;p.body.removeChild(c);return b-a}function P(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,h=b[d].childNodes.length;e<h;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function n(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}function da(a,b,c){for(var d=[],f=0,e=a.aoColumns.length;f<e;f++)d.push(H(a,b,f,c));return d}function H(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData))===
|
||||
undefined){if(a.iDrawError!=a.iDraw&&f.sDefaultContent===null){J(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b);a.iDrawError=a.iDraw}return f.sDefaultContent}if(c===null&&f.sDefaultContent!==null)c=f.sDefaultContent;if(d=="display"&&c===null)return"";return c}function N(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Z(a){if(a===null)return function(){return null};else if(typeof a=="function")return function(c){return a(c)};else if(typeof a==
|
||||
"string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c){return c[b[0]][b[1]]}:b.length==3?function(c){return c[b[0]][b[1]][b[2]]}:function(c){for(var d=0,f=b.length;d<f;d++)c=c[b[d]];return c}}else return function(c){return c[a]}}function ya(a){if(a===null)return function(){};else if(typeof a=="function")return function(c,d){return a(c,d)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c,d){c[b[0]][b[1]]=d}:b.length==3?function(c,
|
||||
d){c[b[0]][b[1]][b[2]]=d}:function(c,d){for(var f=0,e=b.length-1;f<e;f++)c=c[b[f]];c[b[b.length-1]]=d}}else return function(c,d){c[a]=d}}this.oApi={};this.fnDraw=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else ba(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=true;if(typeof b=="undefined"||b===null){M(e,{sSearch:a,bRegex:c,
|
||||
bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;M(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[o.iApiIndex])};this.fnVersionCheck=o.fnVersionCheck;this.fnSort=function(a){var b=A(this[o.iApiIndex]);b.aaSorting=a;R(b)};this.fnSortListener=function(a,b,c){ga(A(this[o.iApiIndex]),a,b,c)};this.fnAddData=function(a,
|
||||
b){if(a.length===0)return[];var c=[],d,f=A(this[o.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=v(f,a[e]);if(d==-1)return c;c.push(d)}else{d=v(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)ba(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[o.iApiIndex]);a=typeof a=="object"?U(d,a):a;var f=d.aoData.splice(a,1),e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ra(d.aiDisplayMaster,a);ra(d.aiDisplay,a);typeof b==
|
||||
"function"&&b.call(this,d,f);if(d._iDisplayStart>=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[o.iApiIndex]);ia(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[o.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=X(d);if(typeof b.jquery!="undefined"||typeof b==
|
||||
"object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[o.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a,b){var c=A(this[o.iApiIndex]);if(typeof a!="undefined"){a=typeof a=="object"?U(c,a):a;if(typeof b!=
|
||||
"undefined")return H(c,a,b,"");return typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null}return aa(c)};this.fnGetNodes=function(a){var b=A(this[o.iApiIndex]);if(typeof a!="undefined")return typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null;return $(b)};this.fnGetPosition=function(a){var b=A(this[o.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return U(b,a);else if(c=="TD"||c=="TH"){c=U(b,a.parentNode);for(var d=Q(b,c),f=0;f<b.aoColumns.length;f++)if(d[f]==a)return[c,pa(b,f),f]}return null};
|
||||
this.fnUpdate=function(a,b,c,d,f){var e=A(this[o.iApiIndex]);b=typeof b=="object"?U(e,b):b;if(i.isArray(a)&&typeof a=="object"){e.aoData[b]._aData=a.slice();for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else if(typeof a=="object"){e.aoData[b]._aData=i.extend(true,{},a);for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(H(e,b,c),b,c,false,false)}else{a=a;N(e,b,c,a);if(e.aoColumns[c].fnRender!==null){a=e.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:e.aoData[b]._aData,
|
||||
oSettings:e});e.aoColumns[c].bUseRendered&&N(e,b,c,a)}if(e.aoData[b].nTr!==null)Q(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=na(e,da(e,b,"filter"));if(typeof f=="undefined"||f)ca(e);if(typeof d=="undefined"||d)ba(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[o.iApiIndex]),f,e;e=d.aoColumns.length;var h,j;if(d.aoColumns[a].bVisible!=b){if(b){for(f=j=0;f<a;f++)d.aoColumns[f].bVisible&&j++;j=j>=X(d);if(!j)for(f=a;f<e;f++)if(d.aoColumns[f].bVisible){h=f;break}f=0;
|
||||
for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null)j?d.aoData[f].nTr.appendChild(d.aoData[f]._anHidden[a]):d.aoData[f].nTr.insertBefore(d.aoData[f]._anHidden[a],Q(d,f)[h])}else{f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null){h=Q(d,f)[a];d.aoData[f]._anHidden[a]=h;h.parentNode.removeChild(h)}}d.aoColumns[a].bVisible=b;L(d,d.aoHeader);d.nTFoot&&L(d,d.aoFooter);f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=X(d);if(typeof c=="undefined"||c){ca(d);C(d)}sa(d)}};this.fnPageChange=
|
||||
function(a,b){var c=A(this[o.iApiIndex]);ja(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy=function(){var a=A(this[o.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);i(a.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){i(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&&
|
||||
a.nTable!=a.nTFoot.parentNode){i(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);i($(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oJUIClasses.sSortableAsc,o.oJUIClasses.sSortableDesc,o.oJUIClasses.sSortableNone].join(" "));i("th span."+o.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e=
|
||||
i("div."+o.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([o.oStdClasses.sSortable,o.oStdClasses.sSortableAsc,o.oStdClasses.sSortableDesc,o.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;d<f;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);if(a.oFeatures.bAutoWidth===true)a.nTable.style.width=u(a.sDestroyWidth);
|
||||
i(">tr:even",c).addClass(a.asDestoryStrips[0]);i(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1);a=null};this.fnAdjustColumnSizing=function(a){var b=A(this[o.iApiIndex]);ca(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var ua in o.oApi)if(ua)this[ua]=r(ua);this.oApi._fnExternApiFunc=r;this.oApi._fnInitalise=s;this.oApi._fnInitComplete=w;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=
|
||||
G;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=v;this.oApi._fnCreateTr=z;this.oApi._fnGatherData=Y;this.oApi._fnBuildHead=V;this.oApi._fnDrawHead=L;this.oApi._fnDraw=C;this.oApi._fnReDraw=ba;this.oApi._fnAjaxUpdate=za;this.oApi._fnAjaxUpdateDraw=Aa;this.oApi._fnAddOptionsHtml=xa;this.oApi._fnFeatureHtmlTable=Fa;this.oApi._fnScrollDraw=Ia;this.oApi._fnAjustColumnSizing=ca;this.oApi._fnFeatureHtmlFilter=Da;this.oApi._fnFilterComplete=M;this.oApi._fnFilterCustom=Ma;this.oApi._fnFilterColumn=La;
|
||||
this.oApi._fnFilter=Ka;this.oApi._fnBuildSearchArray=ka;this.oApi._fnBuildSearchRow=na;this.oApi._fnFilterCreateSearch=la;this.oApi._fnDataToSearch=ma;this.oApi._fnSort=R;this.oApi._fnSortAttachListener=ga;this.oApi._fnSortingClasses=T;this.oApi._fnFeatureHtmlPaginate=Ha;this.oApi._fnPageChange=ja;this.oApi._fnFeatureHtmlInfo=Ga;this.oApi._fnUpdateInfo=Na;this.oApi._fnFeatureHtmlLength=Ca;this.oApi._fnFeatureHtmlProcessing=Ea;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=Ja;this.oApi._fnColumnIndexToVisible=
|
||||
pa;this.oApi._fnNodeToDataIndex=U;this.oApi._fnVisbleColumns=X;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Oa;this.oApi._fnCalculateColumnWidths=ea;this.oApi._fnScrollingWidthAdjust=Qa;this.oApi._fnGetWidestNode=Pa;this.oApi._fnGetMaxLenString=Ra;this.oApi._fnStringToCss=u;this.oApi._fnArrayCmp=Va;this.oApi._fnDetectType=fa;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=aa;this.oApi._fnGetTrNodes=$;this.oApi._fnGetTdNodes=Q;this.oApi._fnEscapeRegex=oa;this.oApi._fnDeleteIndex=
|
||||
ra;this.oApi._fnReOrderIndex=Ba;this.oApi._fnColumnOrdering=ha;this.oApi._fnLog=J;this.oApi._fnClearTable=ia;this.oApi._fnSaveState=sa;this.oApi._fnLoadState=Ta;this.oApi._fnCreateCookie=Sa;this.oApi._fnReadCookie=ta;this.oApi._fnDetectHeader=W;this.oApi._fnGetUniqueThs=S;this.oApi._fnScrollBarWidth=Ua;this.oApi._fnApplyToChildren=P;this.oApi._fnMap=n;this.oApi._fnGetRowData=da;this.oApi._fnGetCellData=H;this.oApi._fnSetCellData=N;this.oApi._fnGetObjectDataFn=Z;this.oApi._fnSetObjectDataFn=ya;var va=
|
||||
this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");
|
||||
return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new l;D.push(e);var h=false,j=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=o._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=va.length==1?va:i(this).dataTable();e.oApi=va.oApi;e.sDestroyWidth=i(this).width();if(typeof g!=
|
||||
"undefined"&&g!==null){e.oInit=g;n(e.oFeatures,g,"bPaginate");n(e.oFeatures,g,"bLengthChange");n(e.oFeatures,g,"bFilter");n(e.oFeatures,g,"bSort");n(e.oFeatures,g,"bInfo");n(e.oFeatures,g,"bProcessing");n(e.oFeatures,g,"bAutoWidth");n(e.oFeatures,g,"bSortClasses");n(e.oFeatures,g,"bServerSide");n(e.oFeatures,g,"bDeferRender");n(e.oScroll,g,"sScrollX","sX");n(e.oScroll,g,"sScrollXInner","sXInner");n(e.oScroll,g,"sScrollY","sY");n(e.oScroll,g,"bScrollCollapse","bCollapse");n(e.oScroll,g,"bScrollInfinite",
|
||||
"bInfinite");n(e.oScroll,g,"iScrollLoadGap","iLoadGap");n(e.oScroll,g,"bScrollAutoCss","bAutoCss");n(e,g,"asStripClasses");n(e,g,"fnPreDrawCallback");n(e,g,"fnRowCallback");n(e,g,"fnHeaderCallback");n(e,g,"fnFooterCallback");n(e,g,"fnCookieCallback");n(e,g,"fnInitComplete");n(e,g,"fnServerData");n(e,g,"fnFormatNumber");n(e,g,"aaSorting");n(e,g,"aaSortingFixed");n(e,g,"aLengthMenu");n(e,g,"sPaginationType");n(e,g,"sAjaxSource");n(e,g,"sAjaxDataProp");n(e,g,"iCookieDuration");n(e,g,"sCookiePrefix");
|
||||
n(e,g,"sDom");n(e,g,"bSortCellsTop");n(e,g,"oSearch","oPreviousSearch");n(e,g,"aoSearchCols","aoPreSearchCols");n(e,g,"iDisplayLength","_iDisplayLength");n(e,g,"bJQueryUI","bJUI");n(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});
|
||||
if(e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses)e.aoDrawCallback.push({fn:T,sName:"server_side_sort_classes"});else e.oFeatures.bDeferRender&&e.aoDrawCallback.push({fn:T,sName:"defer_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=o.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ua();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=
|
||||
g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ta(e,g);e.aoDrawCallback.push({fn:sa,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==
|
||||
""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(t){y(e,t,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=i(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripClasses[a])){c=true;break}if(c){e.asDestoryStrips=["",""];if(i(d[0]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[0]+=
|
||||
e.oClasses.sStripOdd+" ";if(i(d[0]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[0]+=e.oClasses.sStripEven;if(i(d[1]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[1]+=e.oClasses.sStripOdd+" ";if(i(d[1]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[1]+=e.oClasses.sStripEven;d.removeClass(e.asStripClasses.join(" "))}c=[];var k;a=this.getElementsByTagName("thead");if(a.length!==0){W(e.aoHeader,a[0]);c=S(e)}if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=
|
||||
g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}G(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){var m=g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c<d;c++)if(typeof m[c]=="number"&&m[c]>=0){for(;e.aoColumns.length<=m[c];)G(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]==
|
||||
"number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b<f;b++)if(m[c]=="_all"||i(e.aoColumns[b].nTh).hasClass(m[c]))x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&
|
||||
typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}T(e);a=i(">thead",this);if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=a[0];a=i(">tbody",this);if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(">tfoot",this);if(a.length>0){e.nTFoot=a[0];W(e.aoFooter,e.nTFoot)}if(j)for(a=0;a<g.aaData.length;a++)v(e,g.aaData[a]);
|
||||
else Y(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;h===false&&s(e)}})}})(jQuery,window,document);
|
||||
2
data/js/libs/modernizr-1.7.min.js
vendored
Executable file
2
data/js/libs/modernizr-1.7.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
41
data/js/plugins.js
Executable file
41
data/js/plugins.js
Executable file
@@ -0,0 +1,41 @@
|
||||
window.log = function(){
|
||||
log.history = log.history || [];
|
||||
log.history.push(arguments);
|
||||
arguments.callee = arguments.callee.caller;
|
||||
if(this.console) console.log( Array.prototype.slice.call(arguments) );
|
||||
};
|
||||
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});
|
||||
|
||||
jQuery.fn.dataTableExt.oSort['title-string-asc'] = function(a,b) {
|
||||
var x = a.match(/title="(.*?)"/)[1].toLowerCase();
|
||||
var y = b.match(/title="(.*?)"/)[1].toLowerCase();
|
||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
};
|
||||
|
||||
jQuery.fn.dataTableExt.oSort['title-string-desc'] = function(a,b) {
|
||||
var x = a.match(/title="(.*?)"/)[1].toLowerCase();
|
||||
var y = b.match(/title="(.*?)"/)[1].toLowerCase();
|
||||
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
||||
};
|
||||
|
||||
jQuery.fn.dataTableExt.oSort['title-numeric-asc'] = function(a,b) {
|
||||
var x = a.match(/title="*(-?[0-9]+)/)[1];
|
||||
var y = b.match(/title="*(-?[0-9]+)/)[1];
|
||||
x = parseFloat( x );
|
||||
y = parseFloat( y );
|
||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
};
|
||||
|
||||
jQuery.fn.dataTableExt.oSort['title-numeric-desc'] = function(a,b) {
|
||||
var x = a.match(/title="*(-?[0-9]+)/)[1];
|
||||
var y = b.match(/title="*(-?[0-9]+)/)[1];
|
||||
x = parseFloat( x );
|
||||
y = parseFloat( y );
|
||||
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
||||
};
|
||||
|
||||
function toggle(source) {
|
||||
checkboxes = document.getElementsByClassName('checkbox');
|
||||
for(var i in checkboxes)
|
||||
checkboxes[i].checked = source.checked;
|
||||
}
|
||||
0
data/js/script.js
Executable file
0
data/js/script.js
Executable file
@@ -1 +0,0 @@
|
||||
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3(7.X){7["R"+a]=a;7["z"+a]=6(){7["R"+a](7.1k)};7.X("1e",7["z"+a])}E{7.19("z",a,15)}2 j=H V();6 a(){2 e=q.1d("1a");3(e){o(e,"P");2 N=B(q,"*","14");3((e.12<=10)||(N=="")){c(e,"P",d)}}4=B(q,"*","1n");k(i=0;i<4.b;i++){3(4[i].F=="1g"||4[i].F=="1f"||4[i].F=="1c"){4[i].1b=6(){r();c(v.5.5,"f",d)};4[i].O=6(){r();c(v.5.5,"f",d)};j.D(j.b,0,4[i])}E{4[i].O=6(){r();c(v.5.5,"f",d)};4[i].18=6(){o(v.5.5,"f")}}}2 C=17.16.13();2 A=q.M("11");3(C.K("J")+1){c(A[0],"J",d)}3(C.K("I")+1){c(A[0],"I",d)}}6 r(){k(2 i=0;i<j.b;i++){o(j[i].5.5,"f")}}6 B(m,y,w){2 x=(y=="*"&&m.Y)?m.Y:m.M(y);2 G=H V();w=w.1m(/\\-/g,"\\\\-");2 L=H 1l("(^|\\\\s)"+w+"(\\\\s|$)");2 n;k(2 i=0;i<x.b;i++){n=x[i];3(L.1j(n.8)){G.1i(n)}}1h(G)}6 o(p,T){3(p.8){2 h=p.8.Z(" ");2 U=T.t();k(2 i=0;i<h.b;i++){3(h[i].t()==U){h.D(i,1);i--}}p.8=h.S(" ")}}6 c(l,u,Q){3(l.8){2 9=l.8.Z(" ");3(Q){2 W=u.t();k(2 i=0;i<9.b;i++){3(9[i].t()==W){9.D(i,1);i--}}}9[9.b]=u;l.8=9.S(" ")}E{l.8=u}}',62,86,'||var|if|elements|parentNode|function|window|className|_16|initialize|length|addClassName|true|_1|highlighted||_10||el_array|for|_13|_6|_c|removeClassName|_e|document|safari_reset||toUpperCase|_14|this|_8|_9|_7|load|_4|getElementsByClassName|_3|splice|else|type|_a|new|firefox|safari|indexOf|_b|getElementsByTagName|_2|onfocus|no_guidelines|_15|event_load|join|_f|_11|Array|_17|attachEvent|all|split|450|body|offsetWidth|toLowerCase|guidelines|false|userAgent|navigator|onblur|addEventListener|main_body|onclick|file|getElementById|onload|radio|checkbox|return|push|test|event|RegExp|replace|element'.split('|'),0,{}))
|
||||
@@ -429,6 +429,7 @@ def dbcheck():
|
||||
c.execute('CREATE TABLE IF NOT EXISTS snatched (AlbumID TEXT, Title TEXT, Size INTEGER, URL TEXT, DateAdded TEXT, Status TEXT, FolderName TEXT)')
|
||||
c.execute('CREATE TABLE IF NOT EXISTS have (ArtistName TEXT, AlbumTitle TEXT, TrackNumber TEXT, TrackTitle TEXT, TrackLength TEXT, BitRate TEXT, Genre TEXT, Date TEXT, TrackID TEXT)')
|
||||
c.execute('CREATE TABLE IF NOT EXISTS lastfmcloud (ArtistName TEXT, ArtistID TEXT, Count INTEGER)')
|
||||
c.execute('CREATE TABLE IF NOT EXISTS descriptions (ReleaseGroupID TEXT, ReleaseID TEXT, Summary TEXT, Content TEXT)')
|
||||
|
||||
try:
|
||||
c.execute('SELECT IncludeExtras from artists')
|
||||
|
||||
@@ -79,8 +79,10 @@ def convert_milliseconds(ms):
|
||||
|
||||
seconds = ms/1000
|
||||
gmtime = time.gmtime(seconds)
|
||||
|
||||
minutes = time.strftime("%M:%S", gmtime)
|
||||
if seconds > 3600:
|
||||
minutes = time.strftime("%H:%M:%S", gmtime)
|
||||
else:
|
||||
minutes = time.strftime("%M:%S", gmtime)
|
||||
|
||||
return minutes
|
||||
|
||||
@@ -123,4 +125,17 @@ def extract_data(s):
|
||||
return (name, album, year)
|
||||
else:
|
||||
logger.info("Couldn't parse " + s + " into a valid Newbin format")
|
||||
return (name, album, year)
|
||||
return (name, album, year)
|
||||
|
||||
def extract_logline(s):
|
||||
# Default log format
|
||||
pattern = re.compile(r'(?P<timestamp>.*?)\s\-\s(?P<level>.*?)\s*\:\:\s(?P<thread>.*?)\s\:\s(?P<message>.*)', re.VERBOSE)
|
||||
match = pattern.match(s)
|
||||
if match:
|
||||
timestamp = match.group("timestamp")
|
||||
level = match.group("level")
|
||||
thread = match.group("thread")
|
||||
message = match.group("message")
|
||||
return (timestamp, level, thread, message)
|
||||
else:
|
||||
return None
|
||||
@@ -215,6 +215,8 @@ def addArtisttoDB(artistid, extrasonly=False):
|
||||
|
||||
myDB.upsert("albums", newValueDict, controlValueDict)
|
||||
|
||||
lastfm.getAlbumDescription(rg['id'], release_dict['releaselist'])
|
||||
|
||||
# I changed the albumid from releaseid -> rgid, so might need to delete albums that have a releaseid
|
||||
for release in release_dict['releaselist']:
|
||||
myDB.action('DELETE from albums WHERE AlbumID=?', [release['releaseid']])
|
||||
|
||||
@@ -4,7 +4,7 @@ from collections import defaultdict
|
||||
import random
|
||||
|
||||
import headphones
|
||||
from headphones import db
|
||||
from headphones import db, logger
|
||||
|
||||
api_key = '395e6ec6bb557382fc41fde867bce66f'
|
||||
|
||||
@@ -91,4 +91,44 @@ def getArtists():
|
||||
for artistid in artistlist:
|
||||
importer.addArtisttoDB(artistid)
|
||||
|
||||
def getAlbumDescription(rgid, releaselist):
|
||||
|
||||
myDB = db.DBConnection()
|
||||
result = myDB.select('SELECT Summary from descriptions WHERE ReleaseGroupID=?', [rgid])
|
||||
|
||||
if result:
|
||||
return
|
||||
|
||||
for release in releaselist:
|
||||
|
||||
mbid = release['releaseid']
|
||||
url = 'http://ws.audioscrobbler.com/2.0/?method=album.getInfo&mbid=%s&api_key=%s' % (mbid, api_key)
|
||||
data = urllib.urlopen(url).read()
|
||||
|
||||
if data == '<?xml version="1.0" encoding="utf-8"?><lfm status="failed"><error code="6">Album not found</error></lfm>':
|
||||
continue
|
||||
|
||||
try:
|
||||
d = minidom.parseString(data)
|
||||
|
||||
albuminfo = d.getElementsByTagName("album")
|
||||
|
||||
for item in albuminfo:
|
||||
summarynode = item.getElementsByTagName("summary")[0].childNodes
|
||||
contentnode = item.getElementsByTagName("content")[0].childNodes
|
||||
for node in summarynode:
|
||||
summary = node.data
|
||||
for node in contentnode:
|
||||
content = node.data
|
||||
|
||||
controlValueDict = {'ReleaseGroupID': rgid}
|
||||
newValueDict = {'ReleaseID': mbid,
|
||||
'Summary': summary,
|
||||
'Content': content}
|
||||
myDB.upsert("descriptions", newValueDict, controlValueDict)
|
||||
break
|
||||
|
||||
except:
|
||||
continue
|
||||
|
||||
|
||||
@@ -66,6 +66,47 @@ def findArtist(name, limit=1):
|
||||
})
|
||||
|
||||
return artistlist
|
||||
|
||||
def findRelease(name, limit=1):
|
||||
|
||||
with mb_lock:
|
||||
|
||||
releaselist = []
|
||||
attempt = 0
|
||||
releaseResults = None
|
||||
|
||||
chars = set('!?')
|
||||
if any((c in chars) for c in name):
|
||||
name = '"'+name+'"'
|
||||
|
||||
while attempt < 5:
|
||||
|
||||
try:
|
||||
releaseResults = q.getReleases(ws.ReleaseFilter(query=name, limit=limit))
|
||||
break
|
||||
except WebServiceError, e:
|
||||
logger.warn('Attempt to query MusicBrainz for %s failed: %s' % (name, e))
|
||||
attempt += 1
|
||||
time.sleep(5)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
if not releaseResults:
|
||||
return False
|
||||
|
||||
for result in releaseResults:
|
||||
|
||||
releaselist.append({
|
||||
'uniquename': result.release.artist.name,
|
||||
'title': result.release.title,
|
||||
'id': u.extractUuid(result.release.artist.id),
|
||||
'albumid': u.extractUuid(result.release.id),
|
||||
'url': result.release.artist.id,
|
||||
'albumurl': result.release.id,
|
||||
'score': result.score
|
||||
})
|
||||
|
||||
return releaselist
|
||||
|
||||
def getArtist(artistid, extrasonly=False):
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ def correctMetadata(albumid, release, downloaded_track_list):
|
||||
cur_artist, cur_album, out_tuples, rec = autotag.tag_album(items, search_artist=release['ArtistName'], search_album=release['AlbumTitle'])
|
||||
|
||||
if rec == 'RECOMMEND_NONE':
|
||||
logger.warn('No accurate match found - not writing metadata')
|
||||
logger.warn('No accurate album match found for %s, %s - not writing metadata' % (release['ArtistName'], release['AlbumTitle']))
|
||||
return
|
||||
|
||||
distance, items, info = out_tuples[0]
|
||||
|
||||
@@ -115,7 +115,7 @@ def searchNZB(albumid=None, new=False):
|
||||
}
|
||||
|
||||
searchURL = "http://rss.nzbmatrix.com/rss.php?" + urllib.urlencode(params)
|
||||
logger.info(u"Parsing results from "+searchURL)
|
||||
logger.debug(u'Parsing results from <a href="%s">NZBMatrix</a>' % searchURL)
|
||||
try:
|
||||
data = urllib2.urlopen(searchURL, timeout=20).read()
|
||||
except urllib2.URLError, e:
|
||||
@@ -161,7 +161,7 @@ def searchNZB(albumid=None, new=False):
|
||||
|
||||
searchURL = headphones.NEWZNAB_HOST + '/api?' + urllib.urlencode(params)
|
||||
|
||||
logger.info(u"Parsing results from "+searchURL)
|
||||
logger.debug(u'Parsing results from <a href="%s">%s</a>' % (searchURL, headphones.NEWZNAB_HOST))
|
||||
|
||||
try:
|
||||
data = urllib2.urlopen(searchURL, timeout=20).read()
|
||||
@@ -215,7 +215,7 @@ def searchNZB(albumid=None, new=False):
|
||||
}
|
||||
|
||||
searchURL = 'https://secure.nzbs.org/rss.php?' + urllib.urlencode(params)
|
||||
logger.info(u"Parsing results from "+searchURL)
|
||||
logger.debug(u'Parsing results from <a href="%s">%s</a>' % (searchURL, provider))
|
||||
|
||||
try:
|
||||
data = urllib2.urlopen(searchURL, timeout=20).read()
|
||||
@@ -293,7 +293,7 @@ def searchNZB(albumid=None, new=False):
|
||||
searchURL = providerurl + "search/?%s" % urllib.urlencode(params)
|
||||
data = getNewzbinURL(searchURL)
|
||||
if data:
|
||||
logger.info(u"Parsing results from "+searchURL)
|
||||
logger.debug(u'Parsing results from <a href="%s">%s</a>' % (searchURL, providerurl))
|
||||
|
||||
try:
|
||||
d = minidom.parseString(data)
|
||||
@@ -440,7 +440,7 @@ def searchNZB(albumid=None, new=False):
|
||||
linkparams["nzbname"] = nzb_folder_name
|
||||
|
||||
saburl = 'http://' + headphones.SAB_HOST + '/sabnzbd/api?' + urllib.urlencode(linkparams)
|
||||
logger.info(u"Sending link to SABNZBD: " + saburl)
|
||||
logger.debug(u"Sending link to SABNZBD: " + saburl)
|
||||
|
||||
try:
|
||||
urllib.urlopen(saburl)
|
||||
|
||||
@@ -412,7 +412,7 @@ def displayAlbums(ArtistID, Type=None):
|
||||
else:
|
||||
newStatus = '%s' % (results[i][3])
|
||||
page.append('''<tr>
|
||||
<td align="left"><img src="http://ec1.images-amazon.com/images/P/%s.01.MZZZZZZZ.jpg" height="50" width="50"></td>
|
||||
<td align="left">
|
||||
<td align="left" width="240"><a href="albumPage?AlbumID=%s">%s</a>
|
||||
(<A class="external" href="http://musicbrainz.org/release-group/%s.html">link</a>)</td>
|
||||
<td align="center" width="160">%s</td>
|
||||
|
||||
@@ -15,10 +15,4 @@ def dbUpdate():
|
||||
artistid = artist[0]
|
||||
importer.addArtisttoDB(artistid)
|
||||
|
||||
logger.info('Update complete')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
logger.info('Update complete')
|
||||
@@ -1,417 +1,172 @@
|
||||
import os
|
||||
|
||||
import cherrypy
|
||||
|
||||
from mako.template import Template
|
||||
from mako.lookup import TemplateLookup
|
||||
from mako import exceptions
|
||||
|
||||
import time
|
||||
import threading
|
||||
|
||||
import headphones
|
||||
from headphones.mb import getReleaseGroup
|
||||
from headphones import templates, logger, searcher, db, importer, helpers, mb, lastfm
|
||||
|
||||
from headphones import logger, searcher, db, importer, mb, lastfm
|
||||
from headphones.helpers import checked, radio
|
||||
|
||||
|
||||
class WebInterface(object):
|
||||
|
||||
def serve_template(templatename, **kwargs):
|
||||
|
||||
template_dir = os.path.join(str(headphones.PROG_DIR), 'data/interfaces/default/')
|
||||
_hplookup = TemplateLookup(directories=[template_dir])
|
||||
|
||||
try:
|
||||
template = _hplookup.get_template(templatename)
|
||||
return template.render(**kwargs)
|
||||
except:
|
||||
return exceptions.html_error_template().render()
|
||||
|
||||
class WebInterface(object):
|
||||
|
||||
def index(self):
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
index.exposed=True
|
||||
|
||||
def home(self):
|
||||
page = [templates._header]
|
||||
if not headphones.CURRENT_VERSION:
|
||||
page.append('''<div class="updatebar">You're running an unknown version of Headphones. <a class="blue" href="update">Click here to update</a></div>''')
|
||||
elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win':
|
||||
page.append('''<div class="updatebar">A <a class="blue" href="http://github.com/rembo10/headphones/compare/%s...%s">
|
||||
newer version</a> is available. You're %s commits behind. <a class="blue" href="update">Click here to update</a></div>
|
||||
''' % (headphones.CURRENT_VERSION, headphones.LATEST_VERSION, headphones.COMMITS_BEHIND))
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
myDB = db.DBConnection()
|
||||
results = myDB.select('SELECT ArtistName, ArtistID, Status, LatestAlbum, ReleaseDate, AlbumID, TotalTracks, HaveTracks from artists order by ArtistSortName collate nocase')
|
||||
if len(results):
|
||||
page.append('''<div class="table"><table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<th align="left" width="170">Artist Name</th>
|
||||
<th align="center" width="100">Status</th>
|
||||
<th align="center" width="300">Upcoming Albums</th>
|
||||
<th align="center">Have</th>
|
||||
</tr>''')
|
||||
for artist in results:
|
||||
totaltracks = artist['TotalTracks']
|
||||
havetracks = artist['HaveTracks']
|
||||
if not havetracks:
|
||||
havetracks = 0
|
||||
try:
|
||||
percent = (havetracks*100.0)/totaltracks
|
||||
if percent > 100:
|
||||
percent = 100
|
||||
except (ZeroDivisionError, TypeError):
|
||||
percent = 0
|
||||
totaltracks = '?'
|
||||
|
||||
if artist['LatestAlbum']:
|
||||
if artist['ReleaseDate'] > helpers.today():
|
||||
newalbumName = '<a class="green" href="albumPage?AlbumID=%s"><i><b>%s</b></i>' % (artist['AlbumID'], artist['LatestAlbum'])
|
||||
releaseDate = '(%s)</a>' % artist['ReleaseDate']
|
||||
else:
|
||||
newalbumName = '<a class="gray" href="albumPage?AlbumID=%s"><i>%s</i>' % (artist['AlbumID'], artist['LatestAlbum'])
|
||||
releaseDate = ""
|
||||
else:
|
||||
newalbumName = '<font color="#CFCFCF">None</font>'
|
||||
releaseDate = ""
|
||||
|
||||
if artist['Status'] == 'Paused':
|
||||
newStatus = '''<font color="red"><b>%s</b></font>(<A class="external" href="resumeArtist?ArtistID=%s">resume</a>)''' % (artist['Status'], artist['ArtistID'])
|
||||
elif artist['Status'] == 'Loading':
|
||||
newStatus = '''<a class="gray">Loading...</a>'''
|
||||
else:
|
||||
newStatus = '''%s(<A class="external" href="pauseArtist?ArtistID=%s">pause</a>)''' % (artist['Status'], artist['ArtistID'])
|
||||
|
||||
page.append('''<tr><td align="left" width="300"><a href="artistPage?ArtistID=%s">%s</a>
|
||||
(<A class="external" href="http://musicbrainz.org/artist/%s">link</a>) [<A class="externalred" href="deleteArtist?ArtistID=%s">delete</a>]</td>
|
||||
<td align="center" width="160">%s</td>
|
||||
<td align="center">%s %s</td>
|
||||
<td><div class="progress-container"><div style="width: %s%%"><div class="smalltext3">%s/%s</div></div></div></td></tr>
|
||||
''' % (artist['ArtistID'], artist['ArtistName'], artist['ArtistID'],
|
||||
artist['ArtistID'], newStatus, newalbumName, releaseDate,
|
||||
percent, havetracks, totaltracks))
|
||||
|
||||
page.append('''</table></div>''')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
|
||||
else:
|
||||
have = myDB.select('SELECT ArtistName from have')
|
||||
if len(have):
|
||||
page.append("""<div class="datanil">Scanning...</div>""")
|
||||
else:
|
||||
page.append("""<div class="datanil">Add some artists to the database!</div>""")
|
||||
return page
|
||||
artists = myDB.select('SELECT * from artists order by ArtistSortName COLLATE NOCASE')
|
||||
return serve_template(templatename="index.html", title="Home", artists=artists)
|
||||
home.exposed = True
|
||||
|
||||
|
||||
def artistPage(self, ArtistID):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
myDB = db.DBConnection()
|
||||
|
||||
artist = myDB.select('SELECT ArtistName, IncludeExtras, Status from artists WHERE ArtistID=?', [ArtistID])
|
||||
while not artist:
|
||||
time.sleep(1)
|
||||
page.append('''<div class="table"><table><p align="center">%s</p>
|
||||
''' % artist[0][0])
|
||||
if artist[0][2] == 'Loading':
|
||||
page.append('<p align="center"><i>Loading...</i></p>')
|
||||
|
||||
if templates.displayAlbums(ArtistID, 'Album'):
|
||||
page.append(templates.displayAlbums(ArtistID, 'Album'))
|
||||
|
||||
releasetypes = ['Compilation', 'EP', 'Single', 'Live', 'Remix']
|
||||
|
||||
for type in releasetypes:
|
||||
if templates.displayAlbums(ArtistID, type):
|
||||
page.append(templates.displayAlbums(ArtistID, type))
|
||||
|
||||
page.append('</table>')
|
||||
|
||||
if not artist[0][1]:
|
||||
page.append('''<br /><div class="bluecenter"><a href="getExtras?ArtistID=%s">Get Extras for %s!</a></div>'''
|
||||
% (ArtistID, artist[0][0]))
|
||||
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
artist = myDB.action('SELECT * FROM artists WHERE ArtistID=?', [ArtistID]).fetchone()
|
||||
albums = myDB.select('SELECT * from albums WHERE ArtistID=? order by ReleaseDate DESC', [ArtistID])
|
||||
return serve_template(templatename="artist.html", title=artist['ArtistName'], artist=artist, albums=albums)
|
||||
artistPage.exposed = True
|
||||
|
||||
|
||||
def albumPage(self, AlbumID):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
myDB = db.DBConnection()
|
||||
|
||||
results = myDB.select('SELECT ArtistID, ArtistName, AlbumTitle, TrackTitle, TrackDuration, TrackID, AlbumASIN from tracks WHERE AlbumID=?', [AlbumID])
|
||||
|
||||
if results[0][6]:
|
||||
albumart = '''<br /><img src="http://ec1.images-amazon.com/images/P/%s.01.LZZZZZZZ.jpg" height="200" width="200"><br /><br />''' % results[0][6]
|
||||
else:
|
||||
albumart = ''
|
||||
i = 0
|
||||
page.append('''<div class="table" align="center"><table border="0" cellpadding="3">
|
||||
<tr><a href="artistPage?ArtistID=%s">%s</a> - %s<br />
|
||||
<a href="queueAlbum?AlbumID=%s&ArtistID=%s">Download<br />%s</tr>
|
||||
<br /><tr>
|
||||
<th align="left" width="100">Track #</th>
|
||||
<th align="left" width="300">Track Title</th>
|
||||
<th align="center" width="100">Duration</th>
|
||||
<th> </th>
|
||||
</tr>''' % (results[0][0], results[0][1], results[0][2], AlbumID, results[0][0], albumart))
|
||||
while i < len(results):
|
||||
trackmatches = myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle like ? AND TrackTitle like ?', [results[i][1], results[i][2], results[i][3]])
|
||||
|
||||
if len(trackmatches):
|
||||
have = '<img src="images/checkmark.png" width="20px">'
|
||||
else:
|
||||
have = ''
|
||||
if results[i][4]:
|
||||
duration = helpers.convert_milliseconds(int(results[i][4]))
|
||||
else:
|
||||
duration = 'n/a'
|
||||
page.append('''<tr><td align="left" width="120">%s</td>
|
||||
<td align="left" width="240">%s (<A class="external" href="http://musicbrainz.org/recording/%s.html">link</a>)</td>
|
||||
<td align="center">%s</td>
|
||||
<td>%s</td></tr>''' % (i+1, results[i][3], results[i][5], duration, have))
|
||||
i = i+1
|
||||
|
||||
page.append('''</table></div>''')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
|
||||
album = myDB.action('SELECT * from albums WHERE AlbumID=?', [AlbumID]).fetchone()
|
||||
tracks = myDB.select('SELECT * from tracks WHERE AlbumID=?', [AlbumID])
|
||||
description = myDB.action('SELECT * from descriptions WHERE ReleaseGroupID=?', [AlbumID]).fetchone()
|
||||
title = album['ArtistName'] + ' - ' + album['AlbumTitle']
|
||||
return serve_template(templatename="album.html", title=title, album=album, tracks=tracks, description=description)
|
||||
albumPage.exposed = True
|
||||
|
||||
|
||||
def findArtist(self, name):
|
||||
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
if len(name) == 0 or name == 'Add an artist':
|
||||
def search(self, name, type):
|
||||
if len(name) == 0:
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
if type == 'artist':
|
||||
searchresults = mb.findArtist(name, limit=20)
|
||||
else:
|
||||
artistResults = mb.findArtist(name, limit=10)
|
||||
if not artistResults:
|
||||
logger.info(u"No results found for " + name)
|
||||
page.append('''<div class="table"><p class="center">No results! <a class="blue" href="home">Go back</a></p></div>''')
|
||||
return page
|
||||
elif len(artistResults) > 1:
|
||||
page.append('''<div class="table"><p class="center">Search returned multiple artists. Click the artist you want to add:</p>''')
|
||||
for result in artistResults:
|
||||
page.append('''<p class="mediumtext"><a href="addArtist?artistid=%s">%s</a> (<a class="externalred" href="artistInfo?artistid=%s">more info</a>)</p>''' % (result['id'], result['uniquename'], result['id']))
|
||||
page.append('''</div>''')
|
||||
return page
|
||||
else:
|
||||
for result in artistResults:
|
||||
logger.info(u"Found one artist matching your search term: " + result['name'] +" ("+ result['id']+")")
|
||||
raise cherrypy.HTTPRedirect("addArtist?artistid=%s" % result['id'])
|
||||
|
||||
findArtist.exposed = True
|
||||
|
||||
def artistInfo(self, artistid):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
artist = mb.getArtist(artistid)
|
||||
if artist['artist_begindate']:
|
||||
begindate = artist['artist_begindate']
|
||||
else:
|
||||
begindate = ''
|
||||
if artist['artist_enddate']:
|
||||
enddate = artist['artist_enddate']
|
||||
else:
|
||||
enddate = ''
|
||||
page.append('''<div class="table"><p class="center">Artist Information:</p>''')
|
||||
page.append('''<p class="mediumtext">Artist Name: %s (%s)</br> ''' % (artist['artist_name'], artist['artist_type']))
|
||||
page.append('''<p class="mediumtext">Years Active: %s - %s <br /><br />''' % (begindate, enddate))
|
||||
page.append('''MusicBrainz Link: <a class="external" href="http://www.musicbrainz.org/artist/%s">http://www.musicbrainz.org/artist/%s</a></br></br><b>Albums:</b><br />''' % (artistid, artistid))
|
||||
for rg in artist['releasegroups']:
|
||||
page.append('''%s <br />''' % rg['title'])
|
||||
page.append('''<div class="center"><a href="addArtist?artistid=%s">Add this artist!</a></div>''' % artistid)
|
||||
return page
|
||||
|
||||
artistInfo.exposed = True
|
||||
searchresults = mb.findRelease(name, limit=20)
|
||||
return serve_template(templatename="searchresults.html", title='Search Results for: "' + name + '"', searchresults=searchresults, type=type)
|
||||
search.exposed = True
|
||||
|
||||
def addArtist(self, artistid):
|
||||
|
||||
threading.Thread(target=importer.addArtisttoDB, args=[artistid]).start()
|
||||
time.sleep(5)
|
||||
threading.Thread(target=lastfm.getSimilar).start()
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % artistid)
|
||||
|
||||
addArtist.exposed = True
|
||||
|
||||
def getExtras(self, ArtistID):
|
||||
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'ArtistID': ArtistID}
|
||||
newValueDict = {'IncludeExtras': 1}
|
||||
myDB.upsert("artists", newValueDict, controlValueDict)
|
||||
|
||||
threading.Thread(target=importer.addArtisttoDB, args=[ArtistID, True]).start()
|
||||
time.sleep(10)
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
|
||||
getExtras.exposed = True
|
||||
|
||||
def pauseArtist(self, ArtistID):
|
||||
|
||||
logger.info(u"Pausing artist: " + ArtistID)
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'ArtistID': ArtistID}
|
||||
newValueDict = {'Status': 'Paused'}
|
||||
myDB.upsert("artists", newValueDict, controlValueDict)
|
||||
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
pauseArtist.exposed = True
|
||||
|
||||
def resumeArtist(self, ArtistID):
|
||||
|
||||
logger.info(u"Resuming artist: " + ArtistID)
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'ArtistID': ArtistID}
|
||||
newValueDict = {'Status': 'Active'}
|
||||
myDB.upsert("artists", newValueDict, controlValueDict)
|
||||
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
resumeArtist.exposed = True
|
||||
|
||||
def deleteArtist(self, ArtistID):
|
||||
|
||||
logger.info(u"Deleting all traces of artist: " + ArtistID)
|
||||
myDB = db.DBConnection()
|
||||
myDB.action('DELETE from artists WHERE ArtistID=?', [ArtistID])
|
||||
myDB.action('DELETE from albums WHERE ArtistID=?', [ArtistID])
|
||||
myDB.action('DELETE from tracks WHERE ArtistID=?', [ArtistID])
|
||||
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
|
||||
deleteArtist.exposed = True
|
||||
|
||||
def queueAlbum(self, AlbumID, ArtistID, new=False):
|
||||
|
||||
def refreshArtist(self, ArtistID):
|
||||
importer.addArtisttoDB(ArtistID)
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
refreshArtist.exposed=True
|
||||
|
||||
def markAlbums(self, ArtistID=None, action=None, **args):
|
||||
myDB = db.DBConnection()
|
||||
if action == 'WantedNew':
|
||||
newaction = 'Wanted'
|
||||
else:
|
||||
newaction = action
|
||||
for mbid in args:
|
||||
controlValueDict = {'AlbumID': mbid}
|
||||
newValueDict = {'Status': newaction}
|
||||
myDB.upsert("albums", newValueDict, controlValueDict)
|
||||
if action == 'Wanted':
|
||||
searcher.searchNZB(mbid, new=False)
|
||||
if action == 'WantedNew':
|
||||
searcher.searchNZB(mbid, new=True)
|
||||
if ArtistID:
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
else:
|
||||
raise cherrypy.HTTPRedirect("upcoming")
|
||||
markAlbums.exposed = True
|
||||
|
||||
|
||||
def queueAlbum(self, AlbumID, ArtistID=None, new=False, redirect=None):
|
||||
logger.info(u"Marking album: " + AlbumID + "as wanted...")
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'AlbumID': AlbumID}
|
||||
newValueDict = {'Status': 'Wanted'}
|
||||
myDB.upsert("albums", newValueDict, controlValueDict)
|
||||
|
||||
import searcher
|
||||
searcher.searchNZB(AlbumID, new)
|
||||
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
|
||||
if ArtistID:
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
else:
|
||||
raise cherrypy.HTTPRedirect(redirect)
|
||||
queueAlbum.exposed = True
|
||||
|
||||
def unqueueAlbum(self, AlbumID, ArtistID):
|
||||
|
||||
logger.info(u"Marking album: " + AlbumID + "as skipped...")
|
||||
myDB = db.DBConnection()
|
||||
controlValueDict = {'AlbumID': AlbumID}
|
||||
newValueDict = {'Status': 'Skipped'}
|
||||
myDB.upsert("albums", newValueDict, controlValueDict)
|
||||
|
||||
raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)
|
||||
|
||||
unqueueAlbum.exposed = True
|
||||
|
||||
def upcoming(self):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
myDB = db.DBConnection()
|
||||
albums = myDB.select("SELECT AlbumTitle, ReleaseDate, DateAdded, AlbumASIN, AlbumID, ArtistName, ArtistID from albums WHERE ReleaseDate > date('now') order by ReleaseDate DESC")
|
||||
|
||||
wanted = myDB.select("SELECT AlbumTitle, ReleaseDate, DateAdded, AlbumASIN, AlbumID, ArtistName, ArtistID from albums WHERE Status='Wanted'")
|
||||
|
||||
page.append('''<div class="table"><table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<th align="center" width="300"></th>
|
||||
<th align="center" width="300"><div class="bigtext">Upcoming Albums<br /><br /></div></th>
|
||||
<th align="center" width="300"></th>
|
||||
<th> </th>
|
||||
</tr>''')
|
||||
if len(albums) == 0:
|
||||
page.append("""</table><div class="center">No albums are coming out soon :(<br />
|
||||
(try adding some more artists!)</div><table>""")
|
||||
|
||||
i = 0
|
||||
while i < len(albums):
|
||||
|
||||
if albums[i][3]:
|
||||
albumart = '''<br /><a href="http://www.amazon.com/dp/%s"><img src="http://ec1.images-amazon.com/images/P/%s.01.LZZZZZZZ.jpg" height="200" width="200"></a><br /><br />''' % (albums[i][3], albums[i][3])
|
||||
else:
|
||||
albumart = 'No Album Art... yet.'
|
||||
|
||||
page.append('''<tr><td align="center" width="300">%s</td>
|
||||
<td align="center" width="300"><a href="artistPage?ArtistID=%s">%s</a></td>
|
||||
<td align="center" width="300"><a href="albumPage?AlbumID=%s"><i>%s</i> (%s)</a></td></tr>
|
||||
''' % (albumart, albums[i][6], albums[i][5], albums[i][4], albums[i][0], albums[i][1]))
|
||||
i += 1
|
||||
page.append('''</table></div>''')
|
||||
if len(wanted):
|
||||
page.append('''<div class="table"><table border="0" cellpadding="3">
|
||||
<tr>
|
||||
<th align="center" width="300"></th>
|
||||
<th align="center" width="300"><div class="bigtext">Wanted Albums<br /><br /></div></th>
|
||||
<th align="center" width="300"></th>
|
||||
<th> </th>
|
||||
</tr>''')
|
||||
i = 0
|
||||
while i < len(wanted):
|
||||
|
||||
if wanted[i][3]:
|
||||
albumart = '''<br /><a href="http://www.amazon.com/dp/%s"><img src="http://ec1.images-amazon.com/images/P/%s.01.LZZZZZZZ.jpg" height="200" width="200"></a><br /><br />''' % (wanted[i][3], wanted[i][3])
|
||||
else:
|
||||
albumart = 'No Album Art... yet.'
|
||||
|
||||
page.append('''<tr><td align="center" width="300">%s</td>
|
||||
<td align="center" width="300"><a href="artistPage?ArtistID=%s">%s</a></td>
|
||||
<td align="center" width="300"><a href="albumPage?AlbumID=%s"><i>%s</i> (%s)</a></td></tr>
|
||||
''' % (albumart, wanted[i][6], wanted[i][5], wanted[i][4], wanted[i][0], wanted[i][1]))
|
||||
i += 1
|
||||
page.append('''</table></div>''')
|
||||
if len(albums):
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
|
||||
return page
|
||||
upcoming = myDB.select("SELECT * from albums WHERE ReleaseDate > date('now') order by ReleaseDate DESC")
|
||||
wanted = myDB.select("SELECT * from albums WHERE Status='Wanted'")
|
||||
return serve_template(templatename="upcoming.html", title="Upcoming", upcoming=upcoming, wanted=wanted)
|
||||
upcoming.exposed = True
|
||||
|
||||
def manage(self):
|
||||
if headphones.LASTFM_USERNAME:
|
||||
lastfm_user_text = headphones.LASTFM_USERNAME
|
||||
else:
|
||||
lastfm_user_text = 'Last.FM Username'
|
||||
if headphones.MUSIC_DIR:
|
||||
music_dir_input = '''<input type="text" value="%s" name="path" size="70" />''' % headphones.MUSIC_DIR
|
||||
else:
|
||||
music_dir_input = '''<input type="text" value="Enter a Music Directory to scan" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="path" size="70" />'''
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append('''
|
||||
<div class="table"><div class="config"><h1>Scan Music Library</h1><br />
|
||||
Where do you keep your music?<br /><br />
|
||||
You can put in any directory, and it will scan for audio files in that folder
|
||||
(including all subdirectories)<br /><br /> For example: '/Users/name/Music'
|
||||
<br /> <br />
|
||||
It may take a while depending on how many files you have. You can navigate away from the page<br />
|
||||
as soon as you click 'Submit'
|
||||
<br /><br />
|
||||
|
||||
<form action="musicScan" method="GET" align="center">
|
||||
%s
|
||||
<input type="submit" /></form><br /><br /></div></div>
|
||||
<div class="tableleft"><div class="config"><h1>Import Last.FM Artists</h1><br />
|
||||
Enter the username whose artists you want to import:<br /><br />
|
||||
<form action="importLastFM" method="GET" align="center">
|
||||
<input type="text" value="%s" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="username" size="18" />
|
||||
<input type="submit" /></form><br /><br /></div></div>
|
||||
<div class="tableright"><div class="config"><h1>Placeholder :-)</h1><br />
|
||||
<br /><br />
|
||||
<form action="" method="GET" align="center">
|
||||
<input type="text" value="" onfocus="if
|
||||
(this.value==this.defaultValue) this.value='';" name="" size="18" />
|
||||
<input type="submit" /></form><br /><br /></div></div><br />
|
||||
<div class="table"><div class="config"><h1>Force Search</h1><br />
|
||||
<a href="forceSearch">Force Check for Wanted Albums</a><br /><br />
|
||||
<a href="forceUpdate">Force Update Active Artists</a><br /><br />
|
||||
<a href="forcePostProcess">Force Post-Process Albums in Download Folder</a><br /><br /><br />
|
||||
<a href="checkGithub">Check for Headphones Updates</a><br /><br /><br /></div></div>''' % (music_dir_input, lastfm_user_text))
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
return serve_template(templatename="manage.html", title="Manage")
|
||||
manage.exposed = True
|
||||
|
||||
def importLastFM(self, username):
|
||||
@@ -469,120 +224,80 @@ class WebInterface(object):
|
||||
checkGithub.exposed = True
|
||||
|
||||
def history(self):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
myDB = db.DBConnection()
|
||||
snatched = myDB.select('''SELECT AlbumID, Title TEXT, Size INTEGER, URL TEXT, DateAdded TEXT, Status TEXT from snatched order by DateAdded DESC''')
|
||||
|
||||
page.append('''<div class="table"><table border="0" cellpadding="3">
|
||||
<tr><p align="center">History <a class="external" href="clearhistory">clear all</a><br /><br /></p></tr>
|
||||
<tr>
|
||||
<th align="center" width="150"></th>
|
||||
<th align="center" width="300"></th>
|
||||
<th align="center" width="200"></th>
|
||||
<th align="right" width="200"></th>
|
||||
</tr>''')
|
||||
if len(snatched) == 0:
|
||||
page.append("""</table><div class="center"></div><table>""")
|
||||
|
||||
i = 0
|
||||
while i < len(snatched):
|
||||
mb = snatched[i][2] / 1048576
|
||||
size = '%.2fM' % mb
|
||||
page.append('''<tr><td align="center" width="150">%s</td>
|
||||
<td align="center" width="300">%s</td>
|
||||
<td align="center" width="200">%s</td>
|
||||
<td align="center" width="200">%s</td>
|
||||
</tr>
|
||||
''' % (snatched[i][5], snatched[i][1], size, snatched[i][4]))
|
||||
i += 1
|
||||
page.append('''</table></div>''')
|
||||
if len(snatched):
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
history = myDB.select('''SELECT * from snatched order by DateAdded DESC''')
|
||||
return serve_template(templatename="history.html", title="History", history=history)
|
||||
return page
|
||||
history.exposed = True
|
||||
|
||||
def logs(self):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append('''<div class="table"><p class="logtext">''')
|
||||
log_file = os.path.join(headphones.LOG_DIR, 'headphones.log')
|
||||
if os.path.isfile(log_file):
|
||||
fileHandle = open(log_file)
|
||||
lineList = fileHandle.readlines()
|
||||
fileHandle.close()
|
||||
lineList.reverse()
|
||||
for line in lineList[1:200]:
|
||||
page.append(line.decode('utf-8') + '<br /><br />')
|
||||
page.append('''</p></div>''')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
|
||||
return serve_template(templatename="logs.html", title="Log", lineList=lineList[0:500])
|
||||
logs.exposed = True
|
||||
|
||||
def clearhistory(self):
|
||||
|
||||
logger.info(u"Clearing history")
|
||||
def clearhistory(self, type=None):
|
||||
myDB = db.DBConnection()
|
||||
myDB.action('''DELETE from snatched''')
|
||||
|
||||
if type == 'all':
|
||||
logger.info(u"Clearing all history")
|
||||
myDB.action('DELETE from snatched')
|
||||
else:
|
||||
logger.info(u"Clearing history where status is %s" % type)
|
||||
myDB.action('DELETE from snatched WHERE Status=?', [type])
|
||||
raise cherrypy.HTTPRedirect("history")
|
||||
clearhistory.exposed = True
|
||||
|
||||
def config(self):
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append(templates.configform % (
|
||||
headphones.HTTP_HOST,
|
||||
headphones.HTTP_USERNAME,
|
||||
headphones.HTTP_PORT,
|
||||
headphones.HTTP_PASSWORD,
|
||||
checked(headphones.LAUNCH_BROWSER),
|
||||
headphones.SAB_HOST,
|
||||
headphones.SAB_USERNAME,
|
||||
headphones.SAB_APIKEY,
|
||||
headphones.SAB_PASSWORD,
|
||||
headphones.SAB_CATEGORY,
|
||||
headphones.DOWNLOAD_DIR,
|
||||
checked(headphones.BLACKHOLE),
|
||||
headphones.BLACKHOLE_DIR,
|
||||
headphones.USENET_RETENTION,
|
||||
checked(headphones.NZBMATRIX),
|
||||
headphones.NZBMATRIX_USERNAME,
|
||||
headphones.NZBMATRIX_APIKEY,
|
||||
checked(headphones.NEWZNAB),
|
||||
headphones.NEWZNAB_HOST,
|
||||
headphones.NEWZNAB_APIKEY,
|
||||
checked(headphones.NZBSORG),
|
||||
headphones.NZBSORG_UID,
|
||||
headphones.NZBSORG_HASH,
|
||||
checked(headphones.NEWZBIN),
|
||||
headphones.NEWZBIN_UID,
|
||||
headphones.NEWZBIN_PASSWORD,
|
||||
radio(headphones.PREFERRED_QUALITY, 0),
|
||||
radio(headphones.PREFERRED_QUALITY, 1),
|
||||
radio(headphones.PREFERRED_QUALITY, 3),
|
||||
radio(headphones.PREFERRED_QUALITY, 2),
|
||||
headphones.PREFERRED_BITRATE,
|
||||
checked(headphones.DETECT_BITRATE),
|
||||
checked(headphones.MOVE_FILES),
|
||||
checked(headphones.RENAME_FILES),
|
||||
checked(headphones.CORRECT_METADATA),
|
||||
checked(headphones.CLEANUP_FILES),
|
||||
checked(headphones.ADD_ALBUM_ART),
|
||||
checked(headphones.EMBED_ALBUM_ART),
|
||||
headphones.DESTINATION_DIR,
|
||||
headphones.FOLDER_FORMAT,
|
||||
headphones.FILE_FORMAT,
|
||||
checked(headphones.INCLUDE_EXTRAS),
|
||||
headphones.LOG_DIR
|
||||
))
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
|
||||
config = {
|
||||
"http_host" : headphones.HTTP_HOST,
|
||||
"http_user" : headphones.HTTP_USERNAME,
|
||||
"http_port" : headphones.HTTP_PORT,
|
||||
"http_pass" : headphones.HTTP_PASSWORD,
|
||||
"launch_browser" : checked(headphones.LAUNCH_BROWSER),
|
||||
"sab_host" : headphones.SAB_HOST,
|
||||
"sab_user" : headphones.SAB_USERNAME,
|
||||
"sab_api" : headphones.SAB_APIKEY,
|
||||
"sab_pass" : headphones.SAB_PASSWORD,
|
||||
"sab_cat" : headphones.SAB_CATEGORY,
|
||||
"download_dir" : headphones.DOWNLOAD_DIR,
|
||||
"use_blackhole" : checked(headphones.BLACKHOLE),
|
||||
"blackhole_dir" : headphones.BLACKHOLE_DIR,
|
||||
"usenet_retention" : headphones.USENET_RETENTION,
|
||||
"use_nzbmatrix" : checked(headphones.NZBMATRIX),
|
||||
"nzbmatrix_user" : headphones.NZBMATRIX_USERNAME,
|
||||
"nzbmatrix_api" : headphones.NZBMATRIX_APIKEY,
|
||||
"use_newznab" : checked(headphones.NEWZNAB),
|
||||
"newznab_host" : headphones.NEWZNAB_HOST,
|
||||
"newznab_api" : headphones.NEWZNAB_APIKEY,
|
||||
"use_nzbsorg" : checked(headphones.NZBSORG),
|
||||
"nzbsorg_uid" : headphones.NZBSORG_UID,
|
||||
"nzbsorg_hash" : headphones.NZBSORG_HASH,
|
||||
"use_newzbin" : checked(headphones.NEWZBIN),
|
||||
"newzbin_uid" : headphones.NEWZBIN_UID,
|
||||
"newzbin_pass" : headphones.NEWZBIN_PASSWORD,
|
||||
"pref_qual_0" : radio(headphones.PREFERRED_QUALITY, 0),
|
||||
"pref_qual_1" : radio(headphones.PREFERRED_QUALITY, 1),
|
||||
"pref_qual_3" : radio(headphones.PREFERRED_QUALITY, 3),
|
||||
"pref_qual_2" : radio(headphones.PREFERRED_QUALITY, 2),
|
||||
"pref_bitrate" : headphones.PREFERRED_BITRATE,
|
||||
"detect_bitrate" : checked(headphones.DETECT_BITRATE),
|
||||
"move_files" : checked(headphones.MOVE_FILES),
|
||||
"rename_files" : checked(headphones.RENAME_FILES),
|
||||
"correct_metadata" : checked(headphones.CORRECT_METADATA),
|
||||
"cleanup_files" : checked(headphones.CLEANUP_FILES),
|
||||
"add_album_art" : checked(headphones.ADD_ALBUM_ART),
|
||||
"embed_album_art" : checked(headphones.EMBED_ALBUM_ART),
|
||||
"dest_dir" : headphones.DESTINATION_DIR,
|
||||
"folder_format" : headphones.FOLDER_FORMAT,
|
||||
"file_format" : headphones.FILE_FORMAT,
|
||||
"include_extras" : checked(headphones.INCLUDE_EXTRAS),
|
||||
"log_dir" : headphones.LOG_DIR
|
||||
}
|
||||
return serve_template(templatename="config.html", title="Settings", config=config)
|
||||
config.exposed = True
|
||||
|
||||
|
||||
@@ -642,11 +357,8 @@ class WebInterface(object):
|
||||
def shutdown(self):
|
||||
logger.info(u"Headphones is shutting down...")
|
||||
threading.Timer(2, headphones.shutdown).start()
|
||||
page = [templates._shutdownheader % 15]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append('<div class="table"><div class="configtable">Shutting down Headphones...</div></div>')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
message = 'Shutting Down...'
|
||||
return serve_template(templatename="shutdown.html", title="Shutting Down", message=message, timer=15)
|
||||
return page
|
||||
|
||||
shutdown.exposed = True
|
||||
@@ -654,23 +366,15 @@ class WebInterface(object):
|
||||
def restart(self):
|
||||
logger.info(u"Headphones is restarting...")
|
||||
threading.Timer(2, headphones.shutdown, [True]).start()
|
||||
page = [templates._shutdownheader % 30]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append('<div class="table"><div class="configtable">Restarting Headphones...</div></div>')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return page
|
||||
|
||||
message = 'Restarting...'
|
||||
return serve_template(templatename="shutdown.html", title="Restarting", message=message, timer=30)
|
||||
restart.exposed = True
|
||||
|
||||
def update(self):
|
||||
logger.info('Headphones is updating...')
|
||||
threading.Timer(2, headphones.shutdown, [True, True]).start()
|
||||
page = [templates._shutdownheader % 120]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
page.append('<div class="table"><div class="configtable">Updating Headphones...</div></div>')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
message = 'Updating...'
|
||||
return serve_template(templatename="shutdown.html", title="Updating", message=message, timer=120)
|
||||
return page
|
||||
|
||||
update.exposed = True
|
||||
@@ -678,23 +382,13 @@ class WebInterface(object):
|
||||
def extras(self):
|
||||
myDB = db.DBConnection()
|
||||
cloudlist = myDB.select('SELECT * from lastfmcloud')
|
||||
page = [templates._header]
|
||||
page.append(templates._logobar)
|
||||
page.append(templates._nav)
|
||||
if len(cloudlist):
|
||||
page.append('''
|
||||
<div class="table"><div class="config"><h1>Artists You Might Like:</h1><br /><br />
|
||||
<div class="cloud">
|
||||
<ul id="cloud">''')
|
||||
for item in cloudlist:
|
||||
page.append('<li><a href="addArtist?artistid=%s" class="tag%i">%s</a></li>' % (item['ArtistID'], item['Count'], item['ArtistName']))
|
||||
page.append('</ul><br /><br /></div></div>')
|
||||
page.append(templates._footer % headphones.CURRENT_VERSION)
|
||||
return serve_template(templatename="extras.html", title="Extras", cloudlist=cloudlist)
|
||||
return page
|
||||
extras.exposed = True
|
||||
|
||||
def addReleaseById(self, rid):
|
||||
threading.Thread(target=importer.addReleaseById, args=[rid]).start()
|
||||
time.sleep(5)
|
||||
raise cherrypy.HTTPRedirect("home")
|
||||
addReleaseById.exposed = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user