]> git.mxchange.org Git - friendica.git/commitdiff
better title handling (duepuntozero only at this time)
authorfriendica <info@friendica.com>
Thu, 5 Jan 2012 04:09:14 +0000 (20:09 -0800)
committerfriendica <info@friendica.com>
Thu, 5 Jan 2012 04:09:14 +0000 (20:09 -0800)
view/jot-header.tpl

index f35cbee17579fdfd67eeaaba34bf0de99336c742..829629f449bb10999149eb1d357aeac8b66754f9 100644 (file)
@@ -103,6 +103,8 @@ function initEditor(cb){
 <script type="text/javascript" src="js/ajaxupload.js" ></script>
 <script>
        var ispublic = '$ispublic';
+       var addtitle = '$addtitle';
+
        $(document).ready(function() {
                
                /* enable tinymce on focus */
@@ -112,9 +114,17 @@ function initEditor(cb){
                        initEditor();
                });
 
+               $("#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-desc").click(function() {
                        $("#jot-title-desc").hide();
                        $("#jot-title").show();
+                       $("#jot-title").focus();
                });             
        
                var uploader = new window.AjaxUpload(