Commit 8daef838 authored by Luc Didry's avatar Luc Didry
Browse files

Fix #66

This commit is dedicated to Squeeek, who is supporting me with Ǧ1.
Many thanks :-)
parent 883004b7
Pipeline #42111 passed with stages
in 5 minutes and 11 seconds
......@@ -68,7 +68,7 @@ msgstr ""
msgid "Click to open the file browser"
msgstr ""
#: themes/default/templates/gallery.html.ep:26
#: themes/default/templates/gallery.html.ep:27
msgid "Close (Esc)"
msgstr ""
......@@ -112,7 +112,7 @@ msgstr ""
msgid "Deletion link"
msgstr ""
#: themes/default/templates/gallery.html.ep:6
#: themes/default/templates/gallery.html.ep:8
msgid "Download all images"
msgstr ""
......@@ -264,7 +264,7 @@ msgstr ""
msgid "My images"
msgstr ""
#: themes/default/templates/gallery.html.ep:42
#: themes/default/templates/gallery.html.ep:43
msgid "Next (arrow right)"
msgstr ""
......@@ -293,7 +293,7 @@ msgstr ""
msgid "Please contact the administrator: %1"
msgstr ""
#: themes/default/templates/gallery.html.ep:40
#: themes/default/templates/gallery.html.ep:41
msgid "Previous (arrow left)"
msgstr ""
......@@ -309,7 +309,7 @@ msgstr ""
msgid "Share it!"
msgstr ""
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/gallery.js.ep:211 themes/default/templates/partial/lutim.js.ep:175
msgid "Something bad happened"
msgstr ""
......@@ -397,7 +397,7 @@ msgstr ""
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr ""
#: themes/default/templates/gallery.html.ep:27
#: themes/default/templates/gallery.html.ep:28
msgid "Toggle fullscreen"
msgstr ""
......@@ -479,7 +479,7 @@ msgstr ""
msgid "You can, optionally, request that the image(s) posted on Lutim to be deleted at first view (or download) or after the delay selected from those proposed."
msgstr ""
#: themes/default/templates/gallery.html.ep:28
#: themes/default/templates/gallery.html.ep:29
msgid "Zoom in/out"
msgstr ""
......
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
<div class="container">
<div>
<div class="row" id="infos-msg">
</div>
<div class="row">
<p>
<a href="<%= url_for('/zip?i=') %>" id="download-all" class="btn btn-info col-sm-12">
<%= l('Download all images') %>
</a>
</p>
</div>
</div>
<div class="container">
<div class="gallery" itemscope itemtype="http://schema.org/ImageGallery">
</div>
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="<%= l('Close (Esc)') %>"></button>
<button class="pswp__button pswp__button--fs" title="<%= l('Toggle fullscreen') %>"></button>
<button class="pswp__button pswp__button--zoom" title="<%= l('Zoom in/out') %>"></button>
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
<div class="row">
<div class="gallery" itemscope itemtype="http://schema.org/ImageGallery">
</div>
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="<%= l('Close (Esc)') %>"></button>
<button class="pswp__button pswp__button--fs" title="<%= l('Toggle fullscreen') %>"></button>
<button class="pswp__button pswp__button--zoom" title="<%= l('Zoom in/out') %>"></button>
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="<%= l('Previous (arrow left)') %>">
</button>
<button class="pswp__button pswp__button--arrow--right" title="<%= l('Next (arrow right)') %>">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="<%= l('Previous (arrow left)') %>">
</button>
<button class="pswp__button pswp__button--arrow--right" title="<%= l('Next (arrow right)') %>">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
......
......@@ -92,6 +92,7 @@
%= javascript '/js/jszip.min.js'
%= javascript '/js/FileSaver.min.js'
%= javascript '/partial/gallery.js'
%= javascript '/partial/lutim.js'
% }
% if (current_route 'myfiles') {
%= javascript '/partial/common.js'
......
......@@ -204,6 +204,16 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
}
};
function addAlert(e) {
$('#infos-msg').append([
'<div class="alert alert-danger">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>',
'<strong><%= l('Something bad happened') %></strong><br>',
cleanName(e, false),
'</div>'
].join(''));
}
function addElement(keys) {
element = keys.shift();
if (!element.match('xcf')) {
......@@ -222,6 +232,8 @@ function addElement(keys) {
'</figure>'
].join('')
);
} else {
addAlert(data.msg);
}
},
complete: function() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment