Skip to content

Commit

Permalink
Change acl selection box templating
Browse files Browse the repository at this point in the history
Keep dynamic templating in javascript so browsers don't
prefetch non-existing files.
  • Loading branch information
oohlaf committed Dec 28, 2012
1 parent 307cada commit 239110a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion js/acl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion view/acl_selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion view/smarty3/acl_selector.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 239110a

Please sign in to comment.