diff --git a/src/Umbraco.Web.UI/umbraco_client/Editors/EditView.js b/src/Umbraco.Web.UI/umbraco_client/Editors/EditView.js
index 557413bef1..a44b9d6bf3 100644
--- a/src/Umbraco.Web.UI/umbraco_client/Editors/EditView.js
+++ b/src/Umbraco.Web.UI/umbraco_client/Editors/EditView.js
@@ -79,7 +79,9 @@
template: "views/common/dialogs/template/queryBuilder.html",
callback: function (data) {
- var code = "\n@{\n" + "\tvar selection = " + data + ";\n}\n";
+ var dataFormatted = data.replace(new RegExp('[' + "." + ']', 'g'), "\n\t\t\t\t\t.");
+
+ var code = "\n@{\n" + "\tvar selection = " + dataFormatted + ";\n}\n";
code += "
\n" +
"\t@foreach(var item in selection){\n" +
"\t\t- \n" +
diff --git a/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs
index eb36101f4b..0bcc60cfbd 100644
--- a/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs
+++ b/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs
@@ -59,11 +59,11 @@ namespace Umbraco.Web.Editors
private static readonly IEnumerable _properties = new List()
{
- new PropertyModel() { Name = "Id", Alias = "id", Type = "int" },
- new PropertyModel() { Name = "Name", Alias = "name", Type = "string" },
+ new PropertyModel() { Name = "Id", Alias = "Id", Type = "int" },
+ new PropertyModel() { Name = "Name", Alias = "Name", Type = "string" },
//new PropertyModel() { Name = "Url", Alias = "url", Type = "string" },
- new PropertyModel() { Name = "Creation Date", Alias = "createDate", Type = "datetime" },
- new PropertyModel() { Name = "Publishing Date", Alias = "publishDate", Type = "datetime" }
+ new PropertyModel() { Name = "Created Date", Alias = "CreateDate", Type = "datetime" },
+ new PropertyModel() { Name = "Last Updated Date", Alias = "UpdateDate", Type = "datetime" }
};
@@ -82,7 +82,6 @@ namespace Umbraco.Web.Editors
timer.Start();
var currentPage = umbraco.TypedContentAtRoot().FirstOrDefault();
-
timer.Stop();
@@ -201,7 +200,7 @@ namespace Umbraco.Web.Editors
var direction = model.Sort.Direction == "ascending" ? string.Empty : " desc";
- sb.AppendFormat(".OrderBy(\"{0}{1}\")", model.Sort.Property.Name, direction);
+ sb.AppendFormat(".OrderBy(\"{0}{1}\")", model.Sort.Property.Alias, direction);
}
if (model.Take > 0)