From 7c5e964581480902d7f0571ff92936beda36f4e2 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Wed, 5 Sep 2018 18:24:04 +0200 Subject: [PATCH] Frio - fix missing modal for editing albums --- view/theme/frio/js/mod_photos.js | 7 +++++++ view/theme/frio/templates/album_edit.tpl | 23 ++++++++++++----------- view/theme/frio/templates/photo_album.tpl | 4 ++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/view/theme/frio/js/mod_photos.js b/view/theme/frio/js/mod_photos.js index b8d03b5db9..77173385b1 100644 --- a/view/theme/frio/js/mod_photos.js +++ b/view/theme/frio/js/mod_photos.js @@ -15,7 +15,14 @@ $(document).ready(function() { }).trigger('change'); + // Click event listener for the album edit link/button. + $("body").on('click', '#album-edit-link', function() { + var modalUrl = $(this).attr("data-modal-url"); + if (typeof modalUrl !== "undefined") { + addToModal(modalUrl, 'photo-album-edit-wrapper'); + } + }); }); $(window).load(function() { diff --git a/view/theme/frio/templates/album_edit.tpl b/view/theme/frio/templates/album_edit.tpl index 583eb6d1b7..f4a60b7d03 100644 --- a/view/theme/frio/templates/album_edit.tpl +++ b/view/theme/frio/templates/album_edit.tpl @@ -1,14 +1,15 @@
-
- -
- -
- -
- - -
-
+
+ +
+ +
+ +
+ + +
+
+
diff --git a/view/theme/frio/templates/photo_album.tpl b/view/theme/frio/templates/photo_album.tpl index c991b03cfc..235b9c46db 100644 --- a/view/theme/frio/templates/photo_album.tpl +++ b/view/theme/frio/templates/photo_album.tpl @@ -12,9 +12,9 @@ {{if $edit}} - + {{/if}} {{if ! $noorder}}