diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 0ad7312c985..109a2fed67e 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -12,24 +12,6 @@
(function() {
- var TEMPLATE_MENU =
- '
' +
- '- ' +
- '' +
- '
' +
- '{{#each items}}' +
- '- ' +
- '' +
- '
' +
- '{{/each}}' +
- '
';
-
- var TEMPLATE_FILENAME_FORM =
- '';
-
/**
* Construct a new NewFileMenu instance
* @constructs NewFileMenu
@@ -78,10 +60,7 @@
},
template: function(data) {
- if (!OCA.Files.NewFileMenu._TEMPLATE) {
- OCA.Files.NewFileMenu._TEMPLATE = Handlebars.compile(TEMPLATE_MENU);
- }
- return OCA.Files.NewFileMenu._TEMPLATE(data);
+ return OCA.Files.Templates['newfilemenu'](data);
},
/**
@@ -111,9 +90,6 @@
_promptFileName: function($target) {
var self = this;
- if (!OCA.Files.NewFileMenu._TEMPLATE_FORM) {
- OCA.Files.NewFileMenu._TEMPLATE_FORM = Handlebars.compile(TEMPLATE_FILENAME_FORM);
- }
if ($target.find('form').length) {
$target.find('input[type=\'text\']').focus();
@@ -128,7 +104,7 @@
var newName = $target.attr('data-templatename');
var fileType = $target.attr('data-filetype');
- var $form = $(OCA.Files.NewFileMenu._TEMPLATE_FORM({
+ var $form = $(OCA.Files.Templates['newfilemenu_filename_form']({
fileName: newName,
cid: this.cid,
fileType: fileType
diff --git a/apps/files/js/templates.js b/apps/files/js/templates.js
index c5522d8407a..1433b240700 100644
--- a/apps/files/js/templates.js
+++ b/apps/files/js/templates.js
@@ -164,6 +164,42 @@ templates['mainfileinfodetailsview'] = template({"1":function(container,depth0,h
+ alias4(((helper = (helper = helpers.permalinkTitle || (depth0 != null ? depth0.permalinkTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"permalinkTitle","hash":{},"data":data}) : helper)))
+ "\" readonly=\"readonly\"/>\n\n";
},"useData":true});
+templates['newfilemenu'] = template({"1":function(container,depth0,helpers,partials,data) {
+ var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
+
+ return " \n \n \n";
+},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
+ var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
+
+ return "\n - \n \n
\n"
+ + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.items : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
+ + "
\n";
+},"useData":true});
+templates['newfilemenu_filename_form'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
+ var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
+
+ return "\n";
+},"useData":true});
templates['template_addbutton'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
diff --git a/apps/files/js/templates/newfilemenu.handlebars b/apps/files/js/templates/newfilemenu.handlebars
new file mode 100644
index 00000000000..0d9ad9682ca
--- /dev/null
+++ b/apps/files/js/templates/newfilemenu.handlebars
@@ -0,0 +1,10 @@
+
+ -
+
+
+ {{#each items}}
+ -
+
+
+ {{/each}}
+
diff --git a/apps/files/js/templates/newfilemenu_filename_form.handlebars b/apps/files/js/templates/newfilemenu_filename_form.handlebars
new file mode 100644
index 00000000000..cf18b28cad2
--- /dev/null
+++ b/apps/files/js/templates/newfilemenu_filename_form.handlebars
@@ -0,0 +1,4 @@
+