aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--view/js/mod_cloud.js27
-rw-r--r--view/tpl/cloud.tpl5
2 files changed, 32 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) {
diff --git a/view/tpl/cloud.tpl b/view/tpl/cloud.tpl
index d1567af9f..ccd59d81a 100644
--- a/view/tpl/cloud.tpl
+++ b/view/tpl/cloud.tpl
@@ -1,3 +1,8 @@
+<script src="library/blueimp_upload/js/vendor/jquery.ui.widget.js"></script>
+<script src="library/blueimp_upload/js/jquery.iframe-transport.js"></script>
+<script src="library/blueimp_upload/js/jquery.fileupload.js"></script>
+<input id="invisible-cloud-file-upload" type="file" name="files" style="visibility:hidden;position:absolute;top:-50;left:-50;width:0;height:0;" multiple>
+
<div class="generic-content-wrapper">
{{include file="cloud_header.tpl"}}
{{include file="cloud_directory.tpl"}}