4 <p>Please enable JavaScript to use file uploader.</p>
5 <!-- or put a simple form for upload here -->
9 <script type="text/javascript">
11 function createUploader() {
12 uploader = new qq.FileUploader({
13 element: document.getElementById('js_upload'),
14 action: '{{$post_url}}',
16 template: '<div class="qq-uploader">' +
17 '<div class="qq-upload-drop-area"><span>{{$drop_msg}}</span></div>' +
18 '<div class="qq-upload-button">{{$upload_msg}}</div>' +
19 '<ul class="qq-upload-list"></ul>' +
22 // template for one item in file list
23 fileTemplate: '<li>' +
24 '<span class="qq-upload-file"></span>' +
25 '<span class="qq-upload-spinner"></span>' +
26 '<span class="qq-upload-size"></span>' +
27 '<a class="qq-upload-cancel" href="#">{{$cancel}}</a>' +
28 '<span class="qq-upload-failed-text">{{$failed}}</span>' +
32 sizeLimit: {{$maximagesize}},
33 onSubmit: function(id, filename) {
34 let newalbumElm = document.getElementById('photos-upload-newalbum');
35 let albumElm = document.getElementById('photos-upload-album-select');
38 newalbum : newalbumElm ? newalbumElm.value : '',
39 album : albumElm ? albumElm.value : '',
40 not_visible : document.getElementById('photos-upload-noshare').checked,
41 contact_allow : document.querySelector('[name="contact_allow"]').value,
42 group_allow : document.querySelector('[name="group_allow"]').value,
43 contact_deny : document.querySelector('[name="contact_deny"]').value,
44 group_deny : document.querySelector('[name="group_deny"]').value,
50 window.addEventListener('load', createUploader);