diff options
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 916e35419c1..294223aa094 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -7,8 +7,12 @@ function fileDownloadPath(dir, file) { return url; } +var form_data; + $(document).ready(function() { + $('#data-upload-form').tipsy({gravity:'ne', fade:true}); + if (typeof FileActions !== 'undefined') { var mimetype = $('#mimetype').val(); // Show file preview if previewer is available, images are already handled by the template @@ -46,4 +50,19 @@ $(document).ready(function() { }); } -});
\ No newline at end of file + // Add some form data to the upload handler + file_upload_param.formData = { + MAX_FILE_SIZE: $('#uploadMaxFilesize').val(), + requesttoken: $('#publicUploadRequestToken').val(), + dirToken: $('#dirToken').val(), + appname: 'files_sharing', + subdir: $('input#dir').val() + }; + + // Add Uploadprogress Wrapper to controls bar + $('#controls').append($('#additional_controls div#uploadprogresswrapper')); + + // Cancel upload trigger + $('#cancel_upload_button').click(Files.cancelUploads); + +}); |