Fix for new Mustache version

Adds note about improved admin UI
This commit is contained in:
Samuel Georges 2015-06-04 20:46:38 +10:00
parent 44e528068d
commit 1290665935
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,6 @@
* **Build 26x** (2015-06-xx)
- Improved the back-end administrator permissions UI.
* **Build 260** (2015-05-16) * **Build 260** (2015-05-16)
- The `|page` filter now supports passing an empty string to generate a link to the current page. - The `|page` filter now supports passing an empty string to generate a link to the current page.
- Component variables set with `$this->page` no longer leech in to other component partials. - Component variables set with `$this->page` no longer leech in to other component partials.

View File

@ -41,13 +41,22 @@
if ($el.length == 0) return if ($el.length == 0) return
// Template for search results // Template for search results
var template = Mustache.render([ var template = [
'<div class="product-details">', '<div class="product-details">',
'<div class="product-image"><img src="{{image}}" alt=""></div>', '<div class="product-image"><img src="{{image}}" alt=""></div>',
'<div class="product-name ">{{name}}</div>', '<div class="product-name ">{{name}}</div>',
'<div class="product-description text-overflow">{{description}}</div>', '<div class="product-description text-overflow">{{description}}</div>',
'</div>' '</div>'
].join('')) ].join('')
// This operation parses the template and caches
// the resulting token tree. All future calls to
// mustache.render can now skip the parsing step.
Mustache.parse(template)
var mTemplate = function (view, partials) {
return Mustache.render(template, view, partials)
}
// Source for product search // Source for product search
var engine = new Bloodhound({ var engine = new Bloodhound({
@ -86,7 +95,7 @@
source: engine.ttAdapter(), source: engine.ttAdapter(),
minLength: 3, minLength: 3,
templates: { templates: {
suggestion: template suggestion: mTemplate
} }
}) })
.on('typeahead:opened', function(){ .on('typeahead:opened', function(){