54 lines
No EOL
1.9 KiB
Text
54 lines
No EOL
1.9 KiB
Text
<div class="container">
|
|
<div class="logout"><a href="/logout">Logout</a></div>
|
|
<div class"upload-form">
|
|
<input id="fileupload" type="file" name="image" data-url="/upload" multiple>
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
<script src="/file_uploader/js/vendor/jquery.ui.widget.js"></script>
|
|
<script src="/file_uploader/js/jquery.iframe-transport.js"></script>
|
|
<script src="/file_uploader/js/jquery.fileupload.js"></script>
|
|
<script>
|
|
$(function () {
|
|
$('#fileupload').fileupload({
|
|
dataType: 'json',
|
|
done: function (e, data) {
|
|
$.each(data.result.files, function (index, file) {
|
|
$('<p/>').text(file.name).appendTo('#lastUploadLog');
|
|
});
|
|
},
|
|
sequentialUploads: true,
|
|
progressall: function (e, data) {
|
|
var progress = parseInt(data.loaded / data.total * 100, 10);
|
|
$('#progress .bar').css(
|
|
'width',
|
|
progress + '%'
|
|
);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
<div id="progress">
|
|
<div class="bar" style="width: 0%;"></div>
|
|
</div>
|
|
<div id="lastUploadLog"></div>
|
|
</div>
|
|
|
|
<!-- display images from server -->
|
|
<div class="container">
|
|
<div class="row">
|
|
<% foreach my $image (@$images) { %>
|
|
<div class="foto-block col-md-3">
|
|
<div class="image">
|
|
<img src="<%= "/$image_base/$user_id/$thumbs_size/$image" %>">
|
|
</div>
|
|
<div class="foto-notes">
|
|
<a href='<%= "/$image_base/$user_id/$orig/$image" %>'>Image original</a>
|
|
<% for my $scale (@$scales) { %>
|
|
<a href='<%= "/$image_base/$user_id/$scale/$image" %>'><%= $scale %></a>
|
|
<% } %>
|
|
</div>
|
|
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div> |