mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 17:15:13 +00:00
Merge pull request #439 from oohlaf/fixes
Fix unwanted GET {0} requests
This commit is contained in:
commit
e243da3647
4 changed files with 13 additions and 5 deletions
|
@ -258,11 +258,16 @@ ACL.prototype.populate = function(data){
|
||||||
that.list_content.height(height);
|
that.list_content.height(height);
|
||||||
$(data.items).each(function(){
|
$(data.items).each(function(){
|
||||||
html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
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;
|
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
||||||
//console.log(html);
|
//console.log(html);
|
||||||
that.list_content.append(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();
|
that.update_view();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -645,12 +645,15 @@ function updateConvItems(mode,data) {
|
||||||
} else {
|
} else {
|
||||||
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
|
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
|
||||||
|
|
||||||
|
|
||||||
$(data.notify).each(function() {
|
$(data.notify).each(function() {
|
||||||
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.class);
|
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.class);
|
||||||
$("#nav-" + notifyType + "-menu").append(html);
|
$("#nav-" + notifyType + "-menu").append(html);
|
||||||
});
|
});
|
||||||
|
$(".dropdown-menu 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");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<span id="acl-fields"></span>
|
<span id="acl-fields"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="acl-list-item" rel="acl-template" style="display:none">
|
<div class="acl-list-item" rel="acl-template" style="display:none">
|
||||||
<img src="{0}"><p>{1}</p>
|
<img data-src="{0}"><p>{1}</p>
|
||||||
<button class="acl-button-hide btn btn-xs btn-default"><i class="icon-remove"></i> {{$hide}}</button>
|
<button class="acl-button-hide btn btn-xs btn-default"><i class="icon-remove"></i> {{$hide}}</button>
|
||||||
<button class="acl-button-show btn btn-xs btn-default"><i class="icon-ok"></i> {{$show}}</button>
|
<button class="acl-button-show btn btn-xs btn-default"><i class="icon-ok"></i> {{$show}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
|
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
|
||||||
|
|
||||||
<ul id="nav-notifications-template" style="display:none;" rel="template">
|
<ul id="nav-notifications-template" style="display:none;" rel="template">
|
||||||
<li class="{5}"><a href="{0}" title="{2} {3}"><img src="{1}"><span class='contactname'>{2}</span>{3}<br><span class="notif-when">{4}</span></a></li>
|
<li class="{5}"><a href="{0}" title="{2} {3}"><img data-src="{1}"><span class='contactname'>{2}</span>{3}<br><span class="notif-when">{4}</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue