aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaf Conradi <olaf@conradi.org>2014-05-02 02:40:04 +0200
committerOlaf Conradi <olaf@conradi.org>2014-05-02 02:40:04 +0200
commitcfad83084a0118dfdd88d4339109e3595e43ace5 (patch)
tree0ad551fed55c4287eaff3d1c84f512211d4c0ab3
parent32a34f76df401c9bf90c087047c5a45b04aeeaee (diff)
downloadvolse-hubzilla-cfad83084a0118dfdd88d4339109e3595e43ace5.tar.gz
volse-hubzilla-cfad83084a0118dfdd88d4339109e3595e43ace5.tar.bz2
volse-hubzilla-cfad83084a0118dfdd88d4339109e3595e43ace5.zip
Also for notifications.
-rw-r--r--view/js/main.js7
-rw-r--r--view/tpl/hdr.tpl2
2 files changed, 6 insertions, 3 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 38cde749c..17ef578be 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -645,12 +645,15 @@ function updateConvItems(mode,data) {
} else {
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
-
$(data.notify).each(function() {
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.class);
$("#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");
+ });
}
});
diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl
index efb43224c..fdcc4521c 100644
--- a/view/tpl/hdr.tpl
+++ b/view/tpl/hdr.tpl
@@ -1,5 +1,5 @@
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
<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>