diff --git a/apps/files/js/tagsplugin.js b/apps/files/js/tagsplugin.js
index 4ce6604384..b8e17115b4 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 =
- '
' +
- '' +
- '{{altText}}' +
- '
';
-
/**
* 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)
diff --git a/apps/files/js/templates.js b/apps/files/js/templates.js
index 4b78ffc8c9..4cbd326bac 100644
--- a/apps/files/js/templates.js
+++ b/apps/files/js/templates.js
@@ -23,6 +23,20 @@ templates['detailsview'] = template({"1":function(container,depth0,helpers,parti
+ container.escapeExpression(((helper = (helper = helpers.closeLabel || (depth0 != null ? depth0.closeLabel : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"closeLabel","hash":{},"data":data}) : helper)))
+ "\n";
},"useData":true});
+templates['favorite_mark'] = template({"1":function(container,depth0,helpers,partials,data) {
+ return "permanent";
+},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
+ var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, buffer =
+ "\n \n "
+ + alias4(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"altText","hash":{},"data":data}) : helper)))
+ + "\n
\n";
+},"useData":true});
templates['filemultiselectmenu'] = template({"1":function(container,depth0,helpers,partials,data) {
var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
diff --git a/apps/files/js/templates/favorite_mark.handlebars b/apps/files/js/templates/favorite_mark.handlebars
new file mode 100644
index 0000000000..7e0cb4385a
--- /dev/null
+++ b/apps/files/js/templates/favorite_mark.handlebars
@@ -0,0 +1,4 @@
+
+
+ {{altText}}
+