mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 00:14:02 +01:00
A couple syle changes to keep the artist image normally proportioned. Also fixed the fancy boxes on the artist & album
pages
This commit is contained in:
@@ -129,10 +129,11 @@
|
|||||||
|
|
||||||
function getAlbumArt() {
|
function getAlbumArt() {
|
||||||
var id = "${album['AlbumID']}";
|
var id = "${album['AlbumID']}";
|
||||||
|
var name = "${album['AlbumTitle']}";
|
||||||
var image = $("div#albumImg img#albumImg");
|
var image = $("div#albumImg img#albumImg");
|
||||||
if ( !image.hasClass('done') ) {
|
if ( !image.hasClass('done') ) {
|
||||||
image.addClass('done');
|
image.addClass('done');
|
||||||
getArtwork(image,id,'album');
|
getArtwork(image,id,name,'album');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,6 +147,9 @@
|
|||||||
getAlbumInfo();
|
getAlbumInfo();
|
||||||
getAlbumArt();
|
getAlbumArt();
|
||||||
initActions();
|
initActions();
|
||||||
|
setTimeout(function(){
|
||||||
|
initFancybox();
|
||||||
|
},1000);
|
||||||
|
|
||||||
$('#track_table').dataTable({
|
$('#track_table').dataTable({
|
||||||
"aaSorting": [],
|
"aaSorting": [],
|
||||||
@@ -154,8 +158,6 @@
|
|||||||
"bPaginate": false
|
"bPaginate": false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(window).load(function(){
|
|
||||||
initFancybox();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</%def>
|
</%def>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<%def name="body()">
|
<%def name="body()">
|
||||||
<div id="artistheader" class="clearfix">
|
<div id="artistheader" class="clearfix">
|
||||||
<div id="artistImg">
|
<div id="artistImg">
|
||||||
<img id="artistImg" class="albumArt" alt="${artist['ArtistName']}"/>
|
<img id="artistImage" class="albumArt" alt="${artist['ArtistName']}" height="200" />
|
||||||
</div>
|
</div>
|
||||||
<h1>
|
<h1>
|
||||||
%if artist['Status'] == 'Loading':
|
%if artist['Status'] == 'Loading':
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
%>
|
%>
|
||||||
<tr class="grade${grade}">
|
<tr class="grade${grade}">
|
||||||
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></td>
|
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></td>
|
||||||
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64"></td>
|
<td id="albumart"><img class="albumArt" title="${album['AlbumID']}" height="64" width="64"></td>
|
||||||
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
||||||
<td id="reldate">${album['ReleaseDate']}</td>
|
<td id="reldate">${album['ReleaseDate']}</td>
|
||||||
<td id="type">${album['Type']}</td>
|
<td id="type">${album['Type']}</td>
|
||||||
@@ -151,10 +151,11 @@
|
|||||||
|
|
||||||
function getArtistArt() {
|
function getArtistArt() {
|
||||||
var id = "${artist['ArtistID']}";
|
var id = "${artist['ArtistID']}";
|
||||||
var image = $("div#artistImg img#artistImg");
|
var name = "${artist['ArtistName']}";
|
||||||
|
var image = $("div#artistImg img#artistImage");
|
||||||
if ( !image.hasClass('done') ) {
|
if ( !image.hasClass('done') ) {
|
||||||
image.addClass('done');
|
image.addClass('done');
|
||||||
getArtwork(image,id,'artist');
|
getArtwork(image,id,name,'artist');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,10 +221,6 @@
|
|||||||
initActions();
|
initActions();
|
||||||
initThisPage();
|
initThisPage();
|
||||||
});
|
});
|
||||||
$(window).load(function(){
|
|
||||||
setTimeout(function(){
|
|
||||||
initFancybox();
|
|
||||||
},1000)
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</%def>
|
</%def>
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ function getThumb(imgElem,id,type) {
|
|||||||
var imageUrl = data;
|
var imageUrl = data;
|
||||||
}
|
}
|
||||||
$(imgElem).attr("src",imageUrl).hide().fadeIn();
|
$(imgElem).attr("src",imageUrl).hide().fadeIn();
|
||||||
$(imgElem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
|
// $(imgElem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArtwork(imgElem,id,type) {
|
function getArtwork(imgElem,id,name,type) {
|
||||||
|
|
||||||
if ( type == 'artist' ) {
|
if ( type == 'artist' ) {
|
||||||
var artworkURL = "getArtwork?ArtistID=" + id;
|
var artworkURL = "getArtwork?ArtistID=" + id;
|
||||||
@@ -40,8 +40,8 @@ function getArtwork(imgElem,id,type) {
|
|||||||
else {
|
else {
|
||||||
var imageUrl = data;
|
var imageUrl = data;
|
||||||
}
|
}
|
||||||
$(imgElem).attr("src",imageUrl).removeAttr("width").removeAttr("height").hide().fadeIn();
|
$(imgElem).attr("src",imageUrl).hide().fadeIn();
|
||||||
$(imgElem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
|
$(imgElem).wrap('<a href="'+ imageUrl +'" rel="dialog" title="' + name + '"></a>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user