]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/dispy/jot-header.tpl
move js to js folder
[friendica.git] / view / theme / dispy / jot-header.tpl
index 5401f92ddb982410817a07a89289b5811128b24e..0093bf82a85b48bfa7323b6a5704864d47f6a09d 100644 (file)
@@ -90,7 +90,7 @@ function initEditor(cb) {
     }
 } // initEditor
 </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() {
@@ -209,11 +209,12 @@ function initEditor(cb) {
        function jotShare(id) {
                $('#like-rotator-' + id).show();
                $.get('share/' + id, function(data) {
-                    initEditor(function(){
-                        tinyMCE.execCommand('mceInsertRawHTML',false,data);
-                        $('#like-rotator-' + id).hide();
-                        $(window).scrollTop(0);
-                    })
+                               if (!editor) $("#profile-jot-text").val("");
+                               initEditor(function(){
+                                       tinyMCE.execCommand('mceInsertRawHTML',false,data);
+                                       $('#like-rotator-' + id).hide();
+                                       $(window).scrollTop(0);
+                               });
                });
        }
 
@@ -230,8 +231,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();
+                               });
                        });
                }
        }