Last active
August 29, 2015 14:00
-
-
Save woeldiche/11253085 to your computer and use it in GitHub Desktop.
client-side template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TN = TN || {}; | |
TN.config = TN.config || {}; | |
TN.config.list = TN.config.list || {}; | |
TN.config.list.dropdown = TN.config.list.dropdown || {}; | |
TN.config.list.dropdown['example-dropdown'] = { | |
template: "<% _(data.content).forEach(function(row) { <li><a class=\"media media--small\" href=\"#\"><div class=\"media__image leader--small\"><span class=\"img--icon img--medium\"><img src=\"<%= row.image.url %>\" width=\"<%= row.image.width %>\" height=\"<%= row.image.height %>\" alt=\"<%= row.image.alt %>\"></span></div><div class=\"media__body\"><div class=\"text-truncate\"><strong><%= row.payer %></strong></div><div class=\"text-truncate\"><%= row.accname %></div><div class=\"text-truncate\"><%= row.accnum %></div></div></a></li> }); %>", | |
ajaxurl: '@Model.AjaxUrl', | |
pageAction: 'append', | |
pageText: 'Show more', | |
startPage: 1, | |
rowsPerPage: 5 | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/template" id="template_example"> | |
<% _(accounts).forEach(function(row) { %> | |
<li> | |
<a class="media media--small" href="#"> | |
<div class="media__image leader--small"> | |
<span class="img--icon img--medium"> | |
<img src="<%= row.image.url %>" width="<%= row.image.width %>" height="<%= row.image.height %>" alt="<%= row.image.alt %>"> | |
</span> | |
</div> | |
<div class="media__body"> | |
<div class="text-truncate"><strong><%= row.payer %></strong></div> | |
<div class="text-truncate"><%= row.accname %></div> | |
<div class="text-truncate"><%= row.accnum %></div> | |
</div> | |
</a> | |
</li> | |
<% }); %> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment