Skip to content

Commit

Permalink
Fix photos not loading in admin overview
Browse files Browse the repository at this point in the history
Caused by the additional `/en/` or `/nl/` on direct access to the
files.
  • Loading branch information
tomudding committed Sep 8, 2023
1 parent dccb961 commit 597b214
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/js/photo-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Photo.Admin.loadPage = function (resource) {
href = URLHelper.url('admin_photo/album_index', {'album_id': album.id});
$("#album").append('<div class="col-lg-3 col-md-4 col-xs-6 thumb">'
+ '<a class="thumbnail" href="' + href + '">'
+ '<img class="img-responsive" src="' + URLHelper.url('home') + 'data/' + album.coverPath + '" alt="">'
+ '<img class="img-responsive" src="/data/' + album.coverPath + '" alt="">'
+ album.name
+ '</a>'
+ '</div>');
Expand All @@ -33,7 +33,7 @@ Photo.Admin.loadPage = function (resource) {
$("#album").append('<div class="col-lg-3 col-md-4 col-xs-6 thumb">'
+ '<div class="thumbnail">'
+ '<a href="' + href + '">'
+ '<img class="img-responsive" src="' + URLHelper.url('home') + 'data/' + photo.smallThumbPath + '" alt="">'
+ '<img class="img-responsive" src="/data/' + photo.smallThumbPath + '" alt="">'
+ '</a>'
+ '<input type="checkbox" class="thumbnail-checkbox">'
+ '</div>'
Expand Down Expand Up @@ -86,7 +86,7 @@ Photo.Admin.regenerateCover = function () {
$("#coverSpinner").show();
$.post(URLHelper.url('admin_photo/album_cover', {'album_id': Photo.Admin.activeData.album.id}), function (data) {
if (data.success) {
$("#coverPreview").attr('src', URLHelper.url('home') + 'data/' + data.coverPath);
$("#coverPreview").attr('src', '/data/' + data.coverPath);
$("#coverSpinner").hide();
$("#coverPreview").show();
} else {
Expand Down

0 comments on commit 597b214

Please sign in to comment.