Archived
1
0
Fork 0

improve image scaling (fixes #59)

* add width and height to AJAX result
 * handle preview image width and height changes
 * improve default_horizontal theme's css to handle vertical images
This commit is contained in:
Jan Dittberner 2009-07-31 19:20:07 +00:00
parent 922d234f11
commit 62d1ba55fe
4 changed files with 43 additions and 27 deletions

View file

@ -56,10 +56,8 @@ function updateContentImage(pathParts) {
"galleryname" : pathParts.gallery
}, function(data, textStatus) {
$("#imagedescription").text(data["label"]);
$("#content_main img").attr("alt", data["label"]);
$("#content_main img").attr("src", data["preview"]);
$("#content_main a").attr("href", data["full"]);
$("#content_main a").attr("title", data["label"]);
$('#content_main img').attr('alt', data.label).attr('src', data.preview[0]).attr('width', data.preview[1]).attr('height', data.preview[2]);
$("#content_main a").attr("href", data["full"]).attr("title", data["label"]);
document.title = data["title"];
}, 'json');
}