Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 966eacb

Browse files
committed
Housekeeping
* Whitespace tidy-up * Removed `console.log` calls
1 parent ff7c8e6 commit 966eacb

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ _ReSharper.*
99
Thumbs.db
1010
.DS_Store
1111
*.log
12+
.vs
1213

1314
artifacts/
1415
src/packages/*/**

build/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (!$docTypeGridEditorFolder)
1212
$projectPath = Join-Path $projDirectory -ChildPath "App_Plugins"
1313
$projectPathExists = Test-Path $projectPath
1414

15-
if ($projectPathExists) {
15+
if ($projectPathExists) {
1616
Write-Host "Updating Nested Content App_Plugin files using PS as they have been excluded from the project"
1717
Copy-Item $newPackageFiles $projectPath -Recurse -Force
1818
}

build/readme.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77

88
--------------------------------------------------------------------------------------
99

10-
To enable DocTypeGridEditor you must add the following JSON snippet to grid.editors.config.js found in the Config folder
10+
To enable DocTypeGridEditor you must add the following JSON snippet to "grid.editors.config.js" found in the Config folder.
1111

1212
{
13-
"name": "Doc Type",
14-
"alias": "docType",
15-
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
16-
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
17-
"icon": "icon-item-arrangement",
18-
"config": {
19-
"allowedDocTypes": [],
13+
"name": "Doc Type",
14+
"alias": "docType",
15+
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
16+
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
17+
"icon": "icon-item-arrangement",
18+
"config": {
19+
"allowedDocTypes": [],
2020
"nameTemplate": "",
2121
"enablePreview": true,
2222
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
2323
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
24-
"previewCssFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Css/dtge.css",
25-
"previewJsFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Js/dtge.js"
26-
}
24+
"previewCssFilePath": "",
25+
"previewJsFilePath": ""
26+
}
2727
}

src/Our.Umbraco.DocTypeGridEditor.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CEE996
1414
EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{D588B45D-9E67-4136-8271-2B8724C8165F}"
1616
ProjectSection(SolutionItems) = preProject
17+
..\CONTRIBUTING.md = ..\CONTRIBUTING.md
18+
..\LICENSE.md = ..\LICENSE.md
1719
..\README.md = ..\README.md
1820
EndProjectSection
1921
EndProject

src/Our.Umbraco.DocTypeGridEditor/Web/Extensions/HtmlHelperExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ public static HtmlString RenderDocTypeGridEditorItem(this HtmlHelper helper,
1616
string editorAlias = "",
1717
string viewPath = "",
1818
string previewViewPath = "")
19-
{
20-
if (content == null)
19+
{
20+
if (content == null)
2121
return new HtmlString(string.Empty);
2222

23-
var controllerName = content.DocumentTypeAlias + "Surface";
23+
var controllerName = content.DocumentTypeAlias + "Surface";
2424

25-
if (!string.IsNullOrWhiteSpace(viewPath))
25+
if (!string.IsNullOrWhiteSpace(viewPath))
2626
viewPath = viewPath.TrimEnd('/') + "/";
2727

2828
if (!string.IsNullOrWhiteSpace(previewViewPath))
@@ -79,7 +79,7 @@ public static HtmlString RenderDocTypeGridEditorItem(this HtmlHelper helper,
7979
dtgePreviewViewPath = previewViewPath
8080
});
8181
}
82-
82+
8383
// Just go with a default action name
8484
return helper.Action("Index", defaultControllerName, new
8585
{
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "Doc Type",
3-
"alias": "docType",
4-
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
5-
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
6-
"icon": "icon-item-arrangement",
7-
"config": {
8-
"allowedDocTypes": [],
2+
"name": "Doc Type",
3+
"alias": "docType",
4+
"view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html",
5+
"render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml",
6+
"icon": "icon-item-arrangement",
7+
"config": {
8+
"allowedDocTypes": [],
99
"nameTemplate": "",
1010
"enablePreview": true,
1111
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
1212
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
13-
"previewCssFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Css/dtge.css",
14-
"previewJsFilePath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/Js/dtge.js"
15-
}
13+
"previewCssFilePath": "",
14+
"previewJsFilePath": ""
15+
}
1616
}

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454

5555
$scope.setPreview = function (model) {
5656
if ("enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) {
57-
console.log(editorState.current);
5857
dtgeResources.getEditorMarkupForDocTypePartial(editorState.current.id, model.id,
5958
$scope.control.editor.alias, model.dtgeContentTypeAlias, model.value,
6059
$scope.control.editor.config.viewPath,
@@ -206,7 +205,6 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
206205
var tab = data.tabs[t];
207206
for (var p = 0; p < tab.properties.length; p++) {
208207
var prop = tab.properties[p];
209-
console.log(prop.alias);
210208
if ($scope.dialogData.value[prop.alias]) {
211209
prop.value = $scope.dialogData.value[prop.alias];
212210
}

0 commit comments

Comments
 (0)