aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filesummary.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-09-27 21:04:33 +0200
committerGitHub <noreply@github.com>2018-09-27 21:04:33 +0200
commitd72d2670352b5a511ebcd5b84f4326d36edd0b1b (patch)
treea8528046f0e02037535dc83c5aa3ee7826b25881 /apps/files/js/filesummary.js
parentd9842314586c8f19c5c2e763b8e142aa00bd5469 (diff)
parentae1250f422126808691a99de45ec1ae0574678da (diff)
downloadnextcloud-server-d72d2670352b5a511ebcd5b84f4326d36edd0b1b.tar.gz
nextcloud-server-d72d2670352b5a511ebcd5b84f4326d36edd0b1b.zip
Merge pull request #11410 from nextcloud/csp/11030/filesummary_compiled_handlebars
Compile filesummary handlebars
Diffstat (limited to 'apps/files/js/filesummary.js')
-rw-r--r--apps/files/js/filesummary.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/apps/files/js/filesummary.js b/apps/files/js/filesummary.js
index 7545654ec44..ed369ff0723 100644
--- a/apps/files/js/filesummary.js
+++ b/apps/files/js/filesummary.js
@@ -20,15 +20,6 @@
*/
(function() {
- var INFO_TEMPLATE =
- '<span class="info">' +
- '<span class="dirinfo"></span>' +
- '<span class="connector">{{connectorLabel}}</span>' +
- '<span class="fileinfo"></span>' +
- '<span class="hiddeninfo"></span>' +
- '<span class="filter"></span>' +
- '</span>';
-
/**
* The FileSummary class encapsulates the file summary values and
* the logic to render it in the given container
@@ -200,10 +191,12 @@
},
_infoTemplate: function(data) {
- if (!this._infoTemplateCompiled) {
- this._infoTemplateCompiled = Handlebars.compile(INFO_TEMPLATE);
- }
- return this._infoTemplateCompiled(_.extend({
+ /* NOTE: To update the template make changes in filesummary.handlebars
+ * and run:
+ *
+ * handlebars -n OCA.Files.FileSummary.Templates filesummary.handlebars -f filesummary_template.js
+ */
+ return OCA.Files.FileSummary.Templates['filesummary'](_.extend({
connectorLabel: t('files', '{dirs} and {files}', {dirs: '', files: ''})
}, data));
},