diff options
Diffstat (limited to 'view/jot-header.tpl')
-rw-r--r-- | view/jot-header.tpl | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 1a9016f5d..352c48647 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -82,7 +82,7 @@ function initEditor(cb){ ed.onInit.add(function(ed) { ed.pasteAsPlainText = true; $("#profile-jot-text-loading").hide(); - $("#profile-jot-submit-wrapper").show(); + $(".jothidden").show(); if (typeof cb!="undefined") cb(); }); @@ -99,6 +99,12 @@ function initEditor(cb){ } } +function enableOnUser(){ + if (editor) return; + $(this).val(""); + initEditor(); +} + </script> <script type="text/javascript" src="js/ajaxupload.js" ></script> <script> @@ -107,36 +113,10 @@ function initEditor(cb){ $(document).ready(function() { - /* enable tinymce on focus */ - $("#profile-jot-text").focus(function(){ - if (editor) return; - $(this).val(""); - initEditor(); - }); - - $("#jot-title").mouseout(function() { - $("#jot-title").hide(); - var ttl = $("#jot-title").val(); - $('#jot-title-display').html(ttl); - if(ttl.length) { - $("#jot-title-display").show(); - } - else { - $("#jot-title-desc").show(); - } - }); + /* enable tinymce on focus and click */ + $("#profile-jot-text").focus(enableOnUser); + $("#profile-jot-text").click(enableOnUser); - $("#jot-title-display").hover(function() { - $("#jot-title-display").hide(); - $("#jot-title").show(); - $("#jot-title").focus(); - }); - - $("#jot-title-desc").click(function() { - $("#jot-title-desc").hide(); - $("#jot-title").show(); - $("#jot-title").focus(); - }); var uploader = new window.AjaxUpload( 'wall-image-upload', |