diff options
Diffstat (limited to 'view/js/mod_cloud.js')
-rw-r--r-- | view/js/mod_cloud.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 8af90863e..32aae2029 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -17,6 +17,33 @@ function UploadInit() { var filedrag = $("#cloud-drag-area"); var submit = $("#upload-submit"); + + $('#invisible-cloud-file-upload').fileupload({ + url: 'file_upload', + dataType: 'json', + // dropZone: $('#profile-jot-text'), + maxChunkSize: 4 * 1024 * 1024, + add: function(e,data) { + $('#profile-rotator').show(); + data.submit(); + }, + done: function(e,data) { + addeditortext(data.result.message); + $('#jot-media').val($('#jot-media').val() + data.result.message); + }, + stop: function(e,data) { + preview_post(); + $('#profile-rotator').hide(); + }, + }); + + $('#files-upload').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;}); + + + + + + // is XHR2 available? var xhr = new XMLHttpRequest(); if (xhr.upload) { |