]> git.mxchange.org Git - friendica.git/blobdiff - js/acl.js
Merge branch 'master' of https://github.com/annando/friendica
[friendica.git] / js / acl.js
index bd9f71082efac56e357df87906392b1378b4cd74..fc6a6c0c1d4cb6283c89aef98cd0d1720fa701ba 100644 (file)
--- a/js/acl.js
+++ b/js/acl.js
@@ -200,8 +200,14 @@ ACL.prototype.update_view = function(){
                                $(that.group_uids[id]).each(function(i,v) {
                                        if(uclass == "grouphide")
                                                $("#c"+v).removeClass("groupshow");
-                                       if(uclass != "")
-                                               $("#c"+v).addClass(uclass);
+                                       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;
@@ -242,11 +248,15 @@ ACL.prototype.populate = function(data){
        that.list_content.height(height);
        $(data.items).each(function(){
                html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
-               html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
+               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();
 }