]> git.mxchange.org Git - friendica.git/commitdiff
Change acl selection box templating
authorOlaf Conradi <olaf@conradi.org>
Fri, 28 Dec 2012 22:28:53 +0000 (23:28 +0100)
committerOlaf Conradi <olaf@conradi.org>
Fri, 28 Dec 2012 22:28:53 +0000 (23:28 +0100)
Keep dynamic templating in javascript so browsers don't
prefetch non-existing files.

js/acl.js
view/acl_selector.tpl
view/smarty3/acl_selector.tpl

index e383224ca8aba067bd952b59e0f04e089b67a314..4f43252847ff6ae9ef487aff5583fad0f2d572c4 100644 (file)
--- a/js/acl.js
+++ b/js/acl.js
@@ -247,7 +247,7 @@ ACL.prototype.populate = function(data){
        var height = Math.ceil(data.tot / that.nw) * 42;
        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 = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'><img src='{0}'/><p>{1}</p>"+that.item_tpl+"</div>";
                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);
index 655ea89807971c6f3f07aaa1663933ef3c92b549..e2b85e36bc294ce554b4b31a6dbfc53c13e39f4e 100644 (file)
@@ -9,7 +9,6 @@
 </div>
 
 <div class="acl-list-item" rel="acl-template" style="display:none">
-       <img src="{0}"><p>{1}</p>
        <a href="#" class='acl-button-show'>$show</a>
        <a href="#" class='acl-button-hide'>$hide</a>
 </div>
index 52f0573c8a387fcab3f1c99bfab26f428bf6de63..bc669a2ac6a3b46a2875b8d1700f0807dbd582f0 100644 (file)
@@ -9,7 +9,6 @@
 </div>
 
 <div class="acl-list-item" rel="acl-template" style="display:none">
-       <img src="{0}"><p>{1}</p>
        <a href="#" class='acl-button-show'>{{$show}}</a>
        <a href="#" class='acl-button-hide'>{{$hide}}</a>
 </div>