Add files extension to gallery URL

This allows to have extensions in the zip package.

Plus do not add to the gallery URL if file is an xcf (gimp) in order to
prevent zip generation fail.
This commit is contained in:
Luc Didry
2016-06-08 21:47:44 +02:00
parent 453bc5d2c5
commit e8eb804d3c
+6 -2
View File
@@ -199,7 +199,9 @@
$('.messages').append(buildMessage(data.success, data.msg));
$('#del-'+data.msg.real_short).on('click', delImage);
if (data.success) {
addToShortHash(data.msg.short);
if (data.msg.ext !== 'xcf') {
addToShortHash(data.msg.short+'.'+data.msg.ext);
}
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
$('input[type=\'text\']').unbind("click", selectInput);
@@ -238,7 +240,9 @@
$('.messages').prepend('<div class="col-xs-12 col-sm-11 col-sm-offset-1"><a id="copy-all" href="#" class="btn btn-info" onClick="copyAllToClipboard();"><%= l('Copy all view links to clipboard') %></a></div>');
}
$('#lutim-file-url').val('');
addToShortHash(data.msg.short);
if (data.msg.ext !== 'xcf') {
addToShortHash(data.msg.short+'.'+data.msg.ext);
}
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);