From 1290665935ff640a0271de5d75f1be4ab13510b5 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 4 Jun 2015 20:46:38 +1000 Subject: [PATCH] Fix for new Mustache version Adds note about improved admin UI --- CHANGELOG.md | 3 +++ modules/system/assets/js/updates/install.js | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1678d6912..1016590c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* **Build 26x** (2015-06-xx) + - Improved the back-end administrator permissions UI. + * **Build 260** (2015-05-16) - 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. diff --git a/modules/system/assets/js/updates/install.js b/modules/system/assets/js/updates/install.js index f311f9523..52af5e52f 100644 --- a/modules/system/assets/js/updates/install.js +++ b/modules/system/assets/js/updates/install.js @@ -41,13 +41,22 @@ if ($el.length == 0) return // Template for search results - var template = Mustache.render([ + var template = [ '
', '
', '
{{name}}
', '
{{description}}
', '
' - ].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 var engine = new Bloodhound({ @@ -86,7 +95,7 @@ source: engine.ttAdapter(), minLength: 3, templates: { - suggestion: template + suggestion: mTemplate } }) .on('typeahead:opened', function(){