Add a new template for the suggestion item. re #34

This commit is contained in:
Sébastien Lucas 2013-10-13 22:20:08 +02:00
parent 7f1f072450
commit 0f63050f70
3 changed files with 7 additions and 2 deletions

View file

@ -72,7 +72,8 @@
$.get('templates/default/bookdetail.html'),
$.get('templates/default/main.html'),
$.get('templates/default/page.html'),
$.getJSON(url)).done(function(header, footer, bookdetail, main, page, data){
$.get('templates/default/suggestion.html'),
$.getJSON(url)).done(function(header, footer, bookdetail, main, page, suggestion, data){
templateBookDetail = doT.template (bookdetail [0]);
var defMain = {
@ -89,6 +90,9 @@
};
templatePage = doT.template (page [0], undefined, defPage);
templateSuggestion = doT.template (suggestion [0]);
currentData = data [0];
updatePage (data [0]);

View file

@ -0,0 +1 @@
<p class="{{=it.class}}">{{=it.title}}</p>

View file

@ -2,7 +2,7 @@
// copyright Sébastien Lucas
// https://github.com/seblucas/cops
var templatePage, templateBookDetail, templateMain, currentData, before, filterList;
var templatePage, templateBookDetail, templateMain, templateSuggestion, currentData, before, filterList;
if (typeof LRUCache!='undefined') {
var cache = new LRUCache(30);