+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.controller.js
similarity index 95%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.controller.js
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.controller.js
index 0716477627..69ae7b44fe 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.controller.js
@@ -1,5 +1,5 @@
angular.module("umbraco")
- .controller("Umbraco.PropertyEditors.Canvas.MacroController",
+ .controller("Umbraco.PropertyEditors.Grid.MacroController",
function ($scope, $rootScope, $timeout, dialogService, macroResource, macroService, $routeParams) {
$scope.title = "Click to insert macro";
@@ -40,3 +40,4 @@ angular.module("umbraco")
}
}, 200);
});
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.html
similarity index 82%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.html
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.html
index 9a384e5975..ad646b361c 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/macro.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/macro.html
@@ -1,4 +1,4 @@
-
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
similarity index 89%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.controller.js
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
index 59caaf12c9..4103e02df9 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js
@@ -1,5 +1,5 @@
angular.module("umbraco")
- .controller("Umbraco.PropertyEditors.Canvas.MediaController",
+ .controller("Umbraco.PropertyEditors.Grid.MediaController",
function ($scope, $rootScope, $timeout, dialogService) {
$scope.setImage = function(){
@@ -21,3 +21,4 @@ angular.module("umbraco")
}
}, 200);
});
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.html
similarity index 73%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.html
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.html
index 7f1a240ffb..b75a4856bc 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/media.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.html
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.html
new file mode 100644
index 0000000000..93229ecd4a
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/rte.html
@@ -0,0 +1,5 @@
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.controller.js
similarity index 86%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.controller.js
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.controller.js
index a31e1f5f90..8c5b6944a3 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.controller.js
@@ -1,5 +1,5 @@
angular.module("umbraco")
- .controller("Umbraco.PropertyEditors.Canvas.TextStringController",
+ .controller("Umbraco.PropertyEditors.Grid.TextStringController",
function ($scope, $rootScope, $timeout, dialogService) {
$scope.adjustSize = function(ev){
@@ -15,3 +15,4 @@ angular.module("umbraco")
}
});
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.html
similarity index 75%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.html
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.html
index 98031a9388..ba33134b37 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/editors/textstring.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/textstring.html
@@ -1,4 +1,4 @@
-
-
+
@@ -250,3 +250,6 @@
+
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js
similarity index 96%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.controller.js
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js
index 8105ad0e99..d587de25a1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.controller.js
@@ -1,6 +1,6 @@
angular.module("umbraco")
- .controller("Umbraco.PropertyEditors.CanvasPrevalueEditorController",
- function ($scope, $http, assetsService, $rootScope, dialogService, mediaResource, canvasService, imageHelper, $timeout) {
+ .controller("Umbraco.PropertyEditors.GridPrevalueEditorController",
+ function ($scope, $http, assetsService, $rootScope, dialogService, mediaResource, gridService, imageHelper, $timeout) {
var emptyModel = {
columns: 12,
@@ -76,7 +76,7 @@ angular.module("umbraco")
$scope.model.value.templates.splice(index, 1);
};
$scope.closeTemplate = function(){
-
+
//clean-up
_.forEach($scope.currentTemplate.sections, function(section, index){
if(section.grid <= 0){
@@ -140,7 +140,7 @@ angular.module("umbraco")
$scope.model.value.layouts.splice(index, 1);
};
$scope.closeLayout = function(){
-
+
//clean-up
_.forEach($scope.currentLayout.areas, function(area, index){
if(area.grid <= 0){
@@ -150,7 +150,7 @@ angular.module("umbraco")
$scope.currentLayout = undefined;
};
-
+
/****************
area
@@ -187,14 +187,15 @@ angular.module("umbraco")
$scope.scaleDown = function(section){
var remove = (section.grid > 1) ? 1 : section.grid;
section.grid = section.grid-remove;
- };
+ };
$scope.toggleCollection = function(collection, toggle){
if(toggle){
collection = [];
}else{
delete collection;
}
- }
+ };
+
$scope.percentage = function(spans){
return ((spans / $scope.model.value.columns) * 100).toFixed(1);
};
@@ -226,12 +227,12 @@ angular.module("umbraco")
/****************
editors
*****************/
- canvasService.getGridEditors().then(function(response){
+ gridService.getGridEditors().then(function(response){
$scope.editors = response.data;
});
- /* init grid data */
+ /* init grid data */
if (!$scope.model.value || $scope.model.value === "" || !$scope.model.value.templates) {
$scope.model.value = emptyModel;
} else {
@@ -240,4 +241,4 @@ angular.module("umbraco")
}
}
- })
\ No newline at end of file
+ });
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html
similarity index 97%
rename from src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.html
rename to src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html
index 2a1ba5458b..43b021eef5 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/canvas/canvas.prevalues.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.prevalues.html
@@ -1,10 +1,10 @@
-
+
-
+
-
+
diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index cf29f0ea07..787d7c0b74 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -537,7 +537,7 @@
treeInit.aspx
-
+
@@ -2075,13 +2075,13 @@
Designer
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Web.Template.config
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/embed.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/embed.cshtml
deleted file mode 100644
index abdbf66c68..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/embed.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@model dynamic
-@using Umbraco.Web.Templates
-@Html.Raw(Model.value)
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/macro.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/macro.cshtml
deleted file mode 100644
index 94ae154c87..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/macro.cshtml
+++ /dev/null
@@ -1,17 +0,0 @@
-@inherits UmbracoViewPage
-@using Umbraco.Web.Templates
-
-
-@if (Model.value != null)
-{
- string macroAlias = Model.value.macroAlias.ToString();
- ViewDataDictionary parameters = new ViewDataDictionary();
- foreach (dynamic mpd in Model.value.macroParamsDictionary)
- {
- parameters.Add(mpd.Name, mpd.Value);
- }
-
-
- @Umbraco.RenderMacro(macroAlias, parameters)
-
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/media.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/media.cshtml
deleted file mode 100644
index bc99b066de..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/media.cshtml
+++ /dev/null
@@ -1,13 +0,0 @@
-@model dynamic
-@using Umbraco.Web.Templates
-
-@if (Model.value != null)
-{
-
-

-
- if (Model.value.caption != null)
- {
- @Model.value.caption
- }
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/rte.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/rte.cshtml
deleted file mode 100644
index 37c162310a..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/rte.cshtml
+++ /dev/null
@@ -1,4 +0,0 @@
-@model dynamic
-@using Umbraco.Web.Templates
-
-@Html.Raw(TemplateUtilities.ParseInternalLinks(Model.value.ToString()))
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/textstring.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/textstring.cshtml
deleted file mode 100644
index 0628510a5d..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/Editors/textstring.cshtml
+++ /dev/null
@@ -1,20 +0,0 @@
-@model dynamic
-@using Umbraco.Web.Templates
-
-@if (Model.editor.config.markup != null)
-{
- string markup = Model.editor.config.markup.ToString();
-
- markup = markup.Replace("#value#", Model.value.ToString());
- markup = markup.Replace("#style#", Model.editor.config.style.ToString());
-
-
- @Html.Raw(markup)
-
-}
-else
-{
-
- @Model.value
-
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap2.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap2.cshtml
deleted file mode 100644
index cc2d0f7e7a..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap2.cshtml
+++ /dev/null
@@ -1,47 +0,0 @@
-@inherits UmbracoViewPage
-@using Umbraco.Web.Templates
-@using Newtonsoft.Json.Linq;
-
-
-@if (Model != null && !string.IsNullOrEmpty(Model.ToString()))
-{
- var onlyOneColumn = Model.sections != null ? ((System.Collections.ICollection)Model.sections).Count : 0;
-
-
-
- @foreach (var s in Model.sections)
- {
-
- @foreach (var row in s.rows)
- {
-
-
-
-
- @foreach (var area in row.areas)
- {
-
-
- @foreach (var control in area.controls)
- {
- if (control != null && control.editor != null && control.editor.view != null)
- {
-
- string editor = "canvas/editors/" + control.editor.view.ToString();
-
- @Html.Partial(editor, (object)control)
-
- }
- }
-
-
- }
-
-
-
- }
-
- }
-
-
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap3.cshtml
deleted file mode 100644
index fad25edd86..0000000000
--- a/src/Umbraco.Web.UI/Views/Partials/Canvas/bootstrap3.cshtml
+++ /dev/null
@@ -1,45 +0,0 @@
-@inherits UmbracoViewPage
-@using Umbraco.Web.Templates
-
-
-@if (Model != null && !string.IsNullOrEmpty(Model.ToString()))
-{
- var onlyOneColumn = Model.sections != null ? ((System.Collections.ICollection)Model.sections).Count : 0;
-
-
-
- @foreach (var s in Model.sections)
- {
-
- @foreach (var row in s.rows)
- {
-
-
-
-
- @foreach (var area in row.areas)
- {
-
-
- @foreach (var control in area.controls)
- {
- if (control != null && control.editor != null && control.editor.view != null)
- {
-
- string editor = "canvas/editors/" + control.editor.view.ToString();
-
- @Html.Partial(editor, (object)control)
-
- }
- }
-
- }
-
-
-
- }
-
- }
-
-
-}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/config/canvas.editors.config.js b/src/Umbraco.Web.UI/config/grid.editors.config.js
similarity index 100%
rename from src/Umbraco.Web.UI/config/canvas.editors.config.js
rename to src/Umbraco.Web.UI/config/grid.editors.config.js
diff --git a/src/Umbraco.Web/CanvasTemplateExtensions.cs b/src/Umbraco.Web/GridTemplateExtensions.cs
similarity index 74%
rename from src/Umbraco.Web/CanvasTemplateExtensions.cs
rename to src/Umbraco.Web/GridTemplateExtensions.cs
index 9b985f74d5..27b4a45d6b 100644
--- a/src/Umbraco.Web/CanvasTemplateExtensions.cs
+++ b/src/Umbraco.Web/GridTemplateExtensions.cs
@@ -12,27 +12,27 @@ using Umbraco.Web.Mvc;
namespace Umbraco.Web
{
- public static class CanvasTemplateExtensions
+ public static class GridTemplateExtensions
{
- public static MvcHtmlString RenderCanvas(this IPublishedProperty property, string framework = "bootstrap3")
+ public static MvcHtmlString GetGridHtml(this IPublishedProperty property, string framework = "bootstrap3")
{
- var view = "Canvas/" + framework;
+ var view = "Grid/" + framework;
return new MvcHtmlString(renderPartialViewToString(view, property.Value));
}
- public static MvcHtmlString RenderCanvas(this IPublishedContent contentItem)
+ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem)
{
- return RenderCanvas(contentItem, "bodyText", "bootstrap3");
+ return GetGridHtml(contentItem, "bodyText", "bootstrap3");
}
- public static MvcHtmlString RenderCanvas(this IPublishedContent contentItem, string propertyAlias)
+ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, string propertyAlias)
{
- return RenderCanvas(contentItem, propertyAlias, "bootstrap3");
+ return GetGridHtml(contentItem, propertyAlias, "bootstrap3");
}
- public static MvcHtmlString RenderCanvas(this IPublishedContent contentItem, string propertyAlias, string framework)
+ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, string propertyAlias, string framework)
{
- var view = "Canvas/" + framework;
+ var view = "Grid/" + framework;
var model = contentItem.GetProperty(propertyAlias).Value;
return new MvcHtmlString(renderPartialViewToString(view, model));
diff --git a/src/Umbraco.Web/PropertyEditors/CanvasPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
similarity index 65%
rename from src/Umbraco.Web/PropertyEditors/CanvasPropertyEditor.cs
rename to src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
index 05f76b83ce..b1a052ba88 100644
--- a/src/Umbraco.Web/PropertyEditors/CanvasPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
@@ -7,8 +7,8 @@ using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
- [PropertyEditor(Core.Constants.PropertyEditors.CanvasAlias, "Canvas", "canvas", HideLabel=true, IsParameterEditor = false, ValueType="JSON")]
- public class CanvasPropertyEditor : PropertyEditor
+ [PropertyEditor(Core.Constants.PropertyEditors.GridAlias, "Grid layout", "grid", HideLabel=true, IsParameterEditor = false, ValueType="JSON")]
+ public class GridPropertyEditor : PropertyEditor
{
///
/// Overridden to ensure that the value is validated
@@ -23,14 +23,14 @@ namespace Umbraco.Web.PropertyEditors
protected override PreValueEditor CreatePreValueEditor()
{
- return new canvasPreValueEditor();
+ return new gridPreValueEditor();
}
}
- internal class canvasPreValueEditor : PreValueEditor
+ internal class gridPreValueEditor : PreValueEditor
{
- [PreValueField("items", "Canvas", "views/propertyeditors/canvas/canvas.prevalues.html", Description = "Canvas configuration")]
+ [PreValueField("items", "Grid", "views/propertyeditors/grid/grid.prevalues.html", Description = "Grid configuration")]
public string Items { get; set; }
[PreValueField("rte", "Rich text editor", "views/propertyeditors/rte/rte.prevalues.html", Description = "Rich text editor configuration")]
diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj
index 17047c6cd8..e11925ca33 100644
--- a/src/Umbraco.Web/Umbraco.Web.csproj
+++ b/src/Umbraco.Web/Umbraco.Web.csproj
@@ -307,7 +307,7 @@
-
+
@@ -379,7 +379,7 @@
-
+