]> git.mxchange.org Git - friendica.git/blobdiff - view/jot-header.tpl
Merge pull request #24 from fabrixxm/master
[friendica.git] / view / jot-header.tpl
index 81d7d6d91863fe053a526b3264df8709a0ab3c78..352c48647e04a0032609239b3a36a1d1b6210261 100644 (file)
@@ -7,6 +7,7 @@ var textlen = 0;
 function initEditor(cb){
        if (editor==false){
                $("#profile-jot-text-loading").show();  
+               $("#jot-title-desc").show();
                tinyMCE.init({
                        theme : "advanced",
                        mode : "specific_textareas",
@@ -81,7 +82,7 @@ function initEditor(cb){
                                ed.onInit.add(function(ed) {
                                        ed.pasteAsPlainText = true;
                                        $("#profile-jot-text-loading").hide();
-                                       $("#profile-jot-submit-wrapper").show();
+                                       $(".jothidden").show();
                                        if (typeof cb!="undefined") cb();
                                });
 
@@ -98,19 +99,24 @@ function initEditor(cb){
        }
 }
 
+function enableOnUser(){
+       if (editor) return;
+       $(this).val("");
+       initEditor();
+}
+
 </script>
 <script type="text/javascript" src="js/ajaxupload.js" ></script>
 <script>
        var ispublic = '$ispublic';
+       var addtitle = '$addtitle';
+
        $(document).ready(function() {
                
-               /* enable tinymce on focus */
-               $("#profile-jot-text").focus(function(){
-                       if (editor) return;
-                       $(this).val("");
-                       initEditor();
-               });
-               
+               /* enable tinymce on focus and click */
+               $("#profile-jot-text").focus(enableOnUser);
+               $("#profile-jot-text").click(enableOnUser);
+
        
                var uploader = new window.AjaxUpload(
                        'wall-image-upload',
@@ -235,14 +241,18 @@ function initEditor(cb){
        }
 
        function itemTag(id) {
-               $('#like-rotator-' + id).show();
                reply = prompt("$term");
                if(reply && reply.length) {
                        reply = reply.replace('#','');
                        if(reply.length) {
-                               $.get('tagger/' + id + '?term=' + reply, function(data) {
-                                       $('#like-rotator-' + id).hide();
-                               });
+
+                               commentBusy = true;
+                               $('body').css('cursor', 'wait');
+
+                               $.get('tagger/' + id + '?term=' + reply);
+                               if(timer) clearTimeout(timer);
+                               timer = setTimeout(NavUpdate,3000);
+                               liking = 1;
                        }
                }
        }