From 73b4faca5c7af506558eba6b7317d23551f1aefa Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 24 May 2011 22:40:52 -0700 Subject: basic file upload/attach --- view/jot-header.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'view/jot-header.tpl') diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 3057618b2..77e5bc4bc 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -79,6 +79,18 @@ tinyMCE.init({ } } ); + var file_uploader = new window.AjaxUpload( + 'wall-file-upload', + { action: 'wall_attach/$nickname', + name: 'userfile', + onSubmit: function(file,ext) { $('#profile-rotator').show(); }, + onComplete: function(file,response) { + tinyMCE.execCommand('mceInsertRawHTML',false,response); + $('#profile-rotator').hide(); + } + } + ); + $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { -- cgit v1.2.3