]> git.mxchange.org Git - friendica.git/blobdiff - view/js/main.js
Issue 6394: The contact location has to be BBEncoded
[friendica.git] / view / js / main.js
index 4ccbc8044ebb20b636b8cb824635c8fc75de910d..95e7b1542edf4b38b7c585dfdfe73f020b0b2b8b 100644 (file)
@@ -24,7 +24,7 @@ function openClose(theID) {
 }
 
 function openMenu(theID) {
-       var el = document.getElementById(theID)
+       var el = document.getElementById(theID);
 
        if (el) {
                el.style.display = "block";
@@ -81,6 +81,11 @@ $(function() {
                        Dialog.doImageBrowser("comment", id);
                        return;
                }
+
+               if (bbcode == "imgprv") {
+                       bbcode = "img";
+               }
+
                insertFormatting(bbcode, id);
        });
 
@@ -385,7 +390,7 @@ function NavUpdate() {
                                $('nav').trigger('nav-update', data.result);
 
                                // start live update
-                               ['network', 'profile', 'community', 'notes', 'display', 'contacts'].forEach(function (src) {
+                               ['network', 'profile', 'community', 'notes', 'display', 'contact'].forEach(function (src) {
                                        if ($('#live-' + src).length) {
                                                liveUpdate(src);
                                        }
@@ -480,14 +485,12 @@ function liveUpdate(src) {
                $('.wall-item-body', data).imagesLoaded(function() {
                        updateConvItems(data);
 
+                       document.dispatchEvent(new Event('postprocess_liveupdate'));
+
                        // Update the scroll position.
                        $(window).scrollTop($(window).scrollTop() + $("section").height() - orgHeight);
                });
-
-               callAddonHooks("postprocess_liveupdate");
-
        });
-
 }
 
 function imgbright(node) {
@@ -671,6 +674,7 @@ function preview_post() {
                        if (data.preview) {
                                $("#jot-preview-content").html(data.preview);
                                $("#jot-preview-content" + " a").click(function() {return false;});
+                               document.dispatchEvent(new Event('postprocess_liveupdate'));
                        }
                },
                "json"
@@ -729,7 +733,7 @@ function loadScrollContent() {
 
        // get the raw content from the next page and insert this content
        // right before "#conversation-end"
-       $.get('network?mode=raw' + infinite_scroll.reload_uri + '&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_id=' + id + '&page=' + infinite_scroll.pageno, function(data) {
+       $.get(infinite_scroll.reload_uri + '&mode=raw&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_id=' + id + '&page=' + infinite_scroll.pageno, function(data) {
                $("#scroll-loader").hide();
                if ($(data).length > 0) {
                        $(data).insertBefore('#conversation-end');
@@ -737,6 +741,8 @@ function loadScrollContent() {
                } else {
                        $("#scroll-end").fadeIn('normal');
                }
+
+               document.dispatchEvent(new Event('postprocess_liveupdate'));
        });
 }