-
Notifications
You must be signed in to change notification settings - Fork 11
/
upload.html
38 lines (33 loc) · 1.4 KB
/
upload.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% extends "admin/change_form.html" %}
{% load i18n admin_modify adminmedia %}
{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="/media/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/media/image_filer/js/jquery.uploadify-v1.6.2/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/media/image_filer/js/jquery.uploadify-v1.6.2/jquery.uploadify.js"></script>
<script type="text/javascript" src="/media/image_filer/js/jquery.cookie.js"></script>
{% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %}
<input type="file" name="fileInput" id="fileInput" />
<script type="text/javascript">
$(document).ready(function() {
$('#fileInput').fileUpload ({
'uploader' : '/media/image_filer/js/jquery.uploadify-v1.6.2/uploader.swf',
'script' : '{% url image_filer-ajax_upload %}',
'cancelImg' : '/media/image_filer/js/jquery.uploadify-v1.6.2/cancel.png',
'auto' : true,
'folder' : '',
'multi' : true,
'buttonText': 'select files',
'simUploadLimit': 1,
'scriptData':{'stuff':'there','jsessionid':$.cookie('sessionid')},
'onAllComplete': function() {setTimeout(closeTheWindow(),1000);}
});
});
function closeTheWindow() {
//alert('going to close the window...');
opener.dismissPopupAndReload(window);
};
</script>
{% comment %}<a href="javascript:window.close()">Cancel</a>{% endcomment %}
{% endblock %}