]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/jot-header.tpl
Merge pull request #2353 from shtrom/issue757-https-reverse-proxy-headers-on-develop
[friendica.git] / view / theme / frio / templates / jot-header.tpl
index 5b826f45e2f41d06e59dedb098ff9f12de4b3578..6d481451185c6c8aa9cdf633599141df742ebb56 100644 (file)
@@ -283,23 +283,11 @@ function enableOnUser(){
        }
 
        function jotShare(id) {
-//             if ($('#jot-popup').length != 0) $('#jot-popup').show();
-//
-//             $('#like-rotator-' + id).show();
-//             $.get('share/' + id, function(data) {
-//                     if (!editor) $("#profile-jot-text").val("");
-//                     initEditor(function(){
-//                             addeditortext(data);
-//                             $('#like-rotator-' + id).hide();
-//                             $(window).scrollTop(0);
-//                     });
-//
-//             });
-
                $.get('share/' + id, function(data) {
-                       if (!editor) $("#profile-jot-text").val("");
+                       // remove the former content of the text input
+                       $("#profile-jot-text").val("");
                        initEditor(function(){
-                       addeditortext(data);
+                               addeditortext(data);
                        });
                });
 
@@ -399,18 +387,11 @@ function enableOnUser(){
 
        function jotShow() {
                var modal = $('#jot-modal').modal();
-               var jot = $("#profile-jot-form");
-
-               // Clear bs modal on close
-               // We need this to prevent that the modal displays old content
-               $('body').on('hidden.bs.modal', '#jot-modal', function () {
-                       $(this).removeData('bs.modal');
-                       $("#jot-content").append(jot);
-               });
+               jotcache = $("#profile-jot-form");
 
                modal
                        .find('#jot-modal-body')
-                       .append(jot)
+                       .append(jotcache)
                        .modal.show
                        ;
        }