55 lines
1.6 KiB
Twig
55 lines
1.6 KiB
Twig
|
{% extends "base.html.twig" %}
|
||
|
|
||
|
{% block encorelinktags %}
|
||
|
{{ encore_entry_link_tags('dropzone') }}
|
||
|
{% endblock encorelinktags %}
|
||
|
|
||
|
{% block body %}
|
||
|
<h3 class="page-header">Téléchargez vos Planches</h3>
|
||
|
<a class="btn btn-default" onClick="closeModal();">Annuler</a>
|
||
|
|
||
|
<form
|
||
|
action="{{ oneup_uploader_endpoint('webzine') }}"
|
||
|
class="dropzone"
|
||
|
id="mydropzone"
|
||
|
data-acceptedMimeTypes="image/*"
|
||
|
data-resizeWidth:2500,
|
||
|
style="margin-top:10px">
|
||
|
</form>
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block encorescripttags %}
|
||
|
{{ encore_entry_script_tags('dropzone') }}
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block localjavascript %}
|
||
|
function dropzoneinit( elt ) {
|
||
|
}
|
||
|
|
||
|
function dropzonesuccess( file, response ) {
|
||
|
var val = parent.$("#webzine_linkpages").val();
|
||
|
if(val=="")
|
||
|
parent.$("#webzine_linkpages").val(response["file"]);
|
||
|
else
|
||
|
parent.$("#webzine_linkpages").val(val+","+response["file"]);
|
||
|
|
||
|
html="";
|
||
|
html+="<div id='div_"+response["file"].replace(".","")+"'>";
|
||
|
html+="<img id='"+response["file"]+"' src='/{{ appAlias }}/uploads/webzine/thumb_"+response["file"]+"'>";
|
||
|
html+="<br>";
|
||
|
html+="<a style='cursor:pointer' onclick='removeLinkPage(\""+response["file"]+"\")'><i class='fa fa-trash fa-fw'></i></a>";
|
||
|
html+="</div>";
|
||
|
|
||
|
parent.$(".webzinepages").append($(html));
|
||
|
}
|
||
|
|
||
|
function dropzonequeuecomplete(file) {
|
||
|
closeModal();
|
||
|
}
|
||
|
|
||
|
function closeModal() {
|
||
|
window.parent.$("#extraLargeModal").modal('hide');
|
||
|
}
|
||
|
{% endblock %}
|
||
|
|