diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2019-04-11 14:55:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 14:55:00 +0300 |
commit | 76f39b3c1847c0e1502242cb69b30ddf42f75e96 (patch) | |
tree | 449fdabaddc74d4e3adfb83491b80244daa70445 | |
parent | 4e8c14fe59e57813defabbac7ffc87ca7e1b3b12 (diff) | |
parent | 482cc6b548ae781d80d13f3f9e722bb449b39ed0 (diff) |
Merge pull request #1709 from nextcloud/move-underscore-template-to-precompiled-handlebars-template
Move underscore template to precompiled Handlebars template
-rw-r--r-- | js/views/collectionsview.js | 7 | ||||
-rw-r--r-- | js/views/templates.js | 3 | ||||
-rw-r--r-- | js/views/templates/collectionsview.handlebars | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/js/views/collectionsview.js b/js/views/collectionsview.js index 6098bd470..264b3ef12 100644 --- a/js/views/collectionsview.js +++ b/js/views/collectionsview.js @@ -29,7 +29,12 @@ OCA.SpreedMe.Views.CollectionsView = Marionette.View.extend({ - template: '<div id="collectionsView"></div>', + template: function(context) { + // OCA.Talk.Views.Templates may not have been initialized when this + // view is initialized, so the template can not be directly + // assigned. + return OCA.Talk.Views.Templates['collectionsview'](context); + }, initialize: function(options) { this.room = options.room; diff --git a/js/views/templates.js b/js/views/templates.js index 6ca95a94b..dbb74268d 100644 --- a/js/views/templates.js +++ b/js/views/templates.js @@ -190,6 +190,9 @@ templates['chatview_comment'] = template({"1":function(container,depth0,helpers, + ((stack1 = ((helper = (helper = helpers.formattedMessage || (depth0 != null ? depth0.formattedMessage : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"formattedMessage","hash":{},"data":data}) : helper))) != null ? stack1 : "") + "</div>\n</li>\n"; },"useData":true}); +templates['collectionsview'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "<div id=\"collectionsView\"></div>\n"; +},"useData":true}); templates['editabletextlabel'] = template({"1":function(container,depth0,helpers,partials,data) { var stack1; diff --git a/js/views/templates/collectionsview.handlebars b/js/views/templates/collectionsview.handlebars new file mode 100644 index 000000000..84678d60e --- /dev/null +++ b/js/views/templates/collectionsview.handlebars @@ -0,0 +1 @@ +<div id="collectionsView"></div> |