X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Facl.js;h=fc6a6c0c1d4cb6283c89aef98cd0d1720fa701ba;hb=edf8bde58107afbb8a2395ac8021a4dbcc73cd5f;hp=ba6c6af7382e5a29faeaa7bbd34f3821d7ef94a1;hpb=5792b3d3580b9f09460305858293398d8d8a9abf;p=friendica.git diff --git a/js/acl.js b/js/acl.js index ba6c6af738..fc6a6c0c1d 100644 --- a/js/acl.js +++ b/js/acl.js @@ -171,6 +171,9 @@ ACL.prototype.update_view = function(){ $('.profile-jot-net input').attr('disabled', 'disabled'); $('#profile-jot-desc').html(' '); } + $("#acl-list-content .acl-list-item").each(function(){ + $(this).removeClass("groupshow grouphide"); + }); $("#acl-list-content .acl-list-item").each(function(){ itemid = $(this).attr('id'); @@ -194,8 +197,17 @@ ACL.prototype.update_view = function(){ uclass="grouphide"; } - $(that.group_uids[id]).each(function(i,v){ - $("#c"+v).removeClass("groupshow grouphide").addClass(uclass); + $(that.group_uids[id]).each(function(i,v) { + if(uclass == "grouphide") + $("#c"+v).removeClass("groupshow"); + if(uclass != "") { + var cls = $("#c"+v).attr('class'); + if( cls == undefined) + return true; + var hiding = cls.indexOf('grouphide'); + if(hiding == -1) + $("#c"+v).addClass(uclass); + } }); break; @@ -235,12 +247,16 @@ ACL.prototype.populate = function(data){ var height = Math.ceil(data.tot / that.nw) * 42; that.list_content.height(height); $(data.items).each(function(){ - html = "
"+that.item_tpl+"
"; - html = html.format( this.photo, this.name, this.type, this.id, '', this.network ); + html = "
"+that.item_tpl+"
"; + html = html.format(this.photo, this.name, this.type, this.id, '', this.network, this.link); if (this.uids!=undefined) that.group_uids[this.id] = this.uids; //console.log(html); that.list_content.append(html); }); + $(".acl-list-item img[data-src]", that.list_content).each(function(i, el){ + // Add src attribute for images with a data-src attribute + $(el).attr('src', $(el).data("src")); + }); that.update_view(); }