From 7a069c1438eb0c6b84e9e93985722a34b4bca4e1 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 20 Jul 2011 11:08:42 +0200 Subject: Load tinyMCE on post editor only if needed. --- view/jot-header.tpl | 137 +++++++++++++++++++++----------------- view/jot.tpl | 6 +- view/theme/duepuntozero/style.css | 7 ++ view/theme/loozah/style.css | 7 ++ 4 files changed, 93 insertions(+), 64 deletions(-) (limited to 'view') diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 7e7e393ac..061f6a71d 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -1,68 +1,79 @@ @@ -70,11 +81,13 @@ tinyMCE.init({ var ispublic = '$ispublic'; $(document).ready(function() { - $("#profile-jot-acl-wrapper").hide(); - $("a#jot-perms-icon").fancybox({ - 'transitionIn' : 'none', - 'transitionOut' : 'none' - }); + /* enable tinymce on focus */ + $("#profile-jot-text").focus(function(){ + if (editor) return; + $(this).val(""); + initEditor(); + }); + var uploader = new window.AjaxUpload( 'wall-image-upload', diff --git a/view/jot.tpl b/view/jot.tpl index 43c20b90e..aa9892cbb 100644 --- a/view/jot.tpl +++ b/view/jot.tpl @@ -15,10 +15,12 @@ - + + + {{ if $content }}{{ endif }} -
+