]> git.mxchange.org Git - friendica.git/commitdiff
Don't replace data-src with src in acl-template
authorOlaf Conradi <olaf@conradi.org>
Sun, 30 Dec 2012 23:01:15 +0000 (00:01 +0100)
committerOlaf Conradi <olaf@conradi.org>
Sun, 30 Dec 2012 23:01:15 +0000 (00:01 +0100)
On pageload an empty acl-list-item as template is created and not yet replaced.
Don't change the data-src for src attributes in those images.

js/acl.js
view/theme/frost-mobile/js/acl.js
view/theme/frost/js/acl.js

index 36cf74970fbac1e83df66fa67da46f4d0711040c..35342a5c14ad52891708f2cec9e119f7d61507f5 100644 (file)
--- a/js/acl.js
+++ b/js/acl.js
@@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
                //console.log(html);
                that.list_content.append(html);
        });
-       $(".acl-list-item img[data-src]").each(function(i, el){
-               // Replace data-src attribute with src attribute for every image
+       $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+               // Add data-src attribute with src attribute for every image
                $(el).attr('src', $(el).data("src"));
-               $(el).removeAttr("data-src");
        });
        that.update_view();
 }
index 20f0d461895cc1898d8fd28c8def9b9d1798b0c8..c22991dd69d490ed1db3e1a5adbb35c06e50792e 100644 (file)
@@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
                //console.log(html);
                that.list_content.append(html);
        });
-       $(".acl-list-item img[data-src]").each(function(i, el){
-               // Replace data-src attribute with src attribute for every image
+       $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+               // Add data-src attribute with src attribute for every image
                $(el).attr('src', $(el).data("src"));
-               $(el).removeAttr("data-src");
        });
        that.update_view();
 }
index 6b443b248165c582b9f87d863d9e4f6bea3598ca..95067f17499a0283971537449cd3d5bcf65795ef 100644 (file)
@@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
                //console.log(html);
                that.list_content.append(html);
        });
-       $(".acl-list-item img[data-src]").each(function(i, el){
-               // Replace data-src attribute with src attribute for every image
+       $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+               // Add data-src attribute with src attribute for every image
                $(el).attr('src', $(el).data("src"));
-               $(el).removeAttr("data-src");
        });
        that.update_view();
 }