posts: fix tagged filenames disappearing after viewing original.
The file url in the data attributes on the image container doesn't contain the tags for performance reasons. The post data attributes are used for thumbnails too and we don't want to include tagged filenames for those because it requires looking up tag categories, which triggers a lot of redis calls on the post index page.
This commit is contained in:
@@ -307,7 +307,7 @@ Post.view_original = function(e) {
|
||||
}
|
||||
|
||||
var $image = $("#image");
|
||||
$image.attr("src", $(".image-container").data("file-url"));
|
||||
$image.attr("src", $(".image-view-original-link").attr("href"));
|
||||
$image.css("filter", "blur(8px)");
|
||||
$image.width($image.data("original-width"));
|
||||
$image.height($image.data("original-height"));
|
||||
@@ -326,7 +326,7 @@ Post.view_large = function(e) {
|
||||
}
|
||||
|
||||
var $image = $("#image");
|
||||
$image.attr("src", $(".image-container").data("large-file-url"));
|
||||
$image.attr("src", $(".image-view-large-link").attr("href"));
|
||||
$image.css("filter", "blur(8px)");
|
||||
$image.width($image.data("large-width"));
|
||||
$image.height($image.data("large-height"));
|
||||
|
||||
Reference in New Issue
Block a user