X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fjs%2Fmain.js;h=3e0f8307a2b6b81123c4709f78e98e04cf0850ea;hb=582e05fcff731a5bae6f2207b1d20db2043e5c81;hp=93340dc37f6fdcb6ba58321489de3c93caf97977;hpb=565ade02a48075be6d69ac9844bcd8c897950968;p=friendica.git diff --git a/view/js/main.js b/view/js/main.js index 93340dc37f..3e0f8307a2 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -166,7 +166,7 @@ $(function() { /* event from comment textarea button popups */ /* insert returned bbcode at cursor position or replace selected text */ - $("body").on("fbrowser.image.comment", function(e, filename, bbcode, id) { + $('body').on('fbrowser.photo.comment', function(e, filename, bbcode, id) { $.colorbox.close(); var textarea = document.getElementById("comment-edit-text-" +id); var start = textarea.selectionStart; @@ -289,18 +289,18 @@ $(function() { $('#mail-update-li').html(mail); - $(".sidebar-group-li .notify").removeClass("show"); - $(data.groups).each(function(key, group) { - var gid = group.id; - var gcount = group.count; - $(".group-"+gid+" .notify").addClass("show").text(gcount); + $(".sidebar-circle-li .notify").removeClass("show"); + $(data.circles).each(function(key, circle) { + var gid = circle.id; + var gcount = circle.count; + $(".circle-"+gid+" .notify").addClass("show").text(gcount); }); - $(".forum-widget-entry .notify").removeClass("show"); - $(data.forums).each(function(key, forum) { - var fid = forum.id; - var fcount = forum.count; - $(".forum-"+fid+" .notify").addClass("show").text(fcount); + $(".group-widget-entry .notify").removeClass("show"); + $(data.groups).each(function(key, group) { + var fid = group.id; + var fcount = group.count; + $(".group-"+fid+" .notify").addClass("show").text(fcount); }); if (data.notifications.length == 0) { @@ -946,21 +946,21 @@ function bin2hex(s) { return a.join(''); } -function groupChangeMember(gid, cid, sec_token) { +function circleChangeMember(gid, cid, sec_token) { $('body .fakelink').css('cursor', 'wait'); - $.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) { - $('#group-update-wrapper').html(data); + $.get('circle/' + gid + '/' + cid + "?t=" + sec_token, function(data) { + $('#circle-update-wrapper').html(data); $('body .fakelink').css('cursor', 'auto'); }); } -function contactgroupChangeMember(checkbox, gid, cid) { +function contactCircleChangeMember(checkbox, gid, cid) { let url; // checkbox.checked is the checkbox state after the click if (checkbox.checked) { - url = 'group/' + gid + '/add/' + cid; + url = 'circle/' + gid + '/add/' + cid; } else { - url = 'group/' + gid + '/remove/' + cid; + url = 'circle/' + gid + '/remove/' + cid; } $('body').css('cursor', 'wait'); $.post(url) @@ -1069,7 +1069,7 @@ var Dialog = { * to the event handler */ doImageBrowser : function (name, id) { - var url = Dialog._get_url("image",name,id); + var url = Dialog._get_url('photo', name, id); return Dialog.show(url); }, @@ -1086,7 +1086,7 @@ var Dialog = { * to the event handler */ doFileBrowser : function (name, id) { - var url = Dialog._get_url("file",name,id); + var url = Dialog._get_url('attachment', name, id); return Dialog.show(url); }, @@ -1095,7 +1095,7 @@ var Dialog = { if (id !== undefined) { hash = hash + "-" + id; } - return baseurl + "/fbrowser/"+type+"/?mode=minimal#"+hash; + return 'media/' + type + '/browser?mode=minimal#' + hash; }, _get_size: function() {