diff options
Diffstat (limited to 'view/tpl/msg-header.tpl')
-rwxr-xr-x | view/tpl/msg-header.tpl | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/view/tpl/msg-header.tpl b/view/tpl/msg-header.tpl index 013e1cfdc..d71d432fb 100755 --- a/view/tpl/msg-header.tpl +++ b/view/tpl/msg-header.tpl @@ -1,34 +1,32 @@ -<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); - } - } - ); - - 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-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').show(); + data.submit(); + }, + done: function(e,data) { + addmailtext(data.result.message); + $('#jot-media').val($('#jot-media').val() + data.result.message); + }, + stop: function(e,data) { + preview_mail(); + $('#prvmail-rotator').hide(); + }, + }); + + $('#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;}); }); @@ -36,10 +34,11 @@ function prvmailJotGetLink() { reply = prompt("{{$linkurl}}"); if(reply && reply.length) { - $('#prvmail-rotator').spin('tiny'); + $('#prvmail-rotator').show(); $.get('linkinfo?f=&url=' + reply, function(data) { addmailtext(data); - $('#prvmail-rotator').spin(false); + preview_mail(); + $('#prvmail-rotator').hide(); }); } } @@ -62,10 +61,11 @@ event.target.textContent = reply; event.preventDefault(); if(reply && reply.length) { - $('#prvmail-rotator').spin('tiny'); + $('#prvmail-rotator').show(); $.get('linkinfo?f=&url=' + reply, function(data) { addmailtext(data); - $('#prvmail-rotator').spin(false); + preview_mail(); + $('#prvmail-rotator').hide(); }); } } |