aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorOlaf Conradi <olaf@conradi.org>2014-05-02 02:32:52 +0200
committerOlaf Conradi <olaf@conradi.org>2014-05-02 02:32:52 +0200
commit32a34f76df401c9bf90c087047c5a45b04aeeaee (patch)
tree439803352fb8da57b9546d9a607baa7b1dc82ac6 /view/js
parent4c9f5031eb5d59c3e637ac0f41af9721f331580d (diff)
downloadvolse-hubzilla-32a34f76df401c9bf90c087047c5a45b04aeeaee.tar.gz
volse-hubzilla-32a34f76df401c9bf90c087047c5a45b04aeeaee.tar.bz2
volse-hubzilla-32a34f76df401c9bf90c087047c5a45b04aeeaee.zip
Fix unwanted GET {0} requests
Because of image prefetch of browsers the <img src="{0}"> templates cause unwanted /{0} requests to the webserver. Templates are changed to use a data-src attribute.
Diffstat (limited to 'view/js')
-rw-r--r--view/js/acl.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index 28e47011f..c129634a0 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -258,11 +258,16 @@ ACL.prototype.populate = function(data){
that.list_content.height(height);
$(data.items).each(function(){
html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
- html = html.format( this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable );
+ html = html.format(this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable);
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
//console.log(html);
that.list_content.append(html);
});
+ $("#acl-list-content .acl-list-item img[data-src]").each(function(i, el){
+ // Replace data-src attribute with src attribute for every image
+ $(el).attr('src', $(el).data("src"));
+ $(el).removeAttr("data-src");
+ });
that.update_view();
}