]> git.mxchange.org Git - friendica.git/blobdiff - view/jot-header.tpl
move js to js folder
[friendica.git] / view / jot-header.tpl
index 8e671a0b3d55aebfc9009c0e764530392fcb63c5..8174026abbdf4071e769e82862dac8140b72fad1 100644 (file)
@@ -11,6 +11,7 @@ function initEditor(cb){
                        theme : "advanced",
                        mode : "specific_textareas",
                        editor_selector: /(profile-jot-text|prvmail-text)/,
+                       auto_focus: "profile-jot-text",
                        plugins : "bbcode,paste,autoresize",
                        theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
                        theme_advanced_buttons2 : "",
@@ -79,7 +80,7 @@ function initEditor(cb){
 }
 
 </script>
-<script type="text/javascript" src="include/ajaxupload.js" ></script>
+<script type="text/javascript" src="js/ajaxupload.js" ></script>
 <script>
        var ispublic = '$ispublic';
        $(document).ready(function() {
@@ -187,8 +188,8 @@ function initEditor(cb){
 
        function jotShare(id) {
                $('#like-rotator-' + id).show();
-                       
                $.get('share/' + id, function(data) {
+                       if (!editor) $("#profile-jot-text").val("");
                        initEditor(function(){
                                tinyMCE.execCommand('mceInsertRawHTML',false,data);
                                $('#like-rotator-' + id).hide();
@@ -211,8 +212,11 @@ function initEditor(cb){
                if(reply && reply.length) {
                        $('#profile-rotator').show();
                        $.get('parse_url?url=' + reply, function(data) {
-                               tinyMCE.execCommand('mceInsertRawHTML',false,data);
-                               $('#profile-rotator').hide();
+                               if (!editor) $("#profile-jot-text").val("");
+                               initEditor(function(){
+                                       tinyMCE.execCommand('mceInsertRawHTML',false,data);
+                                       $('#profile-rotator').hide();
+                               });
                        });
                }
        }