From c5d27c48f5d5e45d119ccf133ebc42678deb8e38 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Jan 2012 20:43:38 -0800 Subject: more title stuff --- view/theme/testbubble/jot-header.tpl | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'view/theme/testbubble/jot-header.tpl') diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl index dba6cfd2b..bf3b3cbe7 100644 --- a/view/theme/testbubble/jot-header.tpl +++ b/view/theme/testbubble/jot-header.tpl @@ -124,11 +124,30 @@ function initEditor(cb) { initEditor(); }); - $("#jot-title-desc").click(function() { - $("#jot-title-desc").hide(); - $("#jot-title").show(); - }); + $("#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(); + } + }); + + $("#jot-title-display").click(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', -- cgit v1.2.3