diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-01 20:04:13 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-04 09:53:44 +0200 |
commit | 6f940a9b02bca9e388640c45b928ebedb6eca153 (patch) | |
tree | 59ac79ed1c3233199b47b5787b13814e84cd9677 /apps/files/js/fileactions.js | |
parent | 8dfc397a5ed839b9f2665c8cd19ded20b44a22f4 (diff) | |
download | nextcloud-server-6f940a9b02bca9e388640c45b928ebedb6eca153.tar.gz nextcloud-server-6f940a9b02bca9e388640c45b928ebedb6eca153.zip |
Move fileactions to compiled handlebars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 4fcb290ca8b..5af558d77ba 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -10,17 +10,6 @@ (function() { - var TEMPLATE_FILE_ACTION_TRIGGER = - '<a class="action action-{{nameLowerCase}}" href="#" data-action="{{name}}">' + - '{{#if icon}}' + - '<img class="svg" alt="{{altText}}" src="{{icon}}" />' + - '{{else}}' + - '{{#if iconClass}}<span class="icon {{iconClass}}" />{{/if}}' + - '{{#unless hasDisplayName}}<span class="hidden-visually">{{altText}}</span>{{/unless}}' + - '{{/if}}' + - '{{#if displayName}}<span> {{displayName}}</span>{{/if}}' + - '</a>'; - /** * Construct a new FileActions instance * @constructs FileActions @@ -335,11 +324,7 @@ * @param {Object} params action params */ _makeActionLink: function(params) { - if (!this._fileActionTriggerTemplate) { - this._fileActionTriggerTemplate = Handlebars.compile(TEMPLATE_FILE_ACTION_TRIGGER); - } - - return $(this._fileActionTriggerTemplate(params)); + return $(OCA.Files.Templates['file_action_trigger'](params)); }, /** |