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:
rembo10
2012-06-26 12:09:51 +05:30
parent df9a3021b4
commit e26dabbeca
3 changed files with 16 additions and 17 deletions

View File

@@ -129,10 +129,11 @@
function getAlbumArt() {
var id = "${album['AlbumID']}";
var name = "${album['AlbumTitle']}";
var image = $("div#albumImg img#albumImg");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtwork(image,id,'album');
getArtwork(image,id,name,'album');
}
}
@@ -146,6 +147,9 @@
getAlbumInfo();
getAlbumArt();
initActions();
setTimeout(function(){
initFancybox();
},1000);
$('#track_table').dataTable({
"aaSorting": [],
@@ -154,8 +158,6 @@
"bPaginate": false
});
});
$(window).load(function(){
initFancybox();
});
</script>
</%def>

View File

@@ -27,7 +27,7 @@
<%def name="body()">
<div id="artistheader" class="clearfix">
<div id="artistImg">
<img id="artistImg" class="albumArt" alt="${artist['ArtistName']}"/>
<img id="artistImage" class="albumArt" alt="${artist['ArtistName']}" height="200" />
</div>
<h1>
%if artist['Status'] == 'Loading':
@@ -109,7 +109,7 @@
%>
<tr class="grade${grade}">
<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="reldate">${album['ReleaseDate']}</td>
<td id="type">${album['Type']}</td>
@@ -151,10 +151,11 @@
function getArtistArt() {
var id = "${artist['ArtistID']}";
var image = $("div#artistImg img#artistImg");
var name = "${artist['ArtistName']}";
var image = $("div#artistImg img#artistImage");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtwork(image,id,'artist');
getArtwork(image,id,name,'artist');
}
}
@@ -220,10 +221,6 @@
initActions();
initThisPage();
});
$(window).load(function(){
setTimeout(function(){
initFancybox();
},1000)
});
</script>
</%def>

View File

@@ -17,12 +17,12 @@ function getThumb(imgElem,id,type) {
var imageUrl = data;
}
$(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' ) {
var artworkURL = "getArtwork?ArtistID=" + id;
@@ -40,8 +40,8 @@ function getArtwork(imgElem,id,type) {
else {
var imageUrl = data;
}
$(imgElem).attr("src",imageUrl).removeAttr("width").removeAttr("height").hide().fadeIn();
$(imgElem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
$(imgElem).attr("src",imageUrl).hide().fadeIn();
$(imgElem).wrap('<a href="'+ imageUrl +'" rel="dialog" title="' + name + '"></a>');
}
});
}