aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/msg-header.tpl
diff options
context:
space:
mode:
authorAndrew Manning <andrewmanning@grid.reticu.li>2017-08-05 11:24:03 +0000
committerAndrew Manning <andrewmanning@grid.reticu.li>2017-08-05 11:24:03 +0000
commit03ca0bfa696a76e20ac00525676c9943a25b0370 (patch)
treeec838248a1be34522ce698210c57169180261442 /view/tpl/msg-header.tpl
parentba62f144823fd2ee31e3c19eb2c1cb10782c9184 (diff)
parenta618f70f56efdcaaf9da6dcfcab9cce6a933303b (diff)
downloadvolse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.tar.gz
volse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.tar.bz2
volse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into doco
Diffstat (limited to 'view/tpl/msg-header.tpl')
-rwxr-xr-xview/tpl/msg-header.tpl53
1 files changed, 25 insertions, 28 deletions
diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl
index 013e1cfdc..0e8fb0389 100755
--- a/view/tpl/msg-header.tpl
+++ b/view/tpl/msg-header.tpl
@@ -1,34 +1,31 @@
-<script type="text/javascript" src="view/js/ajaxupload.js" ></script>
-<script language="javascript" type="text/javascript">
-
- $("#prvmail-text").editor_autocomplete(baseurl+"/acl");
-
-
+<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>
+<script>
$(document).ready(function() {
- var file_uploader = new window.AjaxUpload(
- 'prvmail-attach-wrapper',
- { action: 'wall_attach/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#prvmail-rotator').spin('tiny'); },
- onComplete: function(file,response) {
- addmailtext(response);
- $('#prvmail-rotator').spin(false);
- }
- }
- );
+ $("#prvmail-text").editor_autocomplete(baseurl+"/acl");
+
+ $('#invisible-wall-file-upload').fileupload({
+ url: 'wall_attach/{{$nickname}}',
+ dataType: 'json',
+ dropZone: $('#prvmail-text'),
+ maxChunkSize: 4 * 1024 * 1024,
+ add: function(e,data) {
+ $('#prvmail-rotator').spin('tiny');
+ data.submit();
+ },
+ done: function(e,data) {
+ addmailtext(data.result.message);
+ $('#jot-media').val($('#jot-media').val() + data.result.message);
+ },
+ stop: function(e,data) {
+ $('#prvmail-rotator').spin(false);
+ },
+ });
- var file_uploader_sub = new window.AjaxUpload(
- 'prvmail-attach-sub',
- { action: 'wall_attach/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#prvmail-rotator').spin('tiny'); },
- onComplete: function(file,response) {
- addmailtext(response);
- $('#prvmail-rotator').spin(false);
- }
- }
- );
+ $('#prvmail-attach-wrapper').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
+ $('#prvmail-attach-wrapper-sub').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
});