From 36b66dccb60a7d65724da542f9d7a2d6722fc6aa Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Thu, 22 Jul 2010 22:41:45 -0700 Subject: ajaxify the wall poster --- view/jot-header.tpl | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'view/jot-header.tpl') diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 97e30cdae..3f8fe5302 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -27,16 +27,28 @@ tinyMCE.init({ var uploader = new window.AjaxUpload( 'wall-image-upload', { action: 'wall_upload', - name: 'userfile', - onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); - } + name: 'userfile', + onSubmit: function(file,ext) { $('#profile-rotator').show(); }, + onComplete: function(file,response) { + tinyMCE.execCommand('mceInsertRawHTML',false,response); + $('#profile-rotator').hide(); + } } ); }); + function jotGetLink() { + reply = prompt("Please enter a link URL:"); + $('#profile-rotator').show(); + $.get('parse_url?url=' + reply, function(data) { + tinyMCE.execCommand('mceInsertRawHTML',false,data); + $('#profile-rotator').hide(); + }); + } + +