Merge in elmarkou's changes

This commit is contained in:
rembo10
2012-06-26 19:02:02 +05:30
parent 1f397857c6
commit 05cc10df1a
9 changed files with 45 additions and 28 deletions

View File

@@ -26,7 +26,7 @@
<div class="table_wrapper">
<div id="albumheader" class="clearfix">
<div id="albumImg">
<img id="albumImg" height="200" width="200" alt="albumart" class="albumArt" rel="dialog">
<img height="200" alt="" class="albumArt">
</div>
<h1><a href="http://musicbrainz.org/release-group/${album['AlbumID']}">${album['AlbumTitle']}</a></h1>
@@ -130,7 +130,7 @@
function getAlbumArt() {
var id = "${album['AlbumID']}";
var name = "${album['AlbumTitle']}";
var image = $("div#albumImg img#albumImg");
var image = $("div#albumImg img");
if ( !image.hasClass('done') ) {
image.addClass('done');
getArtwork(image,id,name,'album');

View File

@@ -27,7 +27,7 @@
<%def name="body()">
<div id="artistheader" class="clearfix">
<div id="artistImg">
<img id="artistImage" class="albumArt" alt="${artist['ArtistName']}" height="200" />
<img id="artistImage" class="albumArt" alt="" />
</div>
<h1>
%if artist['Status'] == 'Loading':
@@ -214,7 +214,7 @@
resetFilters("albums");
setTimeout(function(){
initFancybox();
},1000);
},1500)
}
$(document).ready(function() {

View File

@@ -158,6 +158,8 @@ img.albumArt {
float: left;
min-height: 100%;
min-width: 100%;
max-width: 300px;
max-height: 300px;
position: relative;
}
.title {
@@ -750,12 +752,6 @@ div#searchbar .mini-icon {
margin-left: 6px;
margin-top: 6px;
}
a#vipserver {
margin-left: 100px;
color: blue;
size: 95%;
font-weight: bold;
}
.configtable legend {
font-size: 16px;
font-weight: bold;
@@ -1363,6 +1359,12 @@ div#artistheader h3 span {
text-align: center;
vertical-align: middle;
}
#upcoming_table td#albumart img,
#wanted_table td#albumart img {
background: #FFF;
border: 1px solid #ccc;
padding: 3px;
}
#upcoming_table th#albumart,
#wanted_table th#albumart {
min-width: 50px;

View File

@@ -84,6 +84,8 @@ img {
float: left;
min-height: 100%;
min-width: 100%;
max-width: 250px;
max-height: 300px;
position: relative;
}
}
@@ -1083,6 +1085,15 @@ div#albumheader .albuminfo li span, div#artistheader h3 span {
text-align: center;
vertical-align: middle;
}
#upcoming_table, #wanted_table {
td#albumart {
img {
background: #FFF;
border: 1px solid #ccc;
padding: 3px;
}
}
}
#upcoming_table th#albumart, #wanted_table th#albumart {
min-width: 50px;
text-align: center;

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -53,7 +53,7 @@
%>
<tr class="grade${grade}">
<td id="albumart"><div id="artistImg"><img class="albumArt"/></div></td>
<td id="albumart"><div id="artistImg"><img class="albumArt" alt=""/></div></td>
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}" title="${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>

View File

@@ -2,8 +2,10 @@ function getThumb(imgElem,id,type) {
if ( type == 'artist' ) {
var thumbURL = "getThumb?ArtistID=" + id;
// var imgURL = "getArtwork?ArtistID=" + id;
} else {
var thumbURL = "getThumb?AlbumID=" + id;
// var imgURL = "getArtwork?AlbumID=" + id;
}
// Get Data from the cache by Artist ID
$.ajax({
@@ -15,9 +17,9 @@ function getThumb(imgElem,id,type) {
}
else {
var imageUrl = data;
}
}
$(imgElem).attr("src",imageUrl).hide().fadeIn();
// $(imgElem).wrap('<a href="'+ imageLarge +'" rel="dialog" title="' + name + '"></a>');
// $(imgElem).wrap('<a href="'+ imgURL +'" rel="dialog" title="' + name + '"></a>');
}
});
}
@@ -34,12 +36,12 @@ function getArtwork(imgElem,id,name,type) {
url: artworkURL,
cache: true,
success: function(data){
if ( data == "" ) {
if ( data == "" || data == undefined ) {
var imageUrl = "interfaces/default/images/no-cover-artist.png";
}
else {
var imageUrl = data;
}
}
$(imgElem).attr("src",imageUrl).hide().fadeIn();
$(imgElem).wrap('<a href="'+ imageUrl +'" rel="dialog" title="' + name + '"></a>');
}
@@ -78,20 +80,23 @@ function getImageLinks(elem,id,type) {
cache: true,
dataType: "json",
success: function(data){
var thumbnail = data.thumbnail;
var artwork = data.artwork;
if ( data.thumbnail == "" || data.thumbnail == undefined ) {
var thumbnail = "interfaces/default/images/no-cover-artist.png";
}
else {
var thumbnail = data.thumbnail;
}
if ( data.artwork == "" || data.artwork == undefined ) {
var artwork = "interfaces/default/images/no-cover-artist.png";
}
else {
var artwork = data.artwork;
}
$(elem).attr("src", thumbnail);
}
});
}
function getOriginalWidthOfImg(img_element) {
var t = new Image();
t.src = (img_element.getAttribute ? img_element.getAttribute("src") : false) || img_element.src;
return t.width;
}
function initHeader() {
//settings
var header = $("#container header");
@@ -339,7 +344,7 @@ function initFancybox() {
if ( $("a[rel=dialog]").length > 0 ) {
$.getScript('interfaces/default/js/fancybox/jquery.fancybox-1.3.4.js', function() {
$("head").append("<link rel='stylesheet' href='interfaces/default/js/fancybox/jquery.fancybox-1.3.4.css'>");
$("a[rel=dialog]").fancybox();
$("a[rel=dialog]").fancybox({});
});
}
}

View File

@@ -40,7 +40,7 @@
%for album in wanted:
<tr class="gradeZ">
<td id="select"><input type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
<td id="albumart"><img title="${album['AlbumID']}" height="50" width="50"></td>
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64"></td>
<td id="artistname">${album['ArtistName']}</td>
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>
@@ -70,7 +70,7 @@
<tbody>
%for album in upcoming:
<tr class="gradeZ">
<td id="albumart"><img title="${album['AlbumID']}" height="50" width="50"></td>
<td id="albumart"><img title="${album['AlbumID']}" height="64" width="64"></td>
<td id="artistname">${album['ArtistName']}</td>
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>