]> git.mxchange.org Git - friendica.git/blobdiff - view/js/main.js
Merge pull request #9217 from annando/fix-empty-preview
[friendica.git] / view / js / main.js
index 60337918b4ecd3addb4e4fcdf0dd5382a03df3c3..1fe3d162eb31a953385bafdf404e2005b9e297f3 100644 (file)
@@ -750,26 +750,23 @@ function getPosition(e) {
 
 var lockvisible = false;
 
-function lockview(event,id) {
+function lockview(event, type, id) {
        event = event || window.event;
        cursor = getPosition(event);
        if (lockvisible) {
-               lockviewhide();
+               lockvisible = false;
+               $('#panel').hide();
        } else {
                lockvisible = true;
-               $.get('lockview/' + id, function(data) {
-                       $('#panel').html(data);
-                       $('#panel').css({'left': cursor.x + 5 , 'top': cursor.y + 5});
-                       $('#panel').show();
+               $.get('permission/tooltip/' + type + '/' + id, function(data) {
+                       $('#panel')
+                               .html(data)
+                               .css({'left': cursor.x + 5 , 'top': cursor.y + 5})
+                               .show();
                });
        }
 }
 
-function lockviewhide() {
-       lockvisible = false;
-       $('#panel').hide();
-}
-
 function post_comment(id) {
        unpause();
        commentBusy = true;
@@ -887,16 +884,16 @@ function loadScrollContent() {
                commented = "0000-00-00 00:00:00";
        }
 
-       match = $("span.id").last();
+       match = $("span.uriid").last();
        if (match.length > 0) {
-               id = match[0].innerHTML;
+               uriid = match[0].innerHTML;
        } else {
-               id = "0";
+               uriid = "0";
        }
 
        // get the raw content from the next page and insert this content
        // right before "#conversation-end"
-       $.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) {
+       $.get(infinite_scroll.reload_uri + '&mode=raw&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_uriid=' + uriid + '&page=' + infinite_scroll.pageno, function(data) {
                $("#scroll-loader").hide();
                if ($(data).length > 0) {
                        $(data).insertBefore('#conversation-end');
@@ -940,14 +937,6 @@ function groupChangeMember(gid, cid, sec_token) {
        });
 }
 
-function profChangeMember(gid,cid) {
-       $('body .fakelink').css('cursor', 'wait');
-       $.get('profperm/' + gid + '/' + cid, function(data) {
-                       $('#prof-update-wrapper').html(data);
-                       $('body .fakelink').css('cursor', 'auto');
-       });
-}
-
 function contactgroupChangeMember(checkbox, gid, cid) {
        let url;
        // checkbox.checked is the checkbox state after the click