replace fileUploader with own implementation

This commit is contained in:
Milan
2018-12-14 21:12:49 +01:00
parent add6c2ab1f
commit 101c192bd3
7 changed files with 121 additions and 459 deletions

View File

@@ -1,8 +1,5 @@
<link type="text/css" href="css/image_manager.css" rel="stylesheet"/>
<link type="text/css" href="css/fileUploader.css" rel="stylesheet"/>
<script src="js/fileUploader.js" type="text/javascript"></script>
<script src="js/image.js" type="text/javascript"></script>
<TMPL_IF .allow.create_image>
<script src="js/image_upload.js" type="text/javascript"></script>
@@ -31,8 +28,6 @@
}
</TMPL_IF>
// show images by default
closeImageUpload();
$('#imageList').show();
}
});
@@ -68,15 +63,6 @@
<!-- upload images -->
<TMPL_IF .allow.create_image>
<div id="image-tabs-upload">
<div id="img_upload">
<div id="img_upload_result"></div>
<form id="image_upload" method="post" action="imageUpload.cgi" enctype="multipart/form-data">
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>">
<input id="uploader" type="file" name="image" value="<TMPL_VAR image escape=0>" accept="text/*" maxlength="1000000" size="10"/> </td>
<button type="submit" name="action" value="upload" id="pxUpload" ><TMPL_VAR .loc.button_upload></button>
</form>
</div>
</div>
</TMPL_IF>
</div>
@@ -96,13 +82,21 @@
<div style="clear:both;display: flex; flex-direction: row;">
<div class="images" style="overflow-y:scroll">
<div class="images"
style="overflow-y:scroll"
target="<TMPL_VAR .target>"
projectId="<TMPL_VAR .project_id>"
studioId="<TMPL_VAR .studio_id>"
seriesId="<TMPL_VAR .series_id>"
eventId="<TMPL_VAR .event_id>"
pid="<TMPL_VAR .pid>"
>
<TMPL_LOOP images>
<div class="image"
id="img_<TMPL_VAR id>"
style="background-image:url('showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR .studio_id>&type=icon&filename=<TMPL_VAR filename>')"
title="<TMPL_VAR description>"
onclick="updateImageEditor(this, '<TMPL_VAR filename>', '<TMPL_VAR .target>', '<TMPL_VAR .project_id>', '<TMPL_VAR .studio_id>', '<TMPL_VAR .series_id>', '<TMPL_VAR .event_id>', '<TMPL_VAR .pid>'); return false;"
filename="<TMPL_VAR filename>"
>
<div class="label"><TMPL_VAR name></div>
</div>
@@ -117,7 +111,8 @@
</TMPL_IF>
</main>
</center>
</body>
</html>