diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-01 20:23:40 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-04 10:53:44 +0300 |
commit | 8dfc397a5ed839b9f2665c8cd19ded20b44a22f4 (patch) | |
tree | 33ea52dab89efaf8e81bf864166bc16db9460880 /apps/files/js/tagsplugin.js | |
parent | cd7c17482ee9c166daedad14e6bac304de61c9b5 (diff) |
Move tagsplugin to compiled handlebars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/js/tagsplugin.js')
-rw-r--r-- | apps/files/js/tagsplugin.js | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js index 4ce6604384d..b8e17115b4b 100644 --- a/apps/files/js/tagsplugin.js +++ b/apps/files/js/tagsplugin.js @@ -17,13 +17,6 @@ PROPERTY_FAVORITE: '{' + OC.Files.Client.NS_OWNCLOUD + '}favorite' }); - var TEMPLATE_FAVORITE_MARK = - '<div ' + - 'class="favorite-mark {{#isFavorite}}permanent{{/isFavorite}}">' + - '<span class="icon {{iconClass}}" />' + - '<span class="hidden-visually">{{altText}}</span>' + - '</div>'; - /** * Returns the icon class for the matching state * @@ -41,10 +34,7 @@ * @return {Object} jQuery object */ function renderStar (state) { - if (!this._template) { - this._template = Handlebars.compile(TEMPLATE_FAVORITE_MARK); - } - return this._template({ + return OCA.Files.Templates['favorite_mark']({ isFavorite: state, altText: state ? t('files', 'Favorited') : t('files', 'Not favorited'), iconClass: getStarIconClass(state) |