Merge remote-tracking branch 'Brinken/master' into develop

This commit is contained in:
rembo10
2012-08-31 14:59:02 +01:00
59 changed files with 2536 additions and 1611 deletions

View File

@@ -0,0 +1,104 @@
@font-face{
font-family: 'WebSymbolsRegular';
src: url('../fonts/websymbols-regular-webfont.eot');
src: url('../fonts/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/websymbols-regular-webfont.woff') format('woff'),
url('../fonts/websymbols-regular-webfont.ttf') format('truetype'),
url('../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
}
.wsr{font-family: 'WebSymbolsRegular';}
.wsr.Wanted:Before{content: "I";}
.wsr.Skipped:Before{content: "I";}
/*Icons for content management systems*/
.wsr.Image:Before{content: "I";}
.wsr.Settings:Before{content: "S";}
.wsr.Cloud:Before{content: "C";}
.wsr.Folder:Before{ content: "F";}
.wsr.Archive:Before{content: "Z";}
.wsr.Movie:Before{content: "M";}
.wsr.Code:Before{content: "H";}
.wsr.Text:Before{content: "T";}
.wsr.Terminal:Before{content: "_";}
.wsr.Attachment:Before{content: "A";}
.wsr.Logout:Before{ content: "X";}
.wsr.Text:Before{content: "T";}
.wsr.Indent:Before{ content: "n";}
.wsr.Outdent:Before{ content: "o"; }
.wsr.List:Before{ content: "p";}
.wsr.NumberList:Before{ content: "q"; }
.wsr.Move:Before { content: "~"; }
.wsr.User:Before { content: "U"; }
.wsr.OpenedLock:Before{ content: "w"; }
.wsr.ClosedLock:Before{ content: "x"; }
.wsr.PortraitView:Before{ content: "a"; }
.wsr.AlbumView:Before{ content: "b"; }
.wsr.Center:Before{ content: "`"; }
/*Gallery navigation icons*/
.wsr.ZoomIn:Before{ content: "+"; }
.wsr.ZoomOut:Before{ content: "-"; }
.wsr.Up:Before{ content: ":"; }
.wsr.Down:Before{ content: ";"; }
.wsr.Close:Before{ content: "×"; }
.wsr.Scale:Before{ content: "&"; }
.wsr.Back:Before{ content: "("; }
.wsr.Forward:Before{ content: ")"; }
.wsr.BackArrow:Before{ content: "<"; }
.wsr.ForwardArrow:Before{ content: ">"; }
.wsr.Rotate:Before{ content: "*"; }
.wsr.CloseX:Before{ content: "'"; }
/*Social networks*/
.wsr.Twitter:Before{ content: "'"; }
/*Icons for service sites*/
.wsr.Favorite:Before{ content: "R"; }
.wsr.Tag:Before{ content: ","; }
.wsr.Comment:Before{ content: "c"; }
.wsr.Chat:Before{ content: "d"; }
.wsr.OpenedChat:Before{ content: "e"; }
.wsr.Rating:Before{ content: "u"; }
.wsr.MapPin:Before{ content: "?"; }
.wsr.Like:Before{ content: "N"; }
.wsr.Unlike:Before{ content: "O"; }
.wsr.Search:Before{ content: "L"; }
.wsr.Reblog:Before{ content: "J"; }
.wsr.OpenNewWindow:Before{ content: "D"; }
.wsr.Clock:Before{ content: "P"; }
.wsr.Link:Before{ content: "K"; }
/*Other*/
.wsr.Mail:Before{ content: "@"; }
.wsr.SortUp:Before{ content: "{"; }
.wsr.SortDown:Before{ content: "}"; }
.wsr.Unfold:Before{ content: "["; }
.wsr.Icon:Before{ content: "¹"; }
.wsr.List:Before{ content: "²"; }
.wsr.ListWithIcons:Before{ content: "&sup3;"; }
.wsr.Reply:Before{ content: "h"; }
.wsr.ReplyAll:Before{ content: "i"; }
.wsr.Forward:Before{ content: "j"; }
.wsr.Fullscreen:Before{ content: "%"; }
.wsr.Done:Before{ content: "."; }
.wsr.Approved:Before{ content: "/"; }
.wsr.Alert:Before{ content: "W"; }
.wsr.Synchronize:Before{ content: "V"; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -6,7 +6,13 @@
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
</div>
</%def>
<%def name="body()">
<div id="nav-sub-container">
<ul id="nav-sub">
<li><a href="deleteAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}">Delete Album</a></li>
%if album['Status'] == 'Skipped':
<li><a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=False">Mark Album as Wanted</a></li>
@@ -18,10 +24,7 @@
<li><a href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True">Try New Version</a></li>
%endif
</ul>
</div>
</%def>
<%def name="body()">
</div>
<div class="table_wrapper">
<a id="btnBack" class="btnStatus" href="artistPage?ArtistID=${album['ArtistID']}">
Back to ${album['ArtistName']}
@@ -125,7 +128,7 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function() {
getAlbumInfo("${album['ArtistName']}","${album['AlbumTitle']}","#albumheader .albumArt",3);
@@ -155,4 +158,4 @@
}
});
</script>
</%def>
</%def>

View File

@@ -1,40 +1,71 @@
<%inherit file="base.html"/>
<%!
from headphones import db
import headphones
import string
%>
<%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>
<%def name="body()">
<script>
$(document).ready(function(){
$('#menu_link_getextra').click(function() {
$('#dialog').dialog();
return false;
});
$('#menu_link_modifyextra').click(function() {
$('#dialog').dialog();
});
});
</script>
<div id="dialog" title="Choose Which Extras to Fetch" style="display:none" class="configtable">
<form action="getExtras" method="get" class="ajax">
<input type="hidden" name="ArtistID" value="${artist['ArtistID']}">
<input type="hidden" name="newstyle" value="true">
%for extra in extras:
<input type="checkbox" id="${extra}" name="${extra}" value="1" ${extras[extra]} />${string.capwords(extra)}<br>
%endfor
<br>
<input id="submit" type="submit" value="Fetch Extras">
</form>
</div>
<div id="nav-sub-container">
<ul id="nav-sub">
<li><a class="refreshArtist" href="refreshArtist?ArtistID=${artist['ArtistID']}"><span class="wsr Synchronize"></span> Refresh</a></li>
<li><a href="deleteArtist?ArtistID=${artist['ArtistID']}"><span class="wsr Close"></span> Delete Artist</a></li>
%if artist['Status'] == 'Paused':
<li><a href="resumeArtist?ArtistID=${artist['ArtistID']}">Resume Artist</a></li>
<li><a href="resumeArtist?ArtistID=${artist['ArtistID']}" ><span class="wsr Clock"></span> Resume</a></li>
%else:
<li><a href="pauseArtist?ArtistID=${artist['ArtistID']}">Pause Artist</a></li>
<li><a href="pauseArtist?ArtistID=${artist['ArtistID']}"><span class="wsr Clock"></span> Pause</a></li>
%endif
%if artist['IncludeExtras']:
<li><a href="removeExtras?ArtistID=${artist['ArtistID']}">Remove Extras</a></li>
<li><a class="menu_link_edit" href="#">Modify Extras</a></li>
%else:
<li><a href="getExtras?ArtistID=${artist['ArtistID']}">Get Extras</a></li>
<li><a id="menu_link_getextra" href="#">Get Extras</a></li>
%endif
</ul>
</div>
</%def>
<%def name="body()">
<div id="paddingheader">
<h1>${artist['ArtistName']}</h1>
%if artist['Status'] == 'Loading':
<h3><span>W</span>Album information for this artist is currently being loaded</h3>
%endif
<ul id="switchViews">
<li class="active"><span class="web-symbol">&sup1;</span></li>
<ul id="nav-view">
<li><span class="wsr Icon"></span> Viewport</li>
</ul>
</div>
<form class="ajax" action="markAlbums" method="get">
<input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
<p class="indented">Mark selected albums as
<div class="artist-bio-container">
<div class="artist-art">
<img src="" alt="${artist['ArtistName']}" />
</div>
%if artist['Status'] == 'Loading':
<h1><span class="wsr Loading loader"></span> Loading albums informations...</h1>
%else:
<h1>${artist['ArtistName']}</h1>
%endif
<span class="artist-bio"></span>
</div>
<div class="clear"></div>
<p class="indented">Mark as:
<select class="styled" name="action">
<option value="Wanted">Wanted</option>
<option value="WantedNew">Wanted (new only)</option>
@@ -47,24 +78,27 @@
%for album in albums:
<%
%>
<div class="album-container">
<div class="album-image-container">
<input class="album-select" type="checkbox" name="${album['AlbumID']}" />
<img class="album-image" />
<div class="image-container">
<div class="image-box ${album['Status']}">
<div class="image-tag ${album['Status']}"></div>
<img />
<div class="image-actions">
%if album['Status'] == 'Skipped':
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Like"><span class="wsr Like"></span></a>
%elif album['Status'] == 'Wanted':
<a class="wsr" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unlike"><span class="wsr Unlike"></span></a>
%else:
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
<a class="wsr List" href="albumPage?AlbumID=${album['AlbumID']}" title="View"></a>
</div>
<input class="image-select" type="checkbox" name="${album['AlbumID']}" />
</div>
<div class="album-actions">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
<div class="album-info">
<b>${artist['ArtistName']}</b> <br />
<span>${album['AlbumTitle']}</span>
<div class="image-info">
<b style="display: none;">${artist['ArtistName']}</b>
<span><a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">${album['AlbumTitle']}</a></span>
</div>
</div>
%endfor
@@ -114,18 +148,18 @@
%>
<tr class="grade${grade}">
<td id="select"></td>
<td id="select"><input class="styled" type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
<td id="albumart">
<div class="album-art-small">
<a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">
<div class="status">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
<a class="wsr" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
</a>
@@ -159,29 +193,14 @@
<%def name="javascriptIncludes()">
<script>
function getAlbumInfoGrid() {
$(".album-container").each(function() {
$(this).fadeIn("slow", function(){
var element = $(this).find("img.album-image");
var artistname = $(this).find(".album-info b").text();
var albumname = $(this).find(".album-info span").text();
getAlbumInfo(artistname,albumname,element,2);
});
});
}
$(document).ready(function(){
//ListView
getAlbumInfoGrid();
//Load Art
getAlbumArt();
getArtistArt();
//GridView
$("#gridView").show();
$("#listView").hide();
enit();
$("#switchViews li").click(function(){
$("#gridView").toggle();
$("#listView").toggle();
var text = $(this).children("span").text() == '&sup1;' ? '&sup2;' : '&sup1;';
enit();
});
$('#album_table').dataTable({
"aoColumns": [
@@ -191,17 +210,53 @@
null,
null,
null,
null
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ artist per page",
"sLengthMenu":"Show _MENU_ albums per page",
"sEmptyTable": "No artist information available",
"sInfo":"Showing _TOTAL_ artist",
"sInfoEmpty":"No artist found",
"sInfoFiltered":"(Filtered from _MAX_ total artist)"},
"sInfo":"Showing _TOTAL_ albums",
"sInfoEmpty":"No album found",
"sInfoFiltered":"(Filtered from _MAX_ total albums)"},
"bPaginate": false,
"aaSorting": [[4, 'asc'],[3,'desc']]
});
$( "#nav-sub li a" ).click(function(){
});
%if artist['Status'] == 'Loading':
var noty_id = noty({
text:'<span class="wsr Loading loader"></span> Artist is refreshing!',
layout: 'bottomRight',
type:'information'
});
%elif artist['Status'] == 'Paused':
var noty_id = noty({
text:'<span class="wsr Alert"></span> Artist is paused!',
layout: 'bottomRight',
type:'information'
});
%endif
});
function getArtistArt() {
$(".artist-bio-container").each(function(){
var artistid = "${artist['ArtistId']}";
var artistname = $(this).find("img").attr("title");
var image = $(this).find("img");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtistInfo(artistname,image,3,artistid);
}
});
}
function getAlbumArt() {
$(".image-container").each(function() {
$(this).fadeIn("slow", function(){
var element = $(this).find("img");
var artistname = $(this).find(".image-info b").text();
var albumname = $(this).find(".image-info span").text();
getAlbumInfo(artistname,albumname,element,2);
});
});
}
</script>
</%def>

View File

@@ -1,190 +0,0 @@
<%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
%if artist['IncludeExtras']:
<li><a href="removeExtras?ArtistID=${artist['ArtistID']}">Remove Extras</a></li>
%else:
<li><a href="getExtras?ArtistID=${artist['ArtistID']}">Get Extras</a></li>
%endif
</ul>
</div>
</%def>
<%def name="body()">
<div id="paddingheader">
<h1>${artist['ArtistName']}</h1>
%if artist['Status'] == 'Loading':
<h3><span>W</span>Album information for this artist is currently being loaded</h3>
%endif
</div>
<form class="ajax" action="markAlbums" method="get">
<input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
<p class="indented">Mark selected albums as
<select class="styled" 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>
%for album in albums:
<%
%>
<div class="album-container">
<input type="checkbox" name="${album['AlbumID']}" />
<img class="image" />
<div class="album-actions">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
<div>
<b>${artist['ArtistName']}</b> <br />
${album['AlbumTitle']}
</div>
</div>
%endfor
<table class="display" id="album_table">
<thead>
<tr>
<th id="select"><input id="mainCheckbox" name="head" type="checkbox" onClick="toggle(this);headToggle();" /></th>
<th id="albumart"></th>
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</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 tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + 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 = '?'
avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if avgbitrate:
bitrate = str(int(avgbitrate)/1000) + ' kbps'
else:
bitrate = ''
%>
<tr class="grade${grade}">
<td id="select"></td>
<td id="albumart">
<div class="album-art-small">
<a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">
<div class="status">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
</a>
</div>
</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="have">
<div class="progress-container" title="You have ${havetracks} of a total ${totaltracks}">
<span title="${percent}">${percent}</span>
<div style="width:${percent}%">
</div>
</div>
</td>
<td id="bitrate">${bitrate}</td>
</tr>
%endfor
</tbody>
</table>
</form>
</%def>
<%def name="headIncludes()">
%if artist['Status'] == 'Loading':
<meta http-equiv="refresh" content="5">
%endif
</%def>
<%def name="javascriptIncludes()">
<script>
function getArtistArt() {
$(".album-container").each(function() {
var id = $(this).children("input").attr("name");
var artist = $("#paddingheader h1").text();
var image = $(this).children("img");
if ( !image.hasClass("done") ) {
getArtistInfo(artist,image,2,id);
image.addClass("done");
$(this).fadeIn();
}
});
}
$(document).ready(function(){
getArtistArt();
$('#album_table').dataTable({
"aoColumns": [
{ "bSortable": false},
{ "bSortable": false},
null,
null,
null,
null,
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ artist per page",
"sEmptyTable": "No artist information available",
"sInfo":"Showing _TOTAL_ artist",
"sInfoEmpty":"No artist found",
"sInfoFiltered":"(Filtered from _MAX_ total artist)"},
"bPaginate": false,
"aaSorting": [[4, 'asc'],[3,'desc']]
});
});
</script>
</%def>

View File

@@ -1,190 +0,0 @@
<%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
%if artist['IncludeExtras']:
<li><a href="removeExtras?ArtistID=${artist['ArtistID']}">Remove Extras</a></li>
%else:
<li><a href="getExtras?ArtistID=${artist['ArtistID']}">Get Extras</a></li>
%endif
</ul>
</div>
</%def>
<%def name="body()">
<div id="paddingheader">
<h1>${artist['ArtistName']}</h1>
%if artist['Status'] == 'Loading':
<h3><span>W</span>Album information for this artist is currently being loaded</h3>
%endif
</div>
<form class="ajax" action="markAlbums" method="get">
<input type="hidden" name="ArtistID" value=${artist['ArtistID']}>
<p class="indented">Mark selected albums as
<select class="styled" 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>
%for album in albums:
<%
%>
<div class="album-container">
<input type="checkbox" name="${album['AlbumID']}" />
<img class="image" />
<div class="album-actions">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
<div>
<b>${artist['ArtistName']}</b> <br />
${album['AlbumTitle']}
</div>
</div>
%endfor
<table class="display" id="album_table">
<thead>
<tr>
<th id="select"><input id="mainCheckbox" name="head" type="checkbox" onClick="toggle(this);headToggle();" /></th>
<th id="albumart"></th>
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</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 tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + 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 = '?'
avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if avgbitrate:
bitrate = str(int(avgbitrate)/1000) + ' kbps'
else:
bitrate = ''
%>
<tr class="grade${grade}">
<td id="select"></td>
<td id="albumart">
<div class="album-art-small">
<a href="albumPage?AlbumID=${album['AlbumID']}" title="${album['AlbumID']}">
<div class="status">
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Mark Wanted"><span>O</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark Wanted"><span>N</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try new"><span>J</span></a>
%endif
</div>
</a>
</div>
</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="have">
<div class="progress-container" title="You have ${havetracks} of a total ${totaltracks}">
<span title="${percent}">${percent}</span>
<div style="width:${percent}%">
</div>
</div>
</td>
<td id="bitrate">${bitrate}</td>
</tr>
%endfor
</tbody>
</table>
</form>
</%def>
<%def name="headIncludes()">
%if artist['Status'] == 'Loading':
<meta http-equiv="refresh" content="5">
%endif
</%def>
<%def name="javascriptIncludes()">
<script>
function getArtistArt() {
$(".album-container").each(function() {
var id = $(this).children("input").attr("name");
var artist = $("#paddingheader h1").text();
var image = $(this).children("img");
if ( !image.hasClass("done") ) {
getArtistInfo(artist,image,2,id);
image.addClass("done");
$(this).fadeIn();
}
});
}
$(document).ready(function(){
getArtistArt();
$('#album_table').dataTable({
"aoColumns": [
{ "bSortable": false},
{ "bSortable": false},
null,
null,
null,
null,
null
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ artist per page",
"sEmptyTable": "No artist information available",
"sInfo":"Showing _TOTAL_ artist",
"sInfoEmpty":"No artist found",
"sInfoFiltered":"(Filtered from _MAX_ total artist)"},
"bPaginate": false,
"aaSorting": [[4, 'asc'],[3,'desc']]
});
});
</script>
</%def>

View File

@@ -22,30 +22,30 @@
<link rel="apple-touch-icon" href="images/headphoneslogo.png">
<!--Main Stylesheet-->
<link rel="stylesheet" href="interfaces/brink/css/style.css">
<link rel="stylesheet" href="interfaces/brink/css/websymbol.css">
<!-- Theme style -->
<link rel="stylesheet" href="interfaces/brink/css/theme/default.css">
<!--Jquery APIs-->
<script src="js/libs/jquery-1.7.2.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="interfaces/brink/js/jquery-ui-1.8.21.custom.min.js"></script>
<link rel="stylesheet" href="interfaces/brink/css/jquery-ui-1.8.21.custom.css">
<script src="interfaces/brink/js/libs/jquery-1.8.0.min.js"></script>
<script src="interfaces/brink/js/libs/jquery-ui-1.8.23.custom.min.js"></script>
<link rel="stylesheet" href="interfaces/brink/css/libs/jquery-ui-1.8.23.custom.css">
<!--Ajax Form-->
<script src="interfaces/brink/js/libs/jquery.form.js"></script>
<!--Noty-->
<script type="text/javascript" src="interfaces/brink/js/libs/jquery.noty.js" ></script>
<link rel="stylesheet" href="interfaces/brink/css/libs/jquery.noty.css">
<link rel="stylesheet" href="interfaces/brink/css/libs/noty_theme_default.css">
<script type="text/javascript" src="interfaces/brink/js/noty/jquery.noty.js"></script>
<script type="text/javascript" src="interfaces/brink/js/noty/layouts/bottomRight.js"></script>
<!-- You can add more layouts if you want -->
<script type="text/javascript" src="interfaces/brink/js/noty/themes/brink.js"></script>
<!--Global Script-->
<script src="interfaces/brink/js/script.js"></script>
<!--Datatables-->
<script type="text/javascript" src="/js/libs/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="interfaces/brink/css/jquery.dataTables_themeroller.css">
<link rel="stylesheet" href="interfaces/brink/CSS/jquery.dataTables_themeroller.css">
${next.headIncludes()}
${next.javascriptIncludes()}
@@ -58,53 +58,50 @@
<script src="js/libs/modernizr-1.7.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
% if not headphones.CURRENT_VERSION:
<script type="text/javascript">
noty({
"text":"You're running an unknown version of Headphones.<br />It's recommended that you update now!",
"type":"success",
buttons: [
{type: 'button green', text: 'Update', click: function($noty) {
$(this).click(function(){
document.location.href='update';
});
$noty.close
noty({force: true, text: 'Headphones is now updating, please be patient', type: 'success'});
}
},
{type: 'button pink', text: 'Cancel', click: function($noty) {
$noty.close();
noty({force: true, text: 'You can update anytime from the tools menu', type: 'information'});
}
}
],
closable: false,
timeout: false
});
</script>
$("#commits-behind").fadeIn('slow').text("${headphones.COMMITS_BEHIND}");
% elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win':
<script>
noty({
"text":"A newer version is available."
+ "<br />You're ${headphones.COMMITS_BEHIND} commits behind"
+ "<a href='http://github.com/rembo10/headphones/compare/${headphones.CURRENT_VERSION}...${headphones.LATEST_VERSION}'>Version</a>"
+ "<a href='update'>Update</a>",
"type":"success"
});
$(document).ready(function(){
$("#commitsBehind").text("Update (${headphones.COMMITS_BEHIND})")
});
</script>
$("#commits-behind").fadeIn('slow').text("(${headphones.COMMITS_BEHIND})");
% else:
$("#commits-behind").hide()
% endif
<div class="custom_container"></div>
});
</script>
<table id="table_body">
<tr>
<td id="header" colspan="2">
<div id="logo">
<img src="/images/headphoneslogo.png" alt="headphones" />
</div>
<ul id="nav">
<li><a href="home" accesskey="1">
<span class="wsr User"></span> Artist
</a>
</li>
<li><a href="upcoming" accesskey="2">
<span class="wsr">N</span> Upcoming
</a>
</li>
<li><a href="extras" accesskey="3">
<span class="wsr">R</span> Suggestions
</a>
</li>
<li><a href="manage" accesskey="4">
<span class="wsr">_</span> Manage
</a>
</li>
<li><a href="history" accesskey="5">
<span class="wsr">Z</span> History
</a>
</li>
<li><a href="logs" accesskey="6">
<span class="wsr">a</span> Logs
</a>
</li>
<li><a href="config" accesskey="7">
<span class="wsr">S</span> Settings
</a>
</li>
</ul>
<div id="searchbar">
<form action="search" method="get">
<select name="type">
@@ -112,46 +109,13 @@
<option value="album">Album</option>
</select>
<input type="text" value="" name="name" accesskey="s" placeholder="Search..." />
<input class="web-symbol" type="submit" value="L"/>
<input class="wsr" type="submit" value="L" />
</form>
</div>
${next.headerIncludes()}
</td>
</tr>
<tr>
<td id="nav-container">
<ul id="nav">
<li><a href="home" accesskey="1">
<span>U</span>Home
</a>
</li>
<li><a href="upcoming" accesskey="2">
<span>N</span>Upcoming
</a>
</li>
<li><a href="extras" accesskey="3">
<span>R</span>Suggestions
</a>
</li>
<li><a href="manage" accesskey="4">
<span>_</span>Manage
</a>
</li>
<li><a href="history" accesskey="5">
<span>Z</span>History
</a>
</li>
<li><a href="logs" accesskey="6">
<span>a</span>Logs
</a>
</li>
<li><a href="config" accesskey="7">
<span>S</span>Settings
</a>
</li>
</ul>
<div></div>
</td>
<td id="content-container">
<div id="main" class="main">
${next.body()}
@@ -161,14 +125,16 @@
<tr id="footer" >
<td colspan="2">
<div class="btn left">
<a href="forceSearch"><span>I</span>Wanted Albums</a>
<a href="forceUpdate"><span>U</span>Active Artists</a>
<a href="forcePostProcess"><span>J</span>Post-Process</a>
<a href="checkGithub"><span>V</span>Update<label id="commits"></label></a>
<a href="forceSearch"><span class="wsr">I</span> Wanted Albums</a>
<a href="forceUpdate"><span class="wsr">U</span> Active Artists</a>
<a href="forcePostProcess"><span class="wsr">J</span> Post-Process</a>
<a href="checkGithub" onclick="javascript:return confirm('Do you wish to Update Headphones now?')"><span class="wsr">V</span> Update
<span id="commits-behind"></span>
</a>
</div>
<div class="btn right">
<a href="restart" onclick="javascript:return confirm('Restart HP?')"><span>J</span>Restart</a>
<a href="shutdown" onclick="javascript:return confirm('Shutdown HP?')"><span>X</span>Shut Down</a>
<a href="restart" onclick="javascript:return confirm('Do you wish to Restart Headphones?')"><span class="wsr">J</span> Restart</a>
<a href="shutdown" onclick="javascript:return confirm('Do you wish to Shutdown Headphones?')"><span class="wsr">X</span> Shut Down</a>
</div>
</td>
</tr>

View File

@@ -11,24 +11,38 @@
</%def>
<%def name="body()">
<form id="config" action="configUpdate" method="post">
<form id="config" class="ajax" action="configUpdate" method="post">
<div id="nav-sub-container" class="nav-sub-fixed">
<ul id="nav-sub">
<li><a href="#"><span class="wsr Code"></span> Settings Jump Menu</a>
<ul>
<li><a href="#WebInterface"><span class="wsr"></span> Web Interface</a></li>
<li><a href="#DownloadSettings"><span class="wsr"></span> Download Settings</a></li>
<li><a href="#Quality"><span class="wsr">I</span> Quality & Post Processing</a></li>
<li><a href="#AdvancedSettings"><span class="wsr"></span> Advanced Settings</a></li>
<li><a href="#Notifications"><span class="wsr"></span> Notifications</a></li>
</ul>
</li>
<li><a href="#" class="submitForm" ><span class="wsr Approved"></span> Save Changes</a></li>
</ul>
</div>
<div id="config_wrapper"><!--config_wrapper-->
<div id="WebInterface"><!--Web Interface-->
<h1><span>C</span>Web Interface</h1>
<h3><span>W</span>Web Interface changes require a restart to take effect</h3>
<h1><span class="wsr">C</span>Web Interface</h1>
<small><span class="wsr">W</span>Web Interface changes require a restart to take effect</small>
<div>
<table><!--HTTP-->
<tr>
<td>
<h2>HTTP</h2>
<h3>Basic settings for Headphones.</h3>
<br /><small>Basic settings for Headphones.</small>
</td>
<td></td>
</tr>
<tr>
<td>
<label for="http_host">Host:</label>
<h3>Localhost or 0.0.0.0</h3>
<br /><small>Localhost or 0.0.0.0</small>
</td>
<td>
<input type="text" name="http_host" value="${config['http_host']}" size="25" maxlength="40" />
@@ -37,7 +51,7 @@
<tr>
<td>
<label for="http_port">Port:</label>
<h3>Default is: 8181</h3>
<br /><small>Default is: 8181</small>
</td>
<td>
<input type="text" name="http_port" value="${config['http_port']}" size="10" maxlength="40" />
@@ -46,7 +60,7 @@
<tr>
<td>
<label for="http_username">Username:</label>
<h3>Enter a desired username at login, or leave blank for none.</p>
<br /><small>Enter a desired username at login, or leave blank for none.</p>
</td>
<td>
<input type="text" name="http_username" value="${config['http_user']}" size="30" maxlength="40" />
@@ -55,7 +69,7 @@
<tr>
<td>
<label for="http_password">Password:</label>
<h3>Enter a desired password at login, or leave blank for none.</h3>
<br /><small>Enter a desired password at login, or leave blank for none.</small>
</td>
<td>
<input type="password" name="http_password" value="${config['http_pass']}" size="30" maxlength="40" />
@@ -64,11 +78,10 @@
<tr>
<td>
<label for="launch_browser">Launch browser:</label><br />
<h3>Enabling this feature will open Headphones at startup.</h3>
<br /><small>Enabling this feature will open Headphones at startup.</small>
</td>
<td>
<input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} />
</td>
</tr>
<!--end Startup-->
@@ -76,7 +89,7 @@
<!--Layout/Theme-->
<tr>
<td><label for="interface">Interface:</label>
<h3>Choose from a verity of different themes</h3>
<br /><small>Choose from a verity of different themes</small>
</td>
<td>
<select name="interface">
@@ -98,12 +111,12 @@
<!--API-->
<tr>
<td><h2>API:</h2>
<h3><label for="api_enabled">Enabled/Disabled</label></h3></td>
<td><input class="switch" type="checkbox" name="api_enabled" id="api_enabled" value="1" ${config['api_enabled']} /></td>
<small><label for="api_switch">Enabled/Disabled</label></small></td>
<td><input class="switch" type="checkbox" name="api_switch" id="api_enabled" value="1" ${config['api_enabled']} /></td>
</tr>
<tr>
<tr id="api_switch">
<td>
<h3>Visit <a href="https://github.com/rembo10/headphones/tree/" target="_blank"><span>D</span>repo</a> for more information.</h3>
<small>Visit <a href="https://github.com/rembo10/headphones/tree/" target="_blank"><span>D</span>repo</a> for more information.</small>
</td>
<td>
<input type="text" name="api_key" value="${config['api_key']}" size="30"><input class="submit" type="button" value="Generate" id="generate_api">
@@ -113,14 +126,14 @@
<!--Interval-->
<tr>
<td><h2><span>P</span>Scan Intervals</h2></td>
<td><h2><span class="wsr">P</span>Scan Intervals</h2></td>
</tr>
<!--NZB Scan-->
<tr>
<td>
<label for="nzb_search_interval">NZB Search:</label>
<h3><label id="nzb_search_interval"></label></h3>
<label for="nzb_search_interval">NZB Search:</label><br />
<small><label id="nzb_search_interval"></label></small>
</td>
<td>
<div class="sliderInterval" for="nzb_search_interval"></div>
@@ -136,8 +149,8 @@
<!--Download Scan-->
<tr>
<td>
<label for="download_scan_interval">Download folder scan every: </label>
<h3><label id="download_scan_interval"></label></h3>
<label for="download_scan_interval">Download folder scan every: </label><br />
<small><label id="download_scan_interval"></label></small>
</td>
<td>
<div class="sliderInterval" for="download_scan_interval"></div>
@@ -150,8 +163,8 @@
<!--Library Scan-->
<tr>
<td><label for="library_scan_interval">Library scan:</label>
<h3><label id="libraryscan_interval"></label></h3>
<td><label for="library_scan_interval">Library scan:</label><br />
<small><label id="libraryscan_interval"></label></small>
</td>
<td>
<div class="sliderInterval" for="libraryscan_interval"></div>
@@ -167,9 +180,9 @@
<!--end Web Interface-->
<!--Download Settings-->
<div>
<h1><span>u</span>Download Settings</h1>
<h3>Setup SABnzbd or BitTorrent</h3>
<div id="DownloadSettings">
<h1><span class="wsr">u</span>Download Settings</h1>
<small>Setup SABnzbd or BitTorrent</small>
<!--Sabnzdb-->
<div>
@@ -177,25 +190,25 @@
<tr>
<td>
<h2>SABnzbd</h2>
<h3></h3>
<small></small>
</td>
<td></td>
</tr>
<tr>
<td><label for="sab_host">Host:</label>
<h3>Usually http://localhost:8080</h3>
<br /><small>Usually http://localhost:8080</small>
</td>
<td><input type="text" name="sab_host" value="${config['sab_host']}" size="30" maxlength="40" /></td>
</tr>
<tr>
<td><label for="sab_username">Username:</label>
<h3>Type the user name for SABnzbd</h3>
<br /><small>Type the user name for SABnzbd</small>
</td>
<td><input type="text" name="sab_username" value="${config['sab_user']}" size="20" maxlength="40" /></td>
</tr>
<tr>
<td><label for="sab_password">Password:</label>
<h3>Enter the password for SABnzbd</h3>
<br /><small>Enter the password for SABnzbd</small>
</td>
<td><input type="password" name="sab_password" value="${config['sab_pass']}" size="20" maxlength="40" /></td>
</tr>
@@ -205,14 +218,14 @@
</tr>
<tr>
<td><label for="sab_category">Category:</label>
<h3>Write the category label name from SABnzbd</h3>
<small>Write the category label name from SABnzbd</small>
</td>
<td><input type="text" name="sab_category" value="${config['sab_cat']}" size="20" maxlength="40" /></td>
</tr>
<tr>
<td>
<label for="download_dir">Download Directory:</label>
<h3>Full path to the directory where SAB downloads your music.</h3>
<br /><small>Full path to the directory where SAB downloads your music.</small>
</td>
<td><input type="text" name="download_dir" value="${config['download_dir']}" size="40" /></td>
</tr>
@@ -224,13 +237,13 @@
<div>
<table>
<tr>
<td><h2><span>~</span>Torrents</h2></td>
<td><h2><span class="wsr">~</span>Torrents</h2></td>
<td></td>
</tr>
<tr>
<td>
<label for="blackhole_dir">Black Hole Directory:</label>
<h3>Folder your Download program watches for NZBs</h3>
<br /><small>Folder your Download program watches for NZBs</small>
</td>
<td>
<input type="text" name="blackhole_dir" value="${config['blackhole_dir']}" size="40" />
@@ -238,14 +251,14 @@
</tr>
<tr>
<td><label for="usenet_retention">Usenet Retention:</label>
<h3>Binary retention time</h3>
<br /><small>Binary retention time</small>
</td>
<td><input type="text" name="usenet_retention" value="${config['usenet_retention']}" size="5" maxlength="10" /></td>
</tr>
<tr>
<td>
<label for="torrentblackhole_dir">Black Hole Directory:</label>
<h3>Folder your Download program watches for Torrents</h3>
<br /><small>Folder your Download program watches for Torrents</small>
</td>
<td>
<input type="text" name="torrentblackhole_dir" value="${config['torrentblackhole_dir']}" size="40">
@@ -253,14 +266,14 @@
</tr>
<tr>
<td><label for="numberofseeders">Minimum seeders:</label>
<h3>Number of minimum seeders a torrent must have to be accepted</h3>
<br /><small>Number of minimum seeders a torrent must have to be accepted</small>
</td>
<td><input type="text" name="numberofseeders" value="${config['numberofseeders']}" size="5" /></td>
</tr>
<tr>
<td>
<label for="download_torent_dir">Music Download Directory:</label>
<h3>Full path to the directory where your torrent client downloads your music <br />i.e. /Users/name/Downloads/music</h3>
<br /><small>Full path to the directory where your torrent client downloads your music <br />i.e. /Users/name/Downloads/music</small>
</td>
<td><input type="text" name="download_torrent_dir" value="${config['download_torrent_dir']}" size="40" /></td>
</tr>
@@ -272,18 +285,20 @@
<!--end Download Settings-->
<div><!--Search Providers-->
<h1><span>L</span>Search Providers</h1>
<h3>"We provide you with a automated search service to locate binary files/secgments that can be found on the public access network called Usenet."</h3>
<h2><span class="wsr">L</span> Search Providers</h2>
<small>"We provide you with a automated search service to locate binary files/secgments that can be found on the public access network called Usenet."</small>
<!--NZB Matrix-->
<table id="nzbmatrix">
<tr>
<td>
<h2><a href="http://www.nzbmatrix.com" target="_blank"><span>D</span>NZBMatrix</a></h2>
<h3><label for="nzbmatrix">Enabled/Disabled</label></h3>
<h2><a href="http://www.nzbmatrix.com" target="_blank"><span class="wsr">D</span>NZBMatrix</a></h2>
<br /><small><label for="nzbmatrix_switch">Enabled/Disabled</label></small>
</td>
<td><input class="switch" type="checkbox" name="nzbmatrix" value="1" ${config['use_nzbmatrix']} /></td>
<td><input class="switch" type="checkbox" name="nzbmatrix_switch" value="1" ${config['use_nzbmatrix']} /></td>
</tr>
</table>
<table id="nzbmatrix_switch">
<tr>
<td><label for="nzbmatrix_username">Username:</label></td>
<td><input type="text" name="nzbmatrix_username" value="${config['nzbmatrix_user']}" size="30" maxlength="40" /></td>
@@ -299,18 +314,54 @@
<table id="newznab" class="configtable">
<tr>
<td>
<h2><a href="http://www.newznab.com/" target="_blank"><span>D</span>Newznab</a></h2>
<h3><label for="newznab">Enabled/Disabled</label></h3>
<h2><a href="http://www.newznab.com/" target="_blank"><span class="wsr">D</span>Newznab</a></h2>
<br /><small><label for="newznab">Enabled/Disabled</label></small>
</td>
<td><input class="switch" type="checkbox" name="newznab" value="1" ${config['use_newznab']} /></td>
</tr>
<tr>
<td><label for="newznab_host">Host:</label></td>
<td><input type="text" name="newznab_host" value="${config['newznab_host']}" size="30" maxlength="40" /></td>
</tr>
<tr>
<td><label for="newznab_apikey">API:</label></td>
<td><input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="36" maxlength="40" /></td>
<div id="newznab">
<div class="config" id="newznab1">
<div class="row">
<label>Newznab Host</label>
<input type="text" name="newznab_host" value="${config['newznab_host']}" size="30">
<br /><small>e.g. http://nzb.su</small>
</div>
<div class="row">
<label>Newznab API</label>
<input type="text" name="newznab_apikey" value="${config['newznab_api']}" size="36">
</div>
<div class="row checkbox">
<input id="newznab_enabled" type="checkbox" name="newznab_enabled" onclick="initConfigCheckbox($(this));" value="1" ${config['newznab_enabled']} />
<label>Enabled</label>
</div>
</div>
<%
newznab_number = 1
%>
%for newznab in config['extra_newznabs']:
<div class="config" id="newznab${newznab_number}">
<div class="row">
<label>Newznab Host:</label>
<input type="text" name="newznab_host${newznab_number}" value="${newznab[0]}" size="30">
</div>
<div class="row">
<label>Newznab API:</label>
<input type="text" name="newznab_api${newznab_number}" value="${newznab[1]}" size="36">
</div>
<div class="row checkbox">
<input id="newznab_enabled" type="checkbox" name="newznab_enabled${newznab_number}" value="1" ${newznab_enabled} /><label>Enabled</label>
</div>
<div class="row">
<input type="button" class="remove" id="newznab${newznab_number}" value="Remove ${newznab[0]}">
</div>
</div>
<%
newznab_number += 1
%>
%endfor
<input type="button" value="Add Newznab" class="add_newznab" id="add_newznab" />
</div>
</tr>
</table>
<!--end Newznab-->
@@ -319,10 +370,10 @@
<table>
<tr>
<td>
<h2><a href="http://nzbs.org/" target="_blank"><span>D</span>Nzbs</a></h2>
<h3></h3>
<h2><a href="http://nzbs.org/" target="_blank"><span class="wsr">D</span>Nzbs</a></h2>
<small></small>
</td>
<td><input class="switch" type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} /><h3><label for="nzbsorg"></label></h3></td>
<td><input class="switch" type="checkbox" name="nzbsorg" value="1" ${config['use_nzbsorg']} /><small><label for="nzbsorg"></label></small></td>
</tr>
</table>
<table id="nzbsorg">
@@ -337,8 +388,8 @@
<table>
<tr>
<td>
<h2><a href="http://www.newsbin.com/" target="_blank"><span>D</span>Newzbin</a></h2>
<h3><label for="newzbin">Enabled/Disabled</label></h3>
<h2><a href="http://www.newsbin.com/" target="_blank"><span class="wsr">D</span>Newzbin</a></h2>
<small><label for="newzbin">Enabled/Disabled</label></small>
</td>
<td>
<input class="switch" type="checkbox" name="newzbin" value="1" ${config['use_newzbin']} />
@@ -362,7 +413,7 @@
<tr>
<td>
<h2>BitTorrent:</h2>
<h3>A peer-to-peer file sharing (P2P) communications protocol</h3>
<small>A peer-to-peer file sharing (P2P) communications protocol</small>
</td>
<td>
<input type="checkbox" name="use_isohunt" value="1" ${config['use_isohunt']} />
@@ -383,12 +434,12 @@
<!--Quality-->
<div id="Quality">
<h1><span>I</span>Quality & Post Processing</h1>
<h3></h3>
<h1><span class="wsr">I</span> Quality & Post Processing</h1>
<small></small>
<table id="AlbumQuality">
<tr>
<td><h2>Album Quality:</h2>
<h3></h3>
<small></small>
</td>
<td></td>
</tr>
@@ -419,7 +470,7 @@
<table class="configtable">
<tr>
<td><h2>Post Processing:</h2>
<h3></h3>
<small></small>
</td>
<td>
<input type="checkbox" name="move_files" value="1" ${config['move_files']} />
@@ -446,7 +497,7 @@
</tr>
<tr>
<td><label for="destination_dir">Music Folder:</label>
<h3>i.e. /Users/name/Music/iTunes or /Volumes/share/music</h3>
<small>i.e. /Users/name/Music/iTunes or /Volumes/share/music</small>
</td>
<td><input type="text" name="destination_dir" value="${config['dest_dir']}" size="40" /></td>
</tr>
@@ -454,22 +505,22 @@
</div><!--end Quality-->
<div id="AdvancedSettings"><!--AdvancedSettings-->
<h1><span>S</span>Advanced Settings</h1>
<h1><span class="wsr">S</span>Advanced Settings</h1>
<div><!--Renaming-->
<table class="configtable">
<tr>
<td><h2><span>T</span>Renaming</h2></td>
<td><h2><span class="wsr">T</span>Renaming</h2></td>
</tr>
<tr>
<td><label for="folder_format">Folder Format:</label>
<h3>Use: $Artist/$artist, $Album/$album, $Year/$year, $Type/$type (release type) and $First/$first (first letter in artist name) <br />
E.g.: $Type/$First/$artist/$album [$year] = Album/G/girl talk/all day [2010]</h3>
<small>Use: $Artist/$artist, $Album/$album, $Year/$year, $Type/$type (release type) and $First/$first (first letter in artist name) <br />
E.g.: $Type/$First/$artist/$album [$year] = Album/G/girl talk/all day [2010]</small>
</td>
<td><input type="text" name="folder_format" value="${config['folder_format']}" size="43" /></td>
</tr>
<tr>
<td><label for="file_format">File Format:</label>
<h3>Use: $Track/$track (track #), $Title/$title, $Artist/$artist, $Album/$album and $Year/$year</h3>
<small>Use: $Track/$track (track #), $Title/$title, $Artist/$artist, $Album/$album and $Year/$year</small>
</td>
<td><input type="text" name="file_format" value="${config['file_format']}" size="43" /></td>
</tr>
@@ -478,15 +529,15 @@
<div><!--Miscellaneous-->
<table id="Miscellaneous" class="configtable">
<tr>
<td><h2><span>F</span>Miscellaneous</h2>
<h3>Customize what HP</h3>
<td><h2><span class="wsr">F</span>Miscellaneous</h2>
<small>Customize what HP</small>
</td>
<td></td>
</tr>
<tr>
<td>
<h2>Automatically:</h2>
<h3>EPs, Compilations, Live Albums, Remix Albums and Singles</h3>
<small>EPs, Compilations, Live Albums, Remix Albums and Singles</small>
</td>
<td>
<input type="checkbox" name="include_extras" value="1" ${config['include_extras']} />
@@ -514,7 +565,7 @@
<!--Re-Encoding Options-->
<div id="Re-EncodingOptions">
<h2>Re-Encoding Options</h2>
<h3>Re-encode downloads during postprocessing.<br />This option requires the lame or ffmpeg encoder.</h3>
<small>Re-encode downloads during postprocessing.<br />This option requires the lame or ffmpeg encoder.</small>
<div><!--Encoder Options-->
<table id="encoderoptions">
<tr>
@@ -634,7 +685,7 @@
<tr>
<td>
<label>Advanced Encoding Options:</label>
<h3>Ignores audio properties</h3>
<small>Ignores audio properties</small>
</td>
<td><input type="text" name="advancedencoder" value="${config['advancedencoder']}" size="43" /></td>
</tr>
@@ -648,13 +699,13 @@
<!--Notifications-->
<div id="Notifications">
<h1><span>W</span>Notifications</h1>
<h3></h3>
<h1><span class="wsr">W</span> Notifications</h1>
<small></small>
<!--Prowl-->
<table>
<tr>
<td><h2>Prowl Options</h2>
<h3><label for="prowl_enabled">Enabled/Disabled</label></h3>
<small><label for="prowl_enabled">Enabled/Disabled</label></small>
</td>
<td><input class="switch" type="checkbox" name="prowl_enabled" id="prowl" value="1" ${config['prowl_enabled']} /></td>
</tr>
@@ -677,7 +728,7 @@
<table>
<tr>
<td><h2>XBMC</h2>
<h3><label for="xbmc_enabled">Enabled/Disabled</label></h3>
<small><label for="xbmc_enabled">Enabled/Disabled</label></small>
</td>
<td><input class="switch" type="checkbox" name="xbmc_enabled" id="xbmc" value="1" ${config['xbmc_enabled']} /></td>
</tr>
@@ -685,7 +736,7 @@
<table id="xbmcoptions">
<tr>
<td><label for="xbmc_host">XBMC Host:</label>
<h3>e.g. http://localhost:8080. Separate hosts with commas</h3>
<small>e.g. http://localhost:8080. Separate hosts with commas</small>
</td>
<td><input type="text" name="xbmc_host" value="${config['xbmc_host']}" size="30">
</td>
@@ -713,7 +764,7 @@
<tr>
<td>
<h2>Notify My Android</h2>
<h3><label for="nma_enabled">Enabled/Disabled</label></h3>
<small><label for="nma_enabled">Enabled/Disabled</label></small>
</td>
<td><input class="switch" type="checkbox" name="nma_enabled" id="nma" value="1" ${config['nma_enabled']} /></td>
</tr>
@@ -721,7 +772,7 @@
<table id="nmaoptions">
<tr>
<td><label for="nma_apikey">NotifyMyAndroid API Key:</label>
<h3>Separate multiple api keys with ",".</h3>
<small>Separate multiple api keys with ",".</small>
</td>
<td><input type="text" name="nma_apikey" value="${config['nma_apikey']}" size="30"></td>
</tr>
@@ -759,10 +810,13 @@
</tr><!--end Priority-->
</table><!--end NMA Options-->
</div><!--end Notifications-->
<div id="NAS">
<h2>Synology NAS</h2>
<input type="checkbox" name="synoindex_enabled" id="synoindex" value="1" ${config['synoindex_enabled']} /><label>Enable Synoindex</label>
</div>
<!--Mirror-->
<div id="Mirror">
<h2><span>K</span>Mirror</h2>
<h2><span class="wsr">K</span>Mirror</h2>
<!--Musicbrainz-->
<table>
<tr>
@@ -805,7 +859,7 @@
<table id="hpserver">
<tr>
<td><h2>Headphones Server</h2>
<h3><a href="http://headphones.codeshy.com/vip" target="_blank"><span>D</span>Get an Account</a></h3>
<small><a href="http://headphones.codeshy.com/vip" target="_blank"><span class="wsr">D</span>Get an Account</a></small>
</td>
<td></td>
</tr>
@@ -824,7 +878,6 @@
</div><!--End mirror-->
</div><!--end AdvancedSettings-->
<input type="submit" value="Save Changes" />
</div><!--end config wrapper-->
</form>
</%def>
@@ -832,89 +885,39 @@
<%def name="javascriptIncludes()">
<script>
$(document).ready(function(){
//nzbs.org
function nzbsorg(){
if( $('input[name="nzbsorg"]').is(":checked") ){
$("table#nzbsorg").show();
$(".submitForm").click(function(){
$("#config").submit();
});
//Newznab
function newznab(){
if( $('input[name="newznab"]').is(":checked") ){
$("table#newznab-group").show();
enit();
}
else {
$("table#nzbsorg").hide();
$("table#newznab-group").hide();
enit();
}
}
nzbsorg();
$('input[name="nzbsorg"]').change(function(){
nzbsorg();
var deletedNewznabs = 0;
$(".remove").click(function() {
$(this).parent().parent().remove();
deletedNewznabs = deletedNewznabs + 1;
});
//end nzbs.org
//Newzbin
function newzbin(){
if( $('input[name="newzbin"]').is(":checked") ){
$("table#newsbin").show();
enit();
}
else {
$("table#newsbin").hide();
enit();
}
}
newzbin();
$('input[name="newzbin"]').change(function(){
newzbin();
$("#add_newznab").click(function() {
var intId = $("#newznab_providers > div").size() + deletedNewznabs + 1;
var formfields = $("<div class=\"config\" id=\"newznab" + intId + "\"><div class=\"row\"><label>Newznab Host</label><input type=\"text\" name=\"newznab_host" + intId + "\" size=\"30\"></div><div class=\"row\"><label>Newznab API</label><input type=\"text\" name=\"newznab_api" + intId + "\" size=\"36\"></div><div class=\"row checkbox\"><input type=\"checkbox\" name=\"newznab_enabled" + intId + "\" value=\"1\" checked /><label>Enabled</label></div>");
var removeButton = $("<div class=\"row\"><input type=\"button\" class=\"remove\" value=\"Remove\" /></div>");
removeButton.click(function() {
$(this).parent().remove();
deletedNewznabs = deletedNewznabs + 1;
});
formfields.append(removeButton);
formfields.append("</div>");
$("#add_newznab").after(formfields);
});
//end Newzbin
//Prowl
function prowl(){
if( $('input[name="prowl_enabled"]').is(":checked") ){
$("table#prowloptions").show();
enit();
}
else {
$("table#prowloptions").hide();
enit();
}
}
prowl();
$('input[name="prowl_enabled"]').change(function(){
prowl();
});
//end Prowl
//XBMC
function xbmc(){
if( $('input[name="xbmc_enabled"]').is(":checked") ) {
$("table#xbmcoptions").show();
enit();
} else {
$("table#xbmcoptions").hide();
enit();
}
}
xbmc();
$('input[name="xbmc_enabled"]').change(function(){
xbmc();
});
//end XBMC
//NMA
function nma(){
if( $("#nma").is(":checked") ){
$("#nmaoptions").show();
enit();
} else {
$("#nmaoptions").hide();
enit();
}
}
$("#nma").change(function(){
nma();
});
//end NMA
//Mirrors

View File

@@ -1,5 +1,5 @@
/*!
* jQuery UI CSS Framework 1.8.21
* jQuery UI CSS Framework 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -39,7 +39,7 @@
/*!
* jQuery UI CSS Framework 1.8.21
* jQuery UI CSS Framework 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -47,27 +47,27 @@
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Century%20Gothic,Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1em&cornerRadius=0px&bgColorHeader=252c34&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=20&borderColorHeader=000000&fcHeader=0091ff&iconColorHeader=0091ff&bgColorContent=192126&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=363636&fcContent=ffffff&iconColorContent=ffffff&bgColorDefault=283943&bgTextureDefault=01_flat.png&bgImgOpacityDefault=1000&borderColorDefault=242424&fcDefault=a1a1a1&iconColorDefault=888888&bgColorHover=3c444b&bgTextureHover=01_flat.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=0091ff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=05_inset_soft.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget { font-family: Century Gothic,Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #222222; }
.ui-widget-content a { color: #222222; }
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
.ui-widget-header a { color: #222222; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Century Gothic,Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #363636; background: #192126 url(images/ui-bg_flat_100_192126_40x100.png) 50% 50% repeat-x; color: #ffffff; }
.ui-widget-content a { color: #ffffff; }
.ui-widget-header { border: 1px solid #000000; background: #252c34 url(images/ui-bg_highlight-soft_20_252c34_1x100.png) 50% 50% repeat-x; color: #0091ff; font-weight: bold; }
.ui-widget-header a { color: #0091ff; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #242424; background: #283943 url(images/ui-bg_flat_1000_283943_40x100.png) 50% 50% repeat-x; font-weight: normal; color: #a1a1a1; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #a1a1a1; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #3c444b url(images/ui-bg_flat_75_3c444b_40x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #0091ff url(images/ui-bg_flat_65_0091ff_40x100.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
.ui-widget :active { outline: none; }
@@ -86,11 +86,11 @@
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_0091ff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
@@ -277,15 +277,15 @@
----------------------------------*/
/* Corner radius */
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 0px; -webkit-border-top-left-radius: 0px; -khtml-border-top-left-radius: 0px; border-top-left-radius: 0px; }
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 0px; -webkit-border-top-right-radius: 0px; -khtml-border-top-right-radius: 0px; border-top-right-radius: 0px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; -khtml-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; -khtml-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
* jQuery UI Resizable 1.8.21
* jQuery UI Resizable 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -304,7 +304,7 @@
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*!
* jQuery UI Selectable 1.8.21
* jQuery UI Selectable 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -314,7 +314,7 @@
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*!
* jQuery UI Accordion 1.8.21
* jQuery UI Accordion 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -333,7 +333,7 @@
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*!
* jQuery UI Autocomplete 1.8.21
* jQuery UI Autocomplete 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -347,7 +347,7 @@
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.21
* jQuery UI Menu 1.8.23
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -386,7 +386,7 @@
margin: -1px;
}
/*!
* jQuery UI Button 1.8.21
* jQuery UI Button 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -424,7 +424,7 @@ input.ui-button { padding: .4em 1em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*!
* jQuery UI Dialog 1.8.21
* jQuery UI Dialog 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -445,7 +445,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*!
* jQuery UI Slider 1.8.21
* jQuery UI Slider 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -453,12 +453,12 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; background: rgb(0,65,145); border: 1px solid #000; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: .8em; height: .8em; cursor: default; border-radius: 3em; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; background: rgb(0,145,255); }
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .2em; }
.ui-slider-horizontal .ui-slider-handle { top: -.4em; margin-left: -.6em; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
@@ -468,7 +468,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*!
* jQuery UI Tabs 1.8.21
* jQuery UI Tabs 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -486,7 +486,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/*!
* jQuery UI Datepicker 1.8.21
* jQuery UI Datepicker 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -543,8 +543,6 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
@@ -553,7 +551,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*!
* jQuery UI Progressbar 1.8.21
* jQuery UI Progressbar 1.8.23
*
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.

View File

@@ -1,22 +1,11 @@
body {
margin: 0px;
padding: 0px;
font-family: Verdana, Tahoma, Arial, sans-serif;
font-family: "Century Gothic", Verdana, Tahoma, Arial, sans-serif;
overflow: hidden;
font-size: 100%;}
@font-face{
font-family: 'WebSymbolsRegular';
src: url('../fonts/websymbols-regular-webfont.eot');
src: url('../fonts/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/websymbols-regular-webfont.woff') format('woff'),
url('../fonts/websymbols-regular-webfont.ttf') format('truetype'),
url('../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
font-size: 100%;
}
.web-symbol{
font-family: 'WebSymbolsRegular';
}
/*
* Univarsal
* */
@@ -34,9 +23,6 @@ body {
* Links Styles
* */
a span{
font-family: 'WebSymbolsRegular';
}
a:link {
color: rgb(200,200,200);
text-decoration: none;
@@ -54,20 +40,9 @@ a:active {/*colour in NN4.xx is red*/
text-decoration: none;
}
.symbol-link a {
color: #fff;
float: right;
}
.symbol-link a span{
font-family: 'WebSymbolsRegular';
display: inline;
}
.symbol-link a p {
display: inline;
color: #fff;
}
#container { width: 100%; margin: auto; }
/*Text format*/
h1,h2,h3,h4,h5,h6{padding-left: 10px,}
h1
@@ -76,26 +51,14 @@ h1
text-decoration: none;
margin: 0;
line-height: 2em;
color: rgb(0,145,255);
}
h1 span,
h2 span,
h3 span{ font-family: 'WebSymbolsRegular'; padding-right: 10px; }
h2 { font-size: 1em; color: rgb(255,255,255); text-shadow: -1px -1px 0px rgb(10,10,10); margin-bottom: 0px; text-decoration: none; padding: 0px;}
h3 { font-size: .8em; font-weight: normal; color: rgb(140,140,140); }
h4 { padding: .6px; font-size: 0.8em; color: rgba(0,0,0,0.6); text-shadow: 1px 1px 0px rgba(255,255,255,0.1); text-decoration: none;}
p { color: rgb(160,160,160); text-shadow: 1px 1px 1px #000; margin-top: 8px; margin-bottom: 8px; }
#paddingheader { width: 100%; border-bottom: 2px solid rgb(0,145,255); background: #000; }
#switchViews { float: left; list-style-type: none; margin: 0; padding: 0; border: 1px solid rgba(255,255,255,0.1); }
#switchViews li{ border-right: 1px solid rgba(255,255,255,0.1); padding: 5px; margin: 0; line-height: 25px; cursor: pointer; display: inline-block;}
#switchViews:last-child{
border-right: 0;
}
#switchViews li:hover{
background: rgba(0,145,255,0.1);
}
small { color: rgb(160,160,160); }
/*#table_body*/
#table_body{
width: 100%;
@@ -143,129 +106,125 @@ div.custom_container /*Makes use of noty*/
{
width: 320px;
position: fixed;
bottom: 25px;
top: 25px;
right: 25px;
z-index: 999999;
}
/*Menu*/
#nav-container{
vertical-align: top;
width: 200px;
border-right: 1px solid rgba(0,0,0,0.1);
/*Commits*/
span#commits-behind {
position: relative;
}
span#commits-behind {
position: absolute;
background-color: red;
margin-top: -12px;
padding: 2px;
border: 1px solid white;
text-align: center;
border-radius: 4px;
}
/*Menu*/
ul#nav
{
list-style-type: none;
width: 200px;
padding: 0;
margin: 0;
float: left;
height: 100%;
width: 60%;
}
ul#nav li
{
display: block;
width: 100%;
float: left;
padding: 0;
margin: 0;
border-bottom: 1px solid rgba(0,0,0,0.2);
border-top: 1px solid rgba(255,255,255,0.2);
}
#nav li a{
color: #7597A8;
padding-left: 10px;
line-height: 2em;
display: block;
}
#nav li a span{
font-family: 'WebSymbolsRegular';
display: inline-block;
width: 30px;
line-height: 3em;
font-size: 1em;
text-align: center;
height: 100%;
}
#nav li a{
ul#nav li a:hover{
background-color: rgba(8,160,255,0.1);
color: rgba(0,145,255,0.8);
text-shadow: 1px 1px rgba(0,0,0,0.9);
}
ul#nav li:hover {
background: -moz-linear-gradient(top, rgba(80,80,80,0.5) 0%, rgba(40,40,40,0.5) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(80,80,80,0.5)), color-stop(100%,rgba(40,40,40,0.5))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(80,80,80,0.5) 0%,rgba(40,40,40,0.5) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(80,80,80,0.5) 0%,rgba(40,40,40,0.5) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(80,80,80,0.5) 0%,rgba(40,40,40,0.5) 100%); /* IE10+ */
background: linear-gradient(top, rgba(80,80,80,0.5) 0%,rgba(40,40,40,0.5) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80505050', endColorstr='#80282828',GradientType=0 ); /* IE6-9 */
ul#nav li a{
padding-left: 10px;
padding-right: 10px;
display: block;
color: rgba(0,0,0,0.9);
text-shadow: 1px 1px rgba(0,145,255,0.2);
}
#nav li.selected,
#nav li:hover.selected
{
background: rgb(62,80,89); /* Old browsers */
background: -moz-linear-gradient(top, rgba(62,80,89,1) 1%, rgba(53,70,76,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,rgba(62,80,89,1)), color-stop(100%,rgba(53,70,76,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(62,80,89,1) 1%,rgba(53,70,76,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(62,80,89,1) 1%,rgba(53,70,76,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(62,80,89,1) 1%,rgba(53,70,76,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(62,80,89,1) 1%,rgba(53,70,76,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3e5059', endColorstr='#35464c',GradientType=0 ); /* IE6-9 */
}
ul#nav li.selected span,
ul#nav li.selected a,
ul#nav li.selected a:hover{color: #ffffff;}
ul#nav li a:hover { color: #ffffff; }
/* *
* Sub navigation
*/
div#subhead_container
{
height: 40px;
float:left;
#nav-sub-container {
width: 100%;
border-bottom: 1px solid rgb(0,145,255);
background: #000;
height: 2.3em;
}
ul#subhead_menu
{
list-style: none;
padding: 0px;
margin: 0px;
}
ul#subhead_menu li
{
float: left;
#nav-sub-container li {
font-size: .8em;
text-align: center;
line-height: 2.8em;
border-right: 1px solid rgba(255,255,255,0.1);
border-left: 1px solid rgba(0,0,0,0.3);
display: inline;
text-align: center;
}
#nav-sub-container.nav-sub-fixed {
position: fixed;
top: 53px;
width: 22em;
border-right: 1px solid rgb(0,145,255);
border-radius: 0 0 10em 0;
}
ul#subhead_menu li:hover
{
background-image: linear-gradient(bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
border-right: 1px solid rgba(0,0,0,0.3);
border-left: 1px solid rgba(255,255,255,0.1);
ul#nav-sub { float: left; }
ul#nav-view { float:right; }
/*DropDown*/
ul#nav-sub li ul { display: none; list-style: none; padding: 0; margin: 0; box-shadow: 0px 5px 5px #000;}
ul#nav-sub li:hover ul { display: block; }
ul#nav-sub li ul li { background-color: rgba(0,0,0,.5); float: none; text-align: left;}
ul#nav-sub li ul li a{ display: block;
border-top:1px solid rgba(255,255,255,.1);
border-bottom:1px solid rgba(0,0,0,.1);
}
ul#nav-sub li ul li a:hover{ color: rgb(0,145,255); }
ul#nav-sub,
ul#nav-view {
list-style: none;
padding: 0px;
margin: 0px;
height: 100%;
}
ul#subhead_menu li a {
ul#nav-view li,
ul#nav-sub > li {
float: left;
border-right: 1px solid rgba(255,255,255,0.2);
}
ul#nav-view li,
ul#nav-sub li a {
display: block;
text-align: center;
padding: 0 10px 0 10px;
color: #7597A8;
font-size: 0.8em;
font-weight: bold;
text-decoration: none;
color: rgba(255,255,255,.3);
}
ul#subhead_menu li a:hover { color: rgb(255,255,255); font-weight: bold; }
/*
* end Sub navigation
* */
#content-container{
ul#nav-view > li:hover,
ul#nav-sub > li:hover > a {
color: rgb(0,145,255);
border-bottom: 2px solid rgb(0,145,255);
cursor: pointer;
}
ul#content-container{
overflow: hidden;
}
@@ -374,7 +333,7 @@ input[type="checkbox"]:checked:after{
.manage_wrapper { width: 88%; margin: 20px auto 0 auto; padding: 25px; min-height: 150px; clear: both; _height: 302px; zoom: 1; }
/*config*/
div#config_wrapper { margin: auto; width: 640px; margin-bottom: 100px; }
div#config_wrapper { margin: auto; width: 640px;}
div#config_wrapper div table { width: 100%; border-collapse:separate; border-spacing: 10px; }
div#config_wrapper div table tr td:first-child{ width: 240px; }
div#config_wrapper div table tr td{ vertical-align: middle; }
@@ -388,8 +347,6 @@ table#artist_table th#name { text-align: left; min-width: 150px; }
table#artist_table th#album { text-align: left; min-width: 100px; }
table#artist_table th#have { text-align: center; min-width: 50px; }
table#artist_table tr { border-top: 1px solid rgba(255,255,255,0.2);border-bottom: 1px solid rgba(0,0,0,0.2); }
table#artist_table td#select { vertical-align: middle; text-align: center; }
table#artist_table td#albumart { vertical-align: middle; text-align: left; }
table#artist_table td#name { vertical-align: middle; text-align: left; }
@@ -406,62 +363,114 @@ table#album_table th#status {vertical-align: middle; width: 175px; text-align: l
table#album_table th#type {vertical-align: middle; width: 175px; text-align: left; min-width: 60px; max-width: 100px; }
table#album_table th#bitrate {vertical-align: middle; text-align: left; min-width: 60px; }
/* Album tabledata */
table#album_table tr { border-top: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(0,0,0,0.2); }
table#album_table td#select { vertical-align: middle; text-align: left; }
table#album_table td#albumart { vertical-align: middle; text-align: left; }
/*Artist Bio*/
.artist-bio-container{
width: 100%;
height: 240px;
background-color: rgba(0,0,0,0.5);
position: relative;
}
.artist-bio-container .artist-art{
width: 240px;
max-height: 240px;
float: left;
margin: 10px;
box-shadow: 0 0 6px #000;
-moz-box-shadow: 0 0 6px #000;
-webkit-box-shadow: 0 0 6px #000;
-o-box-shadow: 0 0 6px #000;
overflow: hidden;
}
.artist-bio-container .artist-art img{
width: 100%;
}
.artist-bio-container .artist-bio{
float: left;
font-size: .8em;
display: block;
width: 35%;
}
.album-container {
/*Grid View Artist*/
.image-container {
position: relative;
display: none;
float: left;
width: 126px;
margin: 10px 10px 10px 10px;
}
.album-container .album-image-container{
height: 126px;
height: 126px;
position: relative;
.image-tag {
z-index: 2;
position: absolute;
top: 0px;
left: 10px;
width: .6em;
height: 1.2em;
border-radius: 0 0 2px 2px;
box-shadow: 1px 2px 2px #000;
display: none;
}
.album-container .album-image-container .album-image {
.image-tag.Wanted {
background-color: rgb(0,175,255);
display: block;
}
.image-tag.Downloaded {
background-color: #5DD345;
display: block;
}
.image-container .image-box{
height: 126px;
width: 126px;
position: relative;
box-shadow: 0 0 6px #000;
-moz-box-shadow: 0 0 6px #000;
-webkit-box-shadow: 0 0 6px #000;
overflow: hidden;
}
.image-container .image-box img {
width: 100%;
height: 100%;
min-height: 100%;
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
border: 0;
border: 0;
}
.album-container input {
box-shadow: 0 0 6px #000;
-moz-box-shadow: 0 0 6px #000;
-webkit-box-shadow: 0 0 6px #000;
.image-container input {
position: absolute;
top: 0px;
z-index: 2;
width: 100%;
height: 100%;
text-align: center;
text-align: right;
}
.album-container input:checked {
.image-container input:checked {
content: "";
background: rgba(0,0,0,0.1);
box-shadow: 0 0 10px rgb(0,145,255);
-moz-box-shadow: 0 0 10px rgb(0,145,255);
-webkit-box-shadow: 0 0 10px rgb(0,145,255);
}
.album-container .album-actions {
.image-container .image-actions {
display: none;
position: absolute;
bottom: 0;
left: 0;
z-index: 4;
width: 100%;
height: 30px;
font-size: 1.3em;
line-height: 26px;
height: 20%;
font-size: 1em;
line-height: 1.5em;
text-align: center;
background-color: rgba(0,0,0,0.8);
border-radius: 0em 0em 0.5em 0.5em;
-moz-border-radius: 0em 0em 0.5em 0.5em;
-webkit-border-radius: 0em 0em 0.5em 0.5em;
-o-border-radius: 0em 0em 0.5em 0.5em;
background-color: rgba(0,0,0,0.5);
}
.album-container .album-info{
.image-container:hover .image-actions{
display: block;
}
.image-container .image-info{
text-align: left;
font-size: 0.7em;
position: relative;
@@ -471,41 +480,44 @@ table#album_table td#albumart { vertical-align: middle; text-align: left; }
height: 40px;
text-shadow: 1px 1px 2px #000;
overflow: hidden;
border-bottom: 1px solid rgba(0,145,255,0.1);
border-bottom: 1px solid rgba(0,0,0,0.1);
}
/* Album art image sizes */
.album-art-small
.album-art-small
{
width: 60px;
height: 60px;
position: relative;
width: 61px;
height: 61px;
float: left;
overflow: visible;
border: 0;
background-color: rgba(0,0,0,0.1);
background-color: rgb(255,255,255);
position: relative;
background: url('images/no-cover.png');
text-align: center;
box-shadow: 0 0 3px #000;
-moz-box-shadow: 0 0 3px #000;
-webkit-box-shadow: 0 0 3px #000;
-o-box-shadow: 0 0 3px #000;
}
.album-art-small img { width: 100%; height: 100%; }
.album-art-small .album-actions {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
background-color: rgba(0,0,0,0.5);
}
.artist-status div{
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
position: absolute;
top: 0;
left: 0;
z-index: 2;
line-height: 3.8em;
text-align: center;
}
.album-art-small img { width: 100%; height: 100%; z-index: 200; border: 0; }
.status {
position: absolute;
top: 0px;
right: -2em;
width: 2em;
text-align: center;
height: 100%;
font-size: 1.2em;
background-color: rgba(0,0,0,0.8);
text-align: center;
z-index: 99;
line-height: 1.5em;
color: #fff;
transition: height 0.2s;
-moz-transition: height 0.2s; /* Firefox 4 */
-webkit-transition: height 0.2s; /* Safari and Chrome */
-o-transition: height 0.2s; /* Opera */
vertical-align: middle;
}
div.status:hover { }
.album-art-big
{
@@ -561,10 +573,11 @@ table#track_table td#name { vertical-align: middle; text-align: left; font-size:
table#track_table td#duration { vertical-align: middle; text-align: left; font-size: 12px; overflow: hidden; }
table#track_table td#location { vertical-align: middle; text-align: left; font-size: 12px; overflow: hidden; }
table#track_table td#bitrate { vertical-align: middle; text-align: left; font-size: 12px; overflow: hidden; }
table#history_table { width: 100%; font-size: 12px; }
/* History table*/
table#history_table { width: 100%; font-size: 12px; }
table#history_table td#dateadded { vertical-align: middle; text-align: left; min-width: 150px; font-size: 14px; }
table#history_table td#filename { vertical-align: middle; text-align: left; min-width: 100px; font-size: 15px; }
table#history_table td#size { vertical-align: middle; text-align: left; min-width: 75px; font-size: 14px; }
@@ -575,8 +588,6 @@ table#history_table td#action { vertical-align: middle; text-align: left; font-s
Log
*/
table#log_table { width: 100%; }
table#log_table td { padding: 3px 5px 3px 10px; }
table#log_table th#timestamp { text-align: left; min-width: 150px; }
table#log_table th#level { text-align: left; min-width: 60px; }
table#log_table th#message { text-align: left; min-width: 500px; }

View File

@@ -11,10 +11,6 @@ body{
background: #192126;
color: #fff;
}
#nav-container{
background: #222D33;
}
#header
{
background: rgb(57,69,81); /* Old browsers */
@@ -26,17 +22,6 @@ background: -ms-linear-gradient(top, rgba(57,69,81,1) 0%,rgba(36,43,51,1) 100%);
background: linear-gradient(top, rgba(57,69,81,1) 0%,rgba(36,43,51,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#394551', endColorstr='#242b33',GradientType=0 ); /* IE6-9 */
}
#nav li
{
background: rgb(45,54,63); /* Old browsers */
background: -moz-linear-gradient(top, rgba(45,54,63,1) 0%, rgba(36,43,51,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(45,54,63,1)), color-stop(100%,rgba(36,43,51,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(45,54,63,1) 0%,rgba(36,43,51,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(45,54,63,1) 0%,rgba(36,43,51,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(45,54,63,1) 0%,rgba(36,43,51,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(45,54,63,1) 0%,rgba(36,43,51,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d363f', endColorstr='#242b33',GradientType=0 ); /* IE6-9 */
}
#footer{
background: rgb(45,54,63); /* Old browsers */
background: -moz-linear-gradient(top, rgba(45,54,63,1) 0%, rgba(36,43,51,1) 100%); /* FF3.6+ */
@@ -48,31 +33,17 @@ background: linear-gradient(top, rgba(45,54,63,1) 0%,rgba(36,43,51,1) 100%); /*
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d363f', endColorstr='#242b33',GradientType=0 ); /* IE6-9 */
border-top: 1px solid rgb(100,122,132);
}
#nav li:hover{
background: rgb(55,65,76); /* Old browsers */
background: -moz-linear-gradient(top, rgba(55,65,76,1) 0%, rgba(45,53,63,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(55,65,76,1)), color-stop(100%,rgba(45,53,63,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(55,65,76,1) 0%,rgba(45,53,63,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(55,65,76,1) 0%,rgba(45,53,63,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(55,65,76,1) 0%,rgba(45,53,63,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(55,65,76,1) 0%,rgba(45,53,63,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#37414c', endColorstr='#2d353f',GradientType=0 ); /* IE6-9 */
}
#subhead_container{
}
/*Tooltip popup Color*/
.tooltip span
{
background-image: linear-gradient(bottom, rgb(219,219,140) 0%, rgb(240,240,178) 100%);
background-image: -o-linear-gradient(bottom, rgb(219,219,140) 0%, rgb(240,240,178) 100%);
background-image: -moz-linear-gradient(bottom, rgb(219,219,140) 0%, rgb(240,240,178) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(219,219,140) 0%, rgb(240,240,178) 100%);
background-image: -ms-linear-gradient(bottom, rgb(219,219,140) 0%, rgb(240,240,178) 100%);
/*Font Color*/
color: #000;
}
/*Tablehead color*/
table.display {
border-collapse: collapse;
}
table.display tbody tr td{
background: #192126; /* Old browsers */
background: rgba(0,0,0,.1); /* Old browsers */
border-bottom: 1px solid rgba(0,0,0,.1);
border-top: 1px solid rgba(0,0,0,.1);
padding: 5px 10px 5px 10px;
}
table.display thead tr th
{
background: rgb(53,68,76); /* Old browsers */
@@ -83,6 +54,16 @@ table.display thead tr th
background: -ms-linear-gradient(top, rgba(53,68,76,1) 0%,rgba(44,57,63,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(53,68,76,1) 0%,rgba(44,57,63,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35444c', endColorstr='#2c393f',GradientType=0 ); /* IE6-9 */
border-top: 1px solid rgba(255,255,255,0.2);
border-bottom: 1px solid rgba(0,0,0,0.2);
border-collapse: collapse;
padding: .4em;
font-size: .8em;
color: rgba(0,0,0,0.9);
text-shadow: 1px 1px rgba(255,255,255,0.1);
-moz-text-shadow: 1px 1px rgba(0,145,255,0.1);
border-right: 1px solid rgba(0,0,0,.1);
border-left: 1px solid rgba(255,255,255,.1);
}
/*

View File

@@ -3,18 +3,15 @@
from headphones import helpers
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<%def name="body()">
<div id="nav-sub-container">
<ul id="nav-sub">
<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>
<table class="display" id="history_table">
<thead>
<tr>
@@ -60,7 +57,7 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
@@ -80,4 +77,4 @@
});
});
</script>
</%def>
</%def>

View File

@@ -4,6 +4,44 @@
%>
<%def name="body()">
<div id="nav-sub-container">
<ul id="nav-view">
<li><span class="wsr Icon"></span> Viewport</li>
</ul>
</div>
<div id="gridView">
%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 = '?'
%>
<div class="image-container">
<div class="image-box">
<img />
<div class="image-actions">
%if artist['Status'] == 'Loading':
<span class="wsr Loading loader"></span>
%else:
${havetracks}/${totaltracks}
%endif
</div>
</div>
<div class="image-info">
<b title="${artist['ArtistID']}"><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></b>
</div>
</div>
%endfor
</div>
<div id="listView">
<table class="display" id="artist_table">
<thead>
<tr>
@@ -48,33 +86,34 @@
grade = 'X'
%>
<tr class="grade${grade}">
<td id="albumart">
<div class="album-art-small">
<div class="status ${artist['Status']}">
<div>
%if artist['Status'] == 'Active':
<span class="web-symbol">/</span>
%else:
<span class="web-symbol loader"></span>
%endif
<tr class="grade${grade}">
<td id="albumart">
<div class="album-art-small">
<img />
<div class="album-actions">
%if artist['Status'] == 'Loading':
<div>
<span class="wsr Loading loader"></span>
</div>
%endif
</div>
</div>
<img />
</div>
</td>
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></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" title="You have ${havetracks} of ${totaltracks} total.">
<span class="havetracks">${havetracks}/${totaltracks}</span>
<div style="width:${percent}%"></div>
</div>
</td>
</tr>
</td>
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></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" title="You have ${havetracks} of ${totaltracks} total.">
<span class="havetracks">${havetracks}/${totaltracks}</span>
<div style="width:${percent}%"></div>
</div>
</td>
</tr>
%endfor
</tbody>
</table>
</div>
</%def>
<%def name="headIncludes()">
@@ -85,7 +124,12 @@
<script type="text/javascript" src="js/libs/jquery.dataTables.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//GridView
$("#gridView").show();
$("#listView").hide();
enit();
getArtistArt();
$('#artist_table').dataTable(
{
"aaSorting": [
@@ -94,15 +138,25 @@
"bFilter": true
});
});
function getArtistArt() {
$(".image-container").each(function() {
$(this).fadeIn('fast', function(){
var image = $(this).find("img");
var artist = $(this).find(".image-info b").text();
var id = $(this).find(".image-info b").attr('title');
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtistInfo(artist,image,2,id);
}
});
});
$("table#artist_table tr td#name").each(function(){
var id = $(this).children('a').attr('title');
var artist = $(this).children('a').text();
var id = $(this).children("a").attr("title");
var artist = $(this).children("a").text();
var image = $(this).parent().find("td#albumart img");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtistInfo(artist,image,1,id);
getArtistInfo(artist,image,2,id);
}
});
}

View File

@@ -1,30 +0,0 @@
$(document).ready(function() {
$("img.getImgLink").each(function(){
var artistId = $(this).attr('for');
var image = $(this).attr('src');
alert(artistId);
$.ajax({
url: "getImageLinks?ArtistID=" + artistId,
success: function(data){
var artistImg = data;
$(image).attr("src",artistImg);
}
});
});
});
$("img.getThumb").each(function(){
var artistId = $(this).attr('for');
var image = $(this).attr('src');
alert(artistId);
$.ajax({
url: "getImageLinks?ArtistID=" + artistId,
success: function(data){
var artistImg = data;
$(image).attr("src",artistImg);
}
});
});
});
})

View File

@@ -4,9 +4,36 @@ $(document).ready(function() {
$('.ajax').ajaxForm({
success: function() {
var noty_id = noty({
"text":"Settings has been saved successfully!",
"type":"success"
text:'<span class="wsr Approved"></span> Settings Saved!',
layout: 'bottomRight',
type:'success'
});
/*
var noty_id = noty({
text:'<span class="wsr Alert"></span>Carefull!',
layout: 'bottomRight',
type:'warning'
});
var noty_id = noty({
text:'<span class="wsr Alert"></span> Something went wrong!',
layout: 'bottomRight',
type:'error'
});
var noty_id = noty({
text:'<span class="wsr"></span> Settings has been saved successfully!',
layout: 'bottomRight',
type:'information'
});
var noty_id = noty({
text:'<span class="wsr Approved"></span> Settings has been saved successfully!',
layout: 'bottomRight',
type:'success'
});
var noty_id = noty({
text:'<span class="wsr Chat"></span> Settings has been saved successfully!',
layout: 'bottomRight',
});
*/
}
});
});
@@ -15,21 +42,30 @@ $(document).ready(function() {
$(document).ready(function(){
$( '.switch' ).each(function(){
//set Label name to current active state
var labelName = 'label[for="' + $(this).attr("name") + '"]';
var labelName = 'label[for="' + $( this ).attr( "name" ) + '"]';
var switchId = $( this ).attr( "name" );
if ( $( this ).is(':checked') ){
$( labelName ).text( 'Enabled' );
$("#" + switchId ).show();
enit();
}
else {
$( labelName ).text( 'Disabled' );
$("#" + switchId ).hide();
enit();
}
//Change label
$( this ).change(function(){
if ( $( this ).is( ':checked' ) ){
$( labelName ).text( 'Enabled' );
$("#" + switchId ).show();
enit();
}
else{
$( labelName ).text( 'Disabled' );
$("#" + switchId ).hide();
enit();
}
});
});
@@ -135,114 +171,4 @@ handleNewSelection = function () {
$("#hpserveroptions").show("fast");
break;
}
};
$( 'input[type="checkbox"]' ).change(function()
{
if ($("#api_enabled").is(":checked"))
{
$("#apioptions").show();
}
else
{
$("#apioptions").hide();
}
$("#api_enabled").is(":checked", function(){
$("#apioptions").show();
});
$("#api_key").click(function(){ $("#api_key").select() });
$("#generate_api").click(function(){
$.get('generateAPI',
function(data){
if (data.error != undefined) {
alert(data.error);
return;
}
$('#api_key').val(data);
});
});
if ($("#encode").is(":checked"))
{
$("#encoderoptions").show();
}
else
{
$("#encoderoptions").hide();
}
$("#encode").click(function(){
if ($("#encode").is(":checked"))
{
$("#encoderoptions").show("fast");
}
else
{
$("#encoderoptions").hide("fast");
}
});
if ($("#prowl").is(":checked"))
{
$("#prowloptions").show();
}
else
{
$("#prowloptions").hide();
}
$("#prowl").click(function(){
if ($("#prowl").is(":checked"))
{
$("#prowloptions").show("fast");
}
else
{
$("#prowloptions").hide("fast");
}
});
if ($("#xbmc").is(":checked"))
{
$("#xbmcoptions").show();
}
else
{
$("#xbmcoptions").hide();
}
$("#xbmc").click(function(){
if ($("#xbmc").is(":checked"))
{
$("#xbmcoptions").show("fast");
}
else
{
$("#xbmcoptions").hide("fast");
}
});
if ($("#nma").is(":checked"))
{
$("#nmaoptions").show();
}
else
{
$("#nmaoptions").hide();
}
$("#nma").click(function(){
if ($("#nma").is(":checked"))
{
$("#nmaoptions").show("fast");
}
else
{
$("#nmaoptions").hide("fast");
}
});
$("#mirror").change(handleNewSelection);
handleNewSelection.apply($("#mirror"));
});
};

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/*!
* jQuery Form Plugin
* version: 3.09 (16-APR-2012)
* version: 3.14 (30-JUL-2012)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -165,7 +165,7 @@ $.fn.ajaxSubmit = function(options) {
}
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
var context = options.context || options; // jQuery 1.4+ supports scope context
var context = options.context || this ; // jQuery 1.4+ supports scope context
for (var i=0, max=callbacks.length; i < max; i++) {
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
}
@@ -253,11 +253,11 @@ $.fn.ajaxSubmit = function(options) {
}
s.data = null;
var beforeSend = s.beforeSend;
s.beforeSend = function(xhr, o) {
o.data = formdata;
if(beforeSend)
beforeSend.call(o, xhr, options);
var beforeSend = s.beforeSend;
s.beforeSend = function(xhr, o) {
o.data = formdata;
if(beforeSend)
beforeSend.call(this, xhr, o);
};
$.ajax(s);
}
@@ -316,6 +316,12 @@ $.fn.ajaxSubmit = function(options) {
var e = (status === 'timeout' ? 'timeout' : 'aborted');
log('aborting upload... ' + e);
this.aborted = 1;
// #214
if (io.contentWindow.document.execCommand) {
try { // #214
io.contentWindow.document.execCommand('Stop');
} catch(ignore) {}
}
$io.attr('src', s.iframeSrc); // abort op in progress
xhr.error = e;
if (s.error)
@@ -426,9 +432,16 @@ $.fn.ajaxSubmit = function(options) {
if (s.extraData) {
for (var n in s.extraData) {
if (s.extraData.hasOwnProperty(n)) {
extraInputs.push(
$('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n])
.appendTo(form)[0]);
// if using the $.param format that allows for multiple values with the same name
if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
extraInputs.push(
$('<input type="hidden" name="'+s.extraData[n].name+'">').attr('value',s.extraData[n].value)
.appendTo(form)[0]);
} else {
extraInputs.push(
$('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n])
.appendTo(form)[0]);
}
}
}
}
@@ -997,7 +1010,7 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
this.selectedIndex = -1;
}
else if (includeHidden) {
// includeHidden can be the valud true, or it can be a selector string
// includeHidden can be the value true, or it can be a selector string
// indicating a special test; for example:
// $('#myForm').clearForm('.special:hidden')
// the above would clean hidden inputs that have the class of 'special'

View File

@@ -1,265 +0,0 @@
/**
* noty - jQuery Notification Plugin v1.2.1
* Contributors: https://github.com/needim/noty/graphs/contributors
*
* Examples and Documentation - http://needim.github.com/noty/
*
* Licensed under the MIT licenses:
* http://www.opensource.org/licenses/mit-license.php
*
**/
(function($) {
$.noty = function(options, customContainer) {
var base = {};
var $noty = null;
var isCustom = false;
base.init = function(options) {
base.options = $.extend({}, $.noty.defaultOptions, options);
base.options.type = base.options.cssPrefix+base.options.type;
base.options.id = base.options.type+'_'+new Date().getTime();
base.options.layout = base.options.cssPrefix+'layout_'+base.options.layout;
if (base.options.custom.container) customContainer = base.options.custom.container;
isCustom = ($.type(customContainer) === 'object') ? true : false;
return base.addQueue();
};
// Push notification to queue
base.addQueue = function() {
var isGrowl = ($.inArray(base.options.layout, $.noty.growls) == -1) ? false : true;
if (!isGrowl) (base.options.force) ? $.noty.queue.unshift({options: base.options}) : $.noty.queue.push({options: base.options});
return base.render(isGrowl);
};
// Render the noty
base.render = function(isGrowl) {
// Layout spesific container settings
var container = (isCustom) ? customContainer.addClass(base.options.theme+' '+base.options.layout+' noty_custom_container') : $('body');
if (isGrowl) {
if ($('ul.noty_cont.' + base.options.layout).length == 0)
container.prepend($('<ul/>').addClass('noty_cont ' + base.options.layout));
container = $('ul.noty_cont.' + base.options.layout);
} else {
if ($.noty.available) {
var fromQueue = $.noty.queue.shift(); // Get noty from queue
if ($.type(fromQueue) === 'object') {
$.noty.available = false;
base.options = fromQueue.options;
} else {
$.noty.available = true; // Queue is over
return base.options.id;
}
} else {
return base.options.id;
}
}
base.container = container;
// Generating noty bar
base.bar = $('<div class="noty_bar"/>').attr('id', base.options.id).addClass(base.options.theme+' '+base.options.layout+' '+base.options.type);
$noty = base.bar;
$noty.append(base.options.template).find('.noty_text').html(base.options.text);
$noty.data('noty_options', base.options);
// Close button display
(base.options.closeButton) ? $noty.addClass('noty_closable').find('.noty_close').show() : $noty.find('.noty_close').remove();
// Bind close event to button
$noty.find('.noty_close').bind('click', function() { $noty.trigger('noty.close'); });
// If we have a button we must disable closeOnSelfClick and closeOnSelfOver option
if (base.options.buttons) base.options.closeOnSelfClick = base.options.closeOnSelfOver = false;
// Close on self click
if (base.options.closeOnSelfClick) $noty.bind('click', function() { $noty.trigger('noty.close'); }).css('cursor', 'pointer');
// Close on self mouseover
if (base.options.closeOnSelfOver) $noty.bind('mouseover', function() { $noty.trigger('noty.close'); }).css('cursor', 'pointer');
// Set buttons if available
if (base.options.buttons) {
$buttons = $('<div/>').addClass('noty_buttons');
$noty.find('.noty_message').append($buttons);
$.each(base.options.buttons, function(i, button) {
bclass = (button.type) ? button.type : 'gray';
$button = $('<button/>').addClass(bclass).html(button.text).appendTo($noty.find('.noty_buttons'))
.bind('click', function() {
if ($.isFunction(button.click)) {
button.click.call($button, $noty);
}
});
});
}
return base.show(isGrowl);
};
base.show = function(isGrowl) {
// is Modal?
if (base.options.modal) $('<div/>').addClass('noty_modal').addClass(base.options.theme).prependTo($('body')).fadeIn('fast');
$noty.close = function() { return this.trigger('noty.close'); };
// Prepend noty to container
(isGrowl) ? base.container.prepend($('<li/>').append($noty)) : base.container.prepend($noty);
// topCenter and center specific options
if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {
$.noty.reCenter($noty);
}
$noty.bind('noty.setText', function(event, text) {
$noty.find('.noty_text').html(text);
if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {
$.noty.reCenter($noty);
}
});
$noty.bind('noty.setType', function(event, type) {
$noty.removeClass($noty.data('noty_options').type);
type = $noty.data('noty_options').cssPrefix+type;
$noty.data('noty_options').type = type;
$noty.addClass(type);
if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {
$.noty.reCenter($noty);
}
});
$noty.bind('noty.getId', function(event) {
return $noty.data('noty_options').id;
});
// Bind close event
$noty.one('noty.close', function(event) {
var options = $noty.data('noty_options');
if(options.onClose){options.onClose();}
// Modal Cleaning
if (options.modal) $('.noty_modal').fadeOut('fast', function() { $(this).remove(); });
$noty.clearQueue().stop().animate(
$noty.data('noty_options').animateClose,
$noty.data('noty_options').speed,
$noty.data('noty_options').easing,
$noty.data('noty_options').onClosed)
.promise().done(function() {
// Layout spesific cleaning
if ($.inArray($noty.data('noty_options').layout, $.noty.growls) > -1) {
$noty.parent().remove();
} else {
$noty.remove();
// queue render
$.noty.available = true;
base.render(false);
}
});
});
// Start the show
if(base.options.onShow){base.options.onShow();}
$noty.animate(base.options.animateOpen, base.options.speed, base.options.easing, base.options.onShown);
// If noty is have a timeout option
if (base.options.timeout) $noty.delay(base.options.timeout).promise().done(function() { $noty.trigger('noty.close'); });
return base.options.id;
};
// Run initializer
return base.init(options);
};
// API
$.noty.get = function(id) { return $('#'+id); };
$.noty.close = function(id) {
//remove from queue if not already visible
for(var i=0;i<$.noty.queue.length;) {
if($.noty.queue[i].options.id==id)
$.noty.queue.splice(id,1);
else
i++;
}
//close if already visible
$.noty.get(id).trigger('noty.close');
};
$.noty.setText = function(id, text) {
$.noty.get(id).trigger('noty.setText', text);
};
$.noty.setType = function(id, type) {
$.noty.get(id).trigger('noty.setType', type);
};
$.noty.closeAll = function() {
$.noty.clearQueue();
$('.noty_bar').trigger('noty.close');
};
$.noty.reCenter = function(noty) {
noty.css({'left': ($(window).width() - noty.outerWidth()) / 2 + 'px'});
};
$.noty.clearQueue = function() {
$.noty.queue = [];
};
var windowAlert = window.alert;
$.noty.consumeAlert = function(options){
window.alert = function(text){
if(options){options.text = text;}
else{options = {text:text};}
$.noty(options);
};
}
$.noty.stopConsumeAlert = function(){
window.alert = windowAlert;
}
$.noty.queue = [];
$.noty.growls = ['noty_layout_topLeft', 'noty_layout_topRight', 'noty_layout_bottomLeft', 'noty_layout_bottomRight'];
$.noty.available = true;
$.noty.defaultOptions = {
layout: 'bottomRight',
theme: 'noty_theme_default',
animateOpen: {height: 'toggle'},
animateClose: {height: 'toggle'},
easing: 'swing',
text: '',
type: 'alert',
speed: 500,
timeout: 5000,
closeButton: false,
closeOnSelfClick: true,
closeOnSelfOver: false,
force: false,
onShow: false,
onShown: false,
onClose: false,
onClosed: false,
buttons: false,
modal: false,
template: '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
cssPrefix: 'noty_',
custom: {
container: null
}
};
$.fn.noty = function(options) {
return this.each(function() {
(new $.noty(options, $(this)));
});
};
})(jQuery);
//Helper
function noty(options) {
return jQuery.noty(options); // returns an id
}

View File

@@ -0,0 +1,471 @@
/**
* noty - jQuery Notification Plugin v2.0.3
* Contributors: https://github.com/needim/noty/graphs/contributors
*
* Examples and Documentation - http://needim.github.com/noty/
*
* Licensed under the MIT licenses:
* http://www.opensource.org/licenses/mit-license.php
*
**/
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {};
F.prototype = o;
return new F();
};
};
;(function($) {
var NotyObject = {
init: function(options) {
// Mix in the passed in options with the default options
this.options = $.extend({}, $.noty.defaults, options);
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
this.options.theme = $.noty.themes[this.options.theme];
delete options.layout, delete options.theme;
this.options = $.extend({}, this.options, this.options.layout.options);
this.options.id = 'noty_' + (new Date().getTime() * Math.floor(Math.random()* 1000000));
this.options = $.extend({}, this.options, options);
// Build the noty dom initial structure
this._build();
// return this so we can chain/use the bridge with less code.
return this;
}, // end init
_build: function() {
// Generating noty bar
var $bar = $('<div class="noty_bar"/>').attr('id', this.options.id);
$bar.append(this.options.template).find('.noty_text').html(this.options.text);
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
// Set buttons if available
if (this.options.buttons) {
// If we have button disable closeWith & timeout options
this.options.closeWith = [], this.options.timeout = false;
var $buttons = $('<div/>').addClass('noty_buttons');
(this.options.layout.parent.object !== null) ? this.$bar.find('.noty_bar').append($buttons) : this.$bar.append($buttons);
var self = this;
$.each(this.options.buttons, function(i, button) {
var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text)
.appendTo(self.$bar.find('.noty_buttons'))
.bind('click', function(e) { if ($.isFunction(button.onClick)) { button.onClick.call($button, self); } });
});
}
// For easy access
this.$message = this.$bar.find('.noty_message');
this.$closeButton = this.$bar.find('.noty_close');
this.$buttons = this.$bar.find('.noty_buttons');
$.noty.store[this.options.id] = this; // store noty for api
}, // end _build
show: function() {
var self = this;
$(self.options.layout.container.selector).append(self.$bar);
self.options.theme.style.apply(self);
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
self.$bar.addClass(self.options.layout.addClass);
self.options.layout.container.style.apply($(self.options.layout.container.selector));
self.options.theme.callback.onShow.apply(this);
if ($.inArray('click', self.options.closeWith) > -1)
self.$bar.css('cursor', 'pointer').one('click', function() { self.close(); });
if ($.inArray('hover', self.options.closeWith) > -1)
self.$bar.one('mouseenter', function() { self.close(); });
if ($.inArray('button', self.options.closeWith) > -1)
self.$closeButton.one('click', function() { self.close(); });
if ($.inArray('button', self.options.closeWith) == -1)
self.$closeButton.remove();
if (self.options.callback.onShow)
self.options.callback.onShow.apply(self);
self.$bar.animate(
self.options.animation.open,
self.options.animation.speed,
self.options.animation.easing,
function() {
if (self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
self.shown = true;
});
// If noty is have a timeout option
if (self.options.timeout)
self.$bar.delay(self.options.timeout).promise().done(function() { self.close(); });
return this;
}, // end show
close: function() {
if (this.closed) return;
var self = this;
if (!this.shown) { // If we are still waiting in the queue just delete from queue
$.each($.noty.queue, function(i, n) {
if (n.options.id == self.options.id) {
$.noty.queue.splice(i, 1);
}
});
return;
}
self.$bar.addClass('i-am-closing-now');
if (self.options.callback.onClose) { self.options.callback.onClose.apply(self); }
self.$bar.clearQueue().stop().animate(
self.options.animation.close,
self.options.animation.speed,
self.options.animation.easing,
function() { if (self.options.callback.afterClose) self.options.callback.afterClose.apply(self); })
.promise().done(function() {
// Modal Cleaning
if (self.options.modal) {
$.notyRenderer.setModalCount(-1);
if ($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() { $(this).remove(); });
}
// Layout Cleaning
$.notyRenderer.setLayoutCountFor(self, -1);
if ($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
self.$bar.remove();
self.$bar = null;
self.closed = true;
delete $.noty.store[self.options.id]; // deleting noty from store
if (!self.options.dismissQueue) {
// Queue render
$.noty.ontap = true;
$.notyRenderer.render();
}
});
}, // end close
setText: function(text) {
if (!this.closed) {
this.options.text = text;
this.$bar.find('.noty_text').html(text);
}
return this;
},
setType: function(type) {
if (!this.closed) {
this.options.type = type;
this.options.theme.style.apply(this);
this.options.theme.callback.onShow.apply(this);
}
return this;
},
closed: false,
shown: false
}; // end NotyObject
$.notyRenderer = {};
$.notyRenderer.init = function(options) {
// Renderer creates a new noty
var notification = Object.create(NotyObject).init(options);
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
$.notyRenderer.render();
return ($.noty.returns == 'object') ? notification : notification.options.id;
};
$.notyRenderer.render = function() {
var instance = $.noty.queue[0];
if ($.type(instance) === 'object') {
if (instance.options.dismissQueue) {
$.notyRenderer.show($.noty.queue.shift());
} else {
if ($.noty.ontap) {
$.notyRenderer.show($.noty.queue.shift());
$.noty.ontap = false;
}
}
} else {
$.noty.ontap = true; // Queue is over
}
};
$.notyRenderer.show = function(notification) {
if (notification.options.modal) {
$.notyRenderer.createModalFor(notification);
$.notyRenderer.setModalCount(+1);
}
// Where is the container?
if ($(notification.options.layout.container.selector).length == 0) {
if (notification.options.custom) {
notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
} else {
$('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
}
} else {
$(notification.options.layout.container.selector).removeClass('i-am-new');
}
$.notyRenderer.setLayoutCountFor(notification, +1);
notification.show();
};
$.notyRenderer.createModalFor = function(notification) {
if ($('.noty_modal').length == 0)
$('<div/>').addClass('noty_modal').data('noty_modal_count', 0).css(notification.options.theme.modal.css).prependTo($('body')).fadeIn('fast');
};
$.notyRenderer.getLayoutCountFor = function(notification) {
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
};
$.notyRenderer.setLayoutCountFor = function(notification, arg) {
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
};
$.notyRenderer.getModalCount = function() {
return $('.noty_modal').data('noty_modal_count') || 0;
};
$.notyRenderer.setModalCount = function(arg) {
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
};
// This is for custom container
$.fn.noty = function(options) {
options.custom = $(this);
return $.notyRenderer.init(options);
};
$.noty = {};
$.noty.queue = [];
$.noty.ontap = true;
$.noty.layouts = {};
$.noty.themes = {};
$.noty.returns = 'object';
$.noty.store = {};
$.noty.get = function(id) {
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
};
$.noty.close = function(id) {
return $.noty.get(id) ? $.noty.get(id).close() : false;
};
$.noty.setText = function(id, text) {
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
};
$.noty.setType = function(id, type) {
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
};
$.noty.clearQueue = function() {
$.noty.queue = [];
};
$.noty.closeAll = function() {
$.noty.clearQueue();
$.each($.noty.store, function(id, noty) {
noty.close();
});
};
var windowAlert = window.alert;
$.noty.consumeAlert = function(options) {
window.alert = function(text) {
if (options)
options.text = text;
else
options = {text:text};
$.notyRenderer.init(options);
};
};
$.noty.stopConsumeAlert = function(){
window.alert = windowAlert;
};
$.noty.defaults = {
layout: 'top',
theme: 'default',
type: 'alert',
text: '',
dismissQueue: true,
template: '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
animation: {
open: {height: 'toggle'},
close: {height: 'toggle'},
easing: 'swing',
speed: 500
},
timeout: false,
force: false,
modal: false,
closeWith: ['click'],
callback: {
onShow: function() {},
afterShow: function() {},
onClose: function() {},
afterClose: function() {}
},
buttons: false
};
$(window).resize(function() {
$.each($.noty.layouts, function(index, layout) {
layout.container.style.apply($(layout.container.selector));
});
});
})(jQuery);
// Helpers
function noty(options) {
// This is for BC - Will be deleted on v2.2.0
var using_old = 0
, old_to_new = {
'animateOpen': 'animation.open',
'animateClose': 'animation.close',
'easing': 'animation.easing',
'speed': 'animation.speed',
'onShow': 'callback.onShow',
'onShown': 'callback.afterShow',
'onClose': 'callback.onClose',
'onClosed': 'callback.afterClose'
}
jQuery.each(options, function(key, value) {
if (old_to_new[key]) {
using_old++;
var _new = old_to_new[key].split('.');
if (!options[_new[0]]) options[_new[0]] = {};
options[_new[0]][_new[1]] = (value) ? value : function() {};
delete options[key];
}
});
if (!options.closeWith) {
options.closeWith = jQuery.noty.defaults.closeWith;
}
if (options.hasOwnProperty('closeButton')) {
using_old++;
if (options.closeButton) options.closeWith.push('button');
delete options.closeButton;
}
if (options.hasOwnProperty('closeOnSelfClick')) {
using_old++;
if (options.closeOnSelfClick) options.closeWith.push('click');
delete options.closeOnSelfClick;
}
if (options.hasOwnProperty('closeOnSelfOver')) {
using_old++;
if (options.closeOnSelfOver) options.closeWith.push('hover');
delete options.closeOnSelfOver;
}
if (options.hasOwnProperty('custom')) {
using_old++;
if (options.custom.container != 'null') options.custom = options.custom.container;
}
if (options.hasOwnProperty('cssPrefix')) {
using_old++;
delete options.cssPrefix;
}
if (options.theme == 'noty_theme_default') {
using_old++;
options.theme = 'default';
}
if (!options.hasOwnProperty('dismissQueue')) {
if (options.layout == 'topLeft'
|| options.layout == 'topRight'
|| options.layout == 'bottomLeft'
|| options.layout == 'bottomRight') {
options.dismissQueue = true;
} else {
options.dismissQueue = false;
}
}
if (options.buttons) {
jQuery.each(options.buttons, function(i, button) {
if (button.click) {
using_old++;
button.onClick = button.click;
delete button.click;
}
if (button.type) {
using_old++;
button.addClass = button.type;
delete button.type;
}
});
}
if (using_old) console.warn('You are using noty v2 with v1.x.x options. @deprecated until v2.2.0 - Please update your options.');
// console.log(options);
// End of the BC
return jQuery.notyRenderer.init(options);
}

View File

@@ -0,0 +1,34 @@
;(function($) {
$.noty.layouts.bottom = {
name: 'bottom',
options: {},
container: {
object: '<ul id="noty_bottom_layout_container" />',
selector: 'ul#noty_bottom_layout_container',
style: function() {
$(this).css({
bottom: 0,
left: '5%',
position: 'fixed',
width: '90%',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 9999999
});
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,41 @@
;(function($) {
$.noty.layouts.bottomCenter = {
name: 'bottomCenter',
options: { // overrides options
},
container: {
object: '<ul id="noty_bottomCenter_layout_container" />',
selector: 'ul#noty_bottomCenter_layout_container',
style: function() {
$(this).css({
bottom: 20,
left: 0,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
$(this).css({
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
});
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,43 @@
;(function($) {
$.noty.layouts.bottomLeft = {
name: 'bottomLeft',
options: { // overrides options
},
container: {
object: '<ul id="noty_bottomLeft_layout_container" />',
selector: 'ul#noty_bottomLeft_layout_container',
style: function() {
$(this).css({
bottom: 20,
left: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
if (window.innerWidth < 600) {
$(this).css({
left: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,43 @@
;(function($) {
$.noty.layouts.bottomRight = {
name: 'bottomRight',
options: { // overrides options
},
container: {
object: '<ul id="noty_bottomRight_layout_container" />',
selector: 'ul#noty_bottomRight_layout_container',
style: function() {
$(this).css({
bottom: 50,
right: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
if (window.innerWidth < 600) {
$(this).css({
right: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,56 @@
;(function($) {
$.noty.layouts.center = {
name: 'center',
options: { // overrides options
},
container: {
object: '<ul id="noty_center_layout_container" />',
selector: 'ul#noty_center_layout_container',
style: function() {
$(this).css({
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
// getting hidden height
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
$("body").append(dupe);
dupe.find('.i-am-closing-now').remove();
dupe.find('li').css('display', 'block');
var actual_height = dupe.height();
dupe.remove();
if ($(this).hasClass('i-am-new')) {
$(this).css({
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
top: ($(window).height() - actual_height) / 2 + 'px'
});
} else {
$(this).animate({
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
top: ($(window).height() - actual_height) / 2 + 'px'
}, 500);
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,61 @@
;(function($) {
$.noty.layouts.centerLeft = {
name: 'centerLeft',
options: { // overrides options
},
container: {
object: '<ul id="noty_centerLeft_layout_container" />',
selector: 'ul#noty_centerLeft_layout_container',
style: function() {
$(this).css({
left: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
// getting hidden height
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
$("body").append(dupe);
dupe.find('.i-am-closing-now').remove();
dupe.find('li').css('display', 'block');
var actual_height = dupe.height();
dupe.remove();
if ($(this).hasClass('i-am-new')) {
$(this).css({
top: ($(window).height() - actual_height) / 2 + 'px',
});
} else {
$(this).animate({
top: ($(window).height() - actual_height) / 2 + 'px'
}, 500);
}
if (window.innerWidth < 600) {
$(this).css({
left: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,61 @@
;(function($) {
$.noty.layouts.centerRight = {
name: 'centerRight',
options: { // overrides options
},
container: {
object: '<ul id="noty_centerRight_layout_container" />',
selector: 'ul#noty_centerRight_layout_container',
style: function() {
$(this).css({
right: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
// getting hidden height
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
$("body").append(dupe);
dupe.find('.i-am-closing-now').remove();
dupe.find('li').css('display', 'block');
var actual_height = dupe.height();
dupe.remove();
if ($(this).hasClass('i-am-new')) {
$(this).css({
top: ($(window).height() - actual_height) / 2 + 'px',
});
} else {
$(this).animate({
top: ($(window).height() - actual_height) / 2 + 'px'
}, 500);
}
if (window.innerWidth < 600) {
$(this).css({
right: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,31 @@
;(function($) {
$.noty.layouts.inline = {
name: 'inline',
options: {},
container: {
object: '<ul id="noty_inline_layout_container" />',
selector: 'ul#noty_inline_layout_container',
style: function() {
$(this).css({
width: '100%',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 9999999
});
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,34 @@
;(function($) {
$.noty.layouts.top = {
name: 'top',
options: {},
container: {
object: '<ul id="noty_top_layout_container" />',
selector: 'ul#noty_top_layout_container',
style: function() {
$(this).css({
top: 0,
left: '5%',
position: 'fixed',
width: '90%',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 9999999
});
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,41 @@
;(function($) {
$.noty.layouts.topCenter = {
name: 'topCenter',
options: { // overrides options
},
container: {
object: '<ul id="noty_topCenter_layout_container" />',
selector: 'ul#noty_topCenter_layout_container',
style: function() {
$(this).css({
top: 20,
left: 0,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
$(this).css({
left: ($(window).width() - $(this).outerWidth()) / 2 + 'px',
});
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,43 @@
;(function($) {
$.noty.layouts.topLeft = {
name: 'topLeft',
options: { // overrides options
},
container: {
object: '<ul id="noty_topLeft_layout_container" />',
selector: 'ul#noty_topLeft_layout_container',
style: function() {
$(this).css({
top: 20,
left: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
if (window.innerWidth < 600) {
$(this).css({
left: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,43 @@
;(function($) {
$.noty.layouts.topRight = {
name: 'topRight',
options: { // overrides options
},
container: {
object: '<ul id="noty_topRight_layout_container" />',
selector: 'ul#noty_topRight_layout_container',
style: function() {
$(this).css({
top: 20,
right: 20,
position: 'fixed',
width: '310px',
height: 'auto',
margin: 0,
padding: 0,
listStyleType: 'none',
zIndex: 10000000
});
if (window.innerWidth < 600) {
$(this).css({
right: 5
});
}
}
},
parent: {
object: '<li />',
selector: 'li',
css: {}
},
css: {
display: 'none',
width: '310px'
},
addClass: ''
};
})(jQuery);

View File

@@ -0,0 +1,155 @@
;(function($) {
$.noty.themes.default = {
name: 'brink',
helpers: {
borderFix: function() {
if (this.options.dismissQueue) {
var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
switch (this.options.layout.name) {
case 'top':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).last().css({borderRadius: '0px 0px 0px 0px'}); break;
case 'topCenter': case 'topLeft': case 'topRight':
case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
case 'center': case 'centerLeft': case 'centerRight': case 'inline':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).first().css({'border-top-left-radius': '0px', 'border-top-right-radius': '0px'});
$(selector).last().css({'border-bottom-left-radius': '0px', 'border-bottom-right-radius': '0px'}); break;
case 'bottom':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).first().css({borderRadius: '0px 0px 0px 0px'}); break;
default: break;
}
}
}
},
modal: {
css: {
position: 'fixed',
width: '100%',
height: '100%',
backgroundColor: '#000',
zIndex: 10000,
opacity: 0.6,
display: 'none',
left: 0,
top: 0,
}
},
style: function() {
this.$bar.css({
overflow: 'hidden',
background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
});
this.$message.css({
fontSize: '.8em',
lineHeight: '1em',
textAlign: 'left',
padding: '8px 10px 9px',
width: 'auto',
position: 'relative'
});
this.$closeButton.css({
position: 'absolute',
top: 4, right: 4,
width: 10, height: 10,
background: "url(data:image/png;base64,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)",
display: 'none',
cursor: 'pointer',
});
this.$buttons.css({
padding: 5,
textAlign: 'right',
borderTop: '1px solid #ccc',
backgroundColor: '#fff',
});
this.$buttons.find('button').css({
marginLeft: 5
});
this.$buttons.find('button:first').css({
marginLeft: 0
});
this.$bar.bind({
mouseenter: function() { $(this).find('.noty_close').fadeIn(); },
mouseleave: function() { $(this).find('.noty_close').fadeOut(); }
});
switch (this.options.layout.name) {
case 'top':
this.$bar.css({
borderRadius: '0px 0px 0px 0px',
borderBottom: '1px solid #eee',
borderLeft: '1px solid #eee',
borderRight: '1px solid #eee',
boxShadow: "0 5px 4px rgba(0, 0, 0, 0.1)"
});
break;
case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
this.$bar.css({
borderRadius: '0px',
border: '1px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
this.$message.css({fontSize: '13px', textAlign: 'center'});
break;
case 'topLeft': case 'topRight':
case 'bottomLeft': case 'bottomRight':
case 'centerLeft': case 'centerRight':
this.$bar.css({
borderRadius: '0px',
border: '1px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
this.$message.css({fontSize: '13px', textAlign: 'left'});
break;
case 'bottom':
this.$bar.css({
borderRadius: '0x 0px 0px 0px',
borderTop: '1px solid #eee',
borderLeft: '1px solid #eee',
borderRight: '1px solid #eee',
boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
});
break;
default:
this.$bar.css({
border: '2px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
break;
}
switch (this.options.type) {
case 'alert': case 'notification':
this.$bar.css({backgroundColor: '#FFF', borderColor: '#353535', color: '#444'}); break;
case 'warning':
this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#353535', color: '#826200'});
this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
case 'error':
this.$bar.css({backgroundColor: 'red', borderColor: '#353535', color: '#FFF'});
this.$buttons.css({borderTop: '1px solid darkred'}); break;
case 'information':
this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#353535', color: '#FFF'});
this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
case 'success':
this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#353535', color: '#000'});
this.$buttons.css({borderTop: '1px solid #50C24E'});break;
default:
this.$bar.css({backgroundColor: '#FFF', borderColor: '#353535', color: '#444'}); break;
}
},
callback: {
onShow: function() { $.noty.themes.default.helpers.borderFix.apply(this); },
onClose: function() { $.noty.themes.default.helpers.borderFix.apply(this); }
}
};
})(jQuery);

View File

@@ -0,0 +1,156 @@
;(function($) {
$.noty.themes.default = {
name: 'default',
helpers: {
borderFix: function() {
if (this.options.dismissQueue) {
var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
switch (this.options.layout.name) {
case 'top':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
case 'topCenter': case 'topLeft': case 'topRight':
case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
case 'center': case 'centerLeft': case 'centerRight': case 'inline':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
$(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
case 'bottom':
$(selector).css({borderRadius: '0px 0px 0px 0px'});
$(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
default: break;
}
}
}
},
modal: {
css: {
position: 'fixed',
width: '100%',
height: '100%',
backgroundColor: '#000',
zIndex: 10000,
opacity: 0.6,
display: 'none',
left: 0,
top: 0,
}
},
style: function() {
this.$bar.css({
overflow: 'hidden',
background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
});
this.$message.css({
fontSize: '13px',
lineHeight: '16px',
textAlign: 'center',
padding: '8px 10px 9px',
width: 'auto',
position: 'relative'
});
this.$closeButton.css({
position: 'absolute',
top: 4, right: 4,
width: 10, height: 10,
background: "url(data:image/png;base64,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)",
display: 'none',
cursor: 'pointer',
});
this.$buttons.css({
padding: 5,
textAlign: 'right',
borderTop: '1px solid #ccc',
backgroundColor: '#fff',
});
this.$buttons.find('button').css({
marginLeft: 5
});
this.$buttons.find('button:first').css({
marginLeft: 0
});
this.$bar.bind({
mouseenter: function() { $(this).find('.noty_close').fadeIn(); },
mouseleave: function() { $(this).find('.noty_close').fadeOut(); }
});
switch (this.options.layout.name) {
case 'top':
this.$bar.css({
borderRadius: '0px 0px 5px 5px',
borderBottom: '2px solid #eee',
borderLeft: '2px solid #eee',
borderRight: '2px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
break;
case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
this.$bar.css({
borderRadius: '5px',
border: '1px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
this.$message.css({fontSize: '13px', textAlign: 'center'});
break;
case 'topLeft': case 'topRight':
case 'bottomLeft': case 'bottomRight':
case 'centerLeft': case 'centerRight':
this.$bar.css({
borderRadius: '5px',
border: '1px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
this.$message.css({fontSize: '13px', textAlign: 'left'});
break;
case 'bottom':
this.$bar.css({
borderRadius: '5px 5px 0px 0px',
borderTop: '2px solid #eee',
borderLeft: '2px solid #eee',
borderRight: '2px solid #eee',
boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)"
});
break;
default:
this.$bar.css({
border: '2px solid #eee',
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
});
break;
}
switch (this.options.type) {
case 'alert': case 'notification':
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
case 'warning':
this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
case 'error':
this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
this.$message.css({fontWeight: 'bold'});
this.$buttons.css({borderTop: '1px solid darkred'}); break;
case 'information':
this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
case 'success':
this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
this.$buttons.css({borderTop: '1px solid #50C24E'});break;
default:
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'}); break;
}
},
callback: {
onShow: function() { $.noty.themes.default.helpers.borderFix.apply(this); },
onClose: function() { $.noty.themes.default.helpers.borderFix.apply(this); }
}
};
})(jQuery);

View File

@@ -38,4 +38,4 @@ function toggle(source) {
checkboxes = document.getElementsByClassName('checkbox');
for(var i in checkboxes)
checkboxes[i].checked = source.checked;
}
}

View File

@@ -24,10 +24,10 @@ function getArtistInfo(name,imgElem,size,artistID) {
}
var artistBio = artistBio;
var image = imgElem;
var bio = $('#artistBio');
var bio = $('.artist-bio-container .artist-bio');
$(image).attr("src",imageUrl).removeAttr("width").removeAttr("height").hide().fadeIn();
if ( bio.length > 0 ) $(bio).append(artistBio);
$(image).wrap('<a href="albumPage?AlbumID='+ artistID +'"></a>');
$(image).wrap('<a href="artistPage?ArtistID='+ artistID +'"></a>');
}
}
});
@@ -51,10 +51,10 @@ function getArtistInfo(name,imgElem,size,artistID) {
}
var artistBio = artistBio;
var image = imgElem;
var bio = $('#artistBio');
var bio = $('.artist-bio-container .artist-bio');
$(image).attr("src",imageUrl).removeAttr("width").removeAttr("height").hide().fadeIn();
if ( bio.length > 0 ) $(bio).append(artistBio);
$(image).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + artist + '"></a>');
$(image).wrap('<a href="artistPage?ArtistID=' + artistID + '" rel="dialog" title="' + artist + '"></a>');
}
});
}
@@ -172,11 +172,23 @@ loader();
function enit()
{
var mainWindow = $("#main");
var totalHeight = $(window).height() -
($("#header").outerHeight() +
$("#footer").outerHeight()) - 3;
var totalHeight = $(window).height() - ($("#header").outerHeight() + $("#footer").outerHeight()) - 3;
$(mainWindow).height(totalHeight);
$(mainWindow).jScrollPane({ showArrows: true, animateScroll: true });
$(mainWindow).jScrollPane({ showArrows: true, animateScroll: true, hijackInternalLinks: true, autoReinitialise: true });
}
$(document).ready(function(){
$("ul#nav-view li").toggle(function() {
$(this).children("span").removeClass("Icon");
$(this).children("span").addClass("List");
$("#gridView").hide();
$("#listView").show();
enit();
}, function() {
$(this).children("span").removeClass("List");
$(this).children("span").addClass("Icon");
$("#gridView").show();
$("#listView").hide();
});
});

View File

@@ -37,7 +37,7 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
@@ -50,4 +50,4 @@
});
});
</script>
</%def>
</%def>

View File

@@ -3,99 +3,98 @@
import headphones
from headphones.helpers import checked
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<li><a href="manageArtists">Manage Artists</a></li>
%if not headphones.ADD_ARTISTS:
<li><a href="manageNew">Manage New Artists</a></li>
%endif
</ul>
</div>
</%def>
<%def name="body()">
<div class="table_wrapper">
<h1>Scan Music Library</h1>
<table class="configtable">
<tr>
<td>
<p>
Where do you keep your music?
</p>
<div id="nav-sub-container">
<ul id="nav-sub">
<li>Manage: </li>
<li><a href="manageAlbums">Albums</a></li>
<li><a href="manageArtists">Artists</a></li>
%if not headphones.ADD_ARTISTS:
<li><a href="manageNew">New Artists</a></li>
%endif
</ul>
</div>
<div id="config_wrapper">
<div>
<h1>Scan Music Library</h1>
<table class="configtable">
<tr>
<form action="musicScan" method="GET">
%if headphones.MUSIC_DIR:
<input type="text" value="${headphones.MUSIC_DIR}" name="path" size="60" />
<div class="tooltip">
<span>
You can put in any directory, and it will scan for audio files in that folder
(including all subdirectories)<br />
For example: '/Users/name/Music'
</span>
</div>
%else:
<p>
<input type="text" value="Enter a Music Directory to scan" onfocus="if (this.value==this.defaultValue) this.value='';" name="path" size="60" />
<div class="tooltip">
<span>
You can put in any directory, and it will scan for audio files in that folder
(including all subdirectories)<br />
For example: '/Users/name/Music'
</span>
</div>
</p>
%endif
<br />
<p>
<input class="styled" type="checkbox" name="autoadd" value="1" ${checked(headphones.ADD_ARTISTS)} /> Automatically add new artists
</p>
<input type="submit" />
<div class="tooltip">
<span>
This process runs in the background.
</span>
</div>
</form>
</td>
</tr>
</table>
</div>
<div class="table_wrapper">
<h1>Import Last.FM Artists</h1>
<table class="configtable">
<tr>
<td>
<p>
Enter the username whose artists you want to import:
</p>
<form action="importLastFM" method="GET" align="left">
<%
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" />
<br />
<br />
<input type="submit" />
</form>
</td>
</tr>
</table>
</div>
<div class="table_wrapper">
<h1>Force Search</h1><br />
<table class="configtable">
<tr>
<td>
<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>
</td>
</tr>
</table>
%if headphones.MUSIC_DIR:
<td>
<h2>Local Music Directory:</h2>
<small>
You can put in any directory, and it will scan for audio files in that folder
(including all subdirectories)<br />
For example: '/Users/name/Music'
</small>
</td>
<td><input type="text" value="${headphones.MUSIC_DIR}" name="path" size="60" /></td>
%else:
<td>
<h2>Local Music Directory:</h2>
<small>
You can put in any directory, and it will scan for audio files in that folder
(including all subdirectories)<br />
For example: '/Users/name/Music'
</small>
</td>
<td><input type="text" placeholder="Music Directory" onfocus="if (this.value==this.defaultValue) this.value='';" name="path" size="60" /></td>
%endif
</tr>
<tr>
<td colspan="2">
<input class="styled" type="checkbox" name="autoadd" value="1" ${checked(headphones.ADD_ARTISTS)} /> <label for="autoadd">Automatically add new artists</label>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<input type="submit" /> <small><span class="wsr Alert"></span> This process runs in the background.</small>
</form>
</div>
<div id="Import">
<table>
<tr>
<td colspan="2"><h2>Import Last.FM Artists</h2></td>
</tr>
<tr>
<td>
<label for="username">Username:</label>
</td>
<td>
<form action="importLastFM" method="GET" align="left">
<%
if headphones.LASTFM_USERNAME:
lastfmvalue = headphones.LASTFM_USERNAME
else:
lastfmvalue = 'Last.fm Username'
%>
<input type="text" value="${lastfmvalue}" name="username" size="18" />
<input type="submit" />
</form>
</td>
</tr>
</table>
</div>
<!--Hidden
<div id="Search">
<h2>Force Search</h2>
<table class="configtable">
<tr>
<td>
<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>
<h3><a href="checkGithub">Check for Headphones Updates</a></h3>
</td>
</tr>
</table>
</div>
-->
</div>
</%def>

View File

@@ -0,0 +1,140 @@
<%inherit file="base.html" />
<%!
from headphones import db
import headphones
%>
<%def name="body()">
<div class="table_wrapper">
<div id="manageheader" class="title">
<h1 class="clearfix"><img src="interfaces/default/images/icon_manage.png" alt="manage"/>Manage Albums</h1>
</div>
<form action="markAlbums" method="get" id="markAlbums">
<div id="markalbum">Mark selected albums as
<select name="action" onChange="doAjaxCall('markAlbums',$(this),'table',true);" data-error="You didn't select any albums">
<option disabled="disabled" selected="selected">Choose...</option>
<option value="Wanted">Wanted</option>
<option value="WantedNew">Wanted (new only)</option>
<option value="WantedLossless">Wanted (lossless)</option>
<option value="Skipped">Skipped</option>
<option value="Downloaded">Downloaded</option>
</select>
<input type="hidden" value="Go">
</div>
<table class="display" id="album_table">
<thead>
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="albumname">Album</th>
<th id="artistname">Artist</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="status">Status</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</th>
<th id="albumformat">Format</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 tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + 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 = '?'
avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if avgbitrate:
bitrate = str(int(avgbitrate)/1000) + ' kbps'
else:
bitrate = ''
albumformatcount = myDB.action("SELECT COUNT(DISTINCT Format) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
if albumformatcount == 1:
albumformat = myDB.action("SELECT DISTINCT Format FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0]
elif albumformatcount > 1:
albumformat = 'Mixed'
else:
albumformat = ''
lossy_formats = [str.upper(fmt) for fmt in headphones.LOSSY_MEDIA_FORMATS]
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></td>
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="artistname"><a href="artistPage?ArtistID=${album['ArtistID']}">${album['ArtistName']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>
<td id="type">${album['Type']}</td>
<td id="status">${album['Status']}</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>
<td id="bitrate">${bitrate}</td>
<td id="albumformat">${albumformat}</td>
</tr>
%endfor
</tbody>
</table>
</form>
</div>
</%def>
<%def name="headIncludes()">
</%def>
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
<script>
function initThisPage() {
$('#album_table').dataTable({
"bDestroy": true,
"aoColumns": [
null,
null,
null,
null,
null,
null,
{ "sType": "title-numeric"},
null,
null
],
"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [ 0 ] }
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ albums per page",
"sEmptyTable": "No album information available",
"sInfo":"Showing _TOTAL_ albums",
"sInfoEmpty":"No albums to manage.",
"sInfoFiltered":"(filtered from _MAX_ total albums)",
"sSearch": ""},
"bPaginate": false,
"aaSorting": [[5, 'desc']]
});
resetFilters("albums");
}
$(document).ready(function() {
initThisPage();
});
</script>
</%def>

View File

@@ -1,7 +1,7 @@
<%inherit file="base.html" />
<%def name="body()">
<div id="paddingheader">
<div id="nav-sub-container">
<h1>Manage Artists<h1>
</div>
<form action="markArtists" method="get">
@@ -19,8 +19,8 @@
<thead>
<tr>
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
<th id="name">Artist Name</th>
<th id="status">Status</th>
<th id="name">Artist Name</th>
<th id="album">Latest Album</th>
</tr>
</thead>
@@ -46,8 +46,18 @@
%>
<tr class="grade${grade}">
<td id="select"><input type="checkbox" name="${artist['ArtistID']}" class="checkbox" /></td>
<td id="status">
%if artist['Status'] == 'Paused':
<span class="wsr Clock"></span>
%elif artist['Status'] == 'Loading':
<span class="wsr Loading loader"></span>
%else:
<span class="wsr Approved"></span>
%endif
</td>
<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>
</tr>
%endfor
@@ -61,22 +71,22 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
$('#artist_table').dataTable(
{
"bDestroy": true,
"aoColumns": [
{ "bSortable": false},
null,
null,
null,
null,
],
"bStateSave": true,
"bPaginate": false
});
});
</script>
</%def>
</%def>

View File

@@ -3,7 +3,7 @@
import headphones
%>
<%def name="body()">
<div id="paddingheader">
<div id="nav-sub-container">
<h1>Manage New Artists<h1>
<h3><a href="musicScan?path=${headphones.MUSIC_DIR}&redirect=manageNew">Scan Music Library</a></h3>
</div>
@@ -20,10 +20,10 @@
</tr>
</thead>
<tbody>
%for artist in newartists:
%for artist in headphones.NEW_ARTISTS:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${artist['ArtistName']}" class="checkbox" /></td>
<td id="name">${artist['ArtistName']}</a></td>
<td id="select"><input type="checkbox" name="${artist}" class="checkbox" /></td>
<td id="name">${artist}</a></td>
</tr>
%endfor
</tbody>
@@ -36,7 +36,7 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
@@ -49,4 +49,4 @@
});
});
</script>
</%def>
</%def>

View File

@@ -2,17 +2,17 @@
<%def name="body()">
<div id="paddingheader">
<div id="nav-sub-container">
<h1><span>L</span>Search Results</h1>
</div>
<table class="display" id="searchresults_table">
<thead>
<tr>
%if type == 'album':
<th id="albumart"></th>
<th id="album-art"></th>
<th id="albumname">Album Name</th>
%elif type == 'artist':
<th id="artistart"></th>
<th id="artist-art"></th>
%endif
<th id="artistname">Artist Name</th>
<th id="score">Score</th>
@@ -29,33 +29,36 @@
grade = 'Z'
%>
<tr class="grade${grade}">
<tr class="grade${grade}" for="${result['id']}">
%if type == 'album':
<td id="albumart">
<div class="album-art-small">
<div class="status">
<div>
<a class="web-symbol" href="addReleaseById?rid=${result['albumid']}" title="Add to collection"><span>+</span></a>
</div>
</div>
<img />
</div>
</td>
<td id="albumname"><a href="${result['albumurl']}">${result['title']}</a></td>
%elif type == 'artist':
<td id="artistart">
<input type="hidden" value="${result['id']}" />
<div class="album-art-small">
<img alt="${result['uniquename']}"/>
</div>
</td>
%endif
<td id="artistname"><a href="${result['url']}" for="${result['id']}">${result['uniquename']}</a></td>
<td id="artistname">${result['uniquename']}</td>
<td id="score">
<div class="searchscore" title="The match result is: ${result['score']}%">
<div class="progress-container" title="Match result is ${result['score']}%">
<span class="searchmatch">${result['score']}%</span>
<div style="width: ${result['score']}%"></div>
</div>
</div>
</div>
</td>
%if type == 'album':
<td id="add"></td>
<td id="add"><a class="wsr" href="addReleaseById?rid=${result['albumid']}" title="Add to collection"><span class="wsr ZoomIn"></span></a></td>
%elif type == 'artist':
<td id="add"><a class="btnAdd" href="addArtist?artistid=${result['id']}" title="Add this Artist"></a></td>
<td id="add"><a class="btnAdd" href="addArtist?artistid=${result['id']}" title="Add to collection"><span class="wsr ZoomIn"></span></a>
<a href="${result['url']}" for="${result['id']}" title="View online" target="_blank"><span class="wsr Link"></span></a></td>
%endif
</tr>
%endfor
@@ -71,19 +74,33 @@
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
<script type="text/javascript">
function getArtistArt() {
$("table#searchresults_table tr td#artistname").each(function(){
var id = $(this).attr('for');
var artist = $(this).children('a').text();
var image = $(this).parent().find("td#albumart img");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtistInfo(artist,image,1,id);
}
});
}
$(document).ready(function(){
%if type == 'album':
getAlbumArt();
function getAlbumArt() {
$("table#searchresults_table tr").each(function() {
$(this).fadeIn("slow", function(){
var element = $(this).find("#albumart img");
var artistname = $(this).find("#artistname").text();
var albumname = $(this).find("#albumname").text();
getAlbumInfo(artistname,albumname,element,2);
});
});
}
%elif type == 'artist':
getArtistArt();
function getArtistArt() {
$("table#searchresults_table tr").each(function(){
var id = $(this).attr('for');
var artist = $(this).children('td#artistname').text();
var image = $(this).find("td#artistart img");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtistInfo(artist,image,1,id);
}
});
}
%endif
});
</script>
</%def>

View File

@@ -66,20 +66,16 @@
<td id="select"><input class="styled" type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
<td id="albumart">
<div class="album-art-small">
<div class="status ${album['Status']}">
<div>
%if album['Status'] == 'Skipped':
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Get this album"><span>N</span></a>
%elif album['Status'] == 'Wanted':
<a class="web-symbol" href="#" title="Mark downloaded"><span>/</span></a>
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark"><span>&#215;</span></a>
%else:
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry the same nbz"><span>*</span></a>
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try a new download, skipping all previously tried nzbs">J</a>
%endif
</div>
</div>
<img />
<div class="album-actions">
%if album['Status'] == 'Wanted':
<a class="wsr" href="#" title="Mark downloaded"><span>/</span></a>
<a class="wsr" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark"><span class="wsr Unlike"></span></a>
%else:
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry the same nbz"><span class="wsr Rotate">*</span></a>
<a class="wsr" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try a new download, skipping all previously tried nzbs"><span class="wsr Reblog"></span></a>
%endif
</div>
</div>
</td>
<td id="artistname">
@@ -102,7 +98,7 @@
</%def>
<%def name="javascriptIncludes()">
<script src="interfaces/brink/js/libs/jquery.dataTables.min.js"></script>
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
<script>
function getArtistArt() {
$("table#upcoming_table tr td#artistname").each(function(){
@@ -145,4 +141,4 @@
});
});
</script>
</%def>
</%def>