]> git.mxchange.org Git - friendica.git/commitdiff
Remove "share" greyed text in jot editor when user reshare an item
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 25 Jul 2011 06:56:51 +0000 (08:56 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 25 Jul 2011 06:56:51 +0000 (08:56 +0200)
view/jot-header.tpl
view/theme/dispy/jot-header.tpl

index 8e671a0b3d55aebfc9009c0e764530392fcb63c5..795267ee30d925b9e6e071b12cbd9690bae67c3d 100644 (file)
@@ -187,8 +187,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 +211,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();
+                               });
                        });
                }
        }
index 5401f92ddb982410817a07a89289b5811128b24e..1555950561a56e94d0cd30105949c16a4fc085c9 100644 (file)
@@ -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();
+                               });
                        });
                }
        }