From dbb59554690d3e77b3816423aab2be610e183cd9 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Jan 2012 20:35:32 -0800 Subject: bit more improvement on dynamic title --- view/jot-header.tpl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'view/jot-header.tpl') diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 829629f44..cd04e05af 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -117,10 +117,21 @@ function initEditor(cb){ $("#jot-title").mouseout(function() { $("#jot-title").hide(); var ttl = $("#jot-title").val(); - $("#jot-title-desc").html((ttl.length) ? "" + ttl + "" : addtitle ); - $("#jot-title-desc").show(); + $('#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(); -- cgit v1.2.3