bit more improvement on dynamic title
authorfriendica <info@friendica.com>
Thu, 5 Jan 2012 04:35:32 +0000 (20:35 -0800)
committerfriendica <info@friendica.com>
Thu, 5 Jan 2012 04:35:32 +0000 (20:35 -0800)
view/jot-header.tpl
view/jot.tpl
view/theme/duepuntozero/style.css

index 829629f449bb10999149eb1d357aeac8b66754f9..cd04e05afcc19a93d6c19a099cbb7fa31575746a 100644 (file)
@@ -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) ? "<strong>" + ttl + "</strong>" : 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();
index cb4eb64d43e6a76bf5edabcfd42727be0dd6f827..66621db5eb738b2476e55e8bc2203ee714ed1ddb 100644 (file)
@@ -15,6 +15,7 @@
                <input type="hidden" name="post_id" value="$post_id" />
                <div id="jot-title-wrapper">
                <span id="jot-title-desc" style="display: none;">$addtitle</span>
+               <span id="jot-title-display" style="display: none;"></span>
                <input type="text" name="title" id="jot-title" value="" style="display: none;" />
                </div>
 
index f3c0e7a90b7f83a022a732da00789ec2495b0c06..6ce4c52c05e768dfdf5c1415b89c54c04e2018ae 100644 (file)
@@ -276,6 +276,9 @@ div.wall-item-content-wrapper.shiny {
 #jot-title-wrapper {
        margin-bottom: 5px;
 }
+#jot-title-display {
+       font-weight: bold;
+}
 
 #jot-title {
        border: 1px solid #cccccc;