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

Commit 5770d9a

Browse files
authored
Merge pull request #171 from skttl/develop
Preparing 1.1 release
2 parents 2c6b64b + 8371a86 commit 5770d9a

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22

33
# version format
4-
version: 1.0.0.{build}
4+
version: 1.1.0.{build}
55

66
# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
77
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta

docs/developers-guide.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ You can also add your editors using a package.manifest file in a folder in the `
5757
"allowedDocTypes": [...],
5858
"nameTemplate": "",
5959
"enablePreview": true,
60-
"largeDialog": true,
60+
"overlaySize": "medium",
6161
"viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/",
6262
"previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/",
6363
"previewCssFilePath": "",
@@ -86,13 +86,17 @@ The **Doc Type Grid Editor** supports 3 config options, all of which are optiona
8686
| AllowedDocTypes | String[] | An array of doc type aliases of which should be allowed to be selected in the grid editor. Strings can be REGEX patterns to allow matching groups of doc types in a single entry. e.g. "Widget$" will match all doc types with an alias ending in "Widget". However if a single doc type is matched, (aka **Single Doc Type Mode**), then doc type selection stage (in the DTGE panel) will be skipped. Note, your document type must be an Element type, in order to be usable in DTGE. |
8787
| NameTemplate | String | Allows using any of the doctype's property values in the name/label: {{propertyAlias}} |
8888
| EnablePreview | Boolean | Enables rendering a preview of the grid cell in the grid editor. |
89-
| LargeDialog | Boolean | Makes the editing dialog larger. Especially useful for grid editors with complex property editors. |
89+
| overlaySize | String | Define the size of the grid editor dialog. You can write `large`, `medium` or `small`. If no size is set, the grid editor dialog will be small. Note, the medium size requires a minimum Umbraco version of 8.3 |
90+
| LargeDialog | Boolean | (obsolete, use overlaySize instead) Makes the editing dialog larger. Especially useful for grid editors with complex property editors. |
91+
| size | string | (obsolete, use overlaySize instead)
9092
| ViewPath | String | Sets an alternative view path for where the **Doc Type Grid Editor** should look for views when rendering. Defaults to `~/Views/Partials/` |
9193
| PreviewViewPath | String | Sets an alternative view path for where the **Doc Type Grid Editor** should look for views when rendering previews in the backoffice |
9294
| ShowDocTypeSelectAsGrid | Boolean | Makes the content type selection dialog render a grid, in stead of the default list with descriptions |
9395

9496
By default, a universal grid editor allowing all available element document types is added upon installation.
9597

98+
Since Doc Type Grid Editor does not support culture variation, element document types allowing culture variations is not available for use in Doc Type Grid Editor.
99+
96100
---
97101

98102
### Hooking Up The Doc Type Grid Editor

src/Our.Umbraco.DocTypeGridEditor/Models/DetachedPublishedProperty.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ public IPublishedPropertyType PropertyType
8585
return _propertyType;
8686
}
8787
}
88-
public string Alias { get; }
88+
public string Alias
89+
{
90+
get
91+
{
92+
return _propertyType.Alias;
93+
}
94+
}
8995
}
90-
}
96+
}

src/Our.Umbraco.DocTypeGridEditor/Web/Controllers/DocTypeGridEditorApiController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Our.Umbraco.DocTypeGridEditor.Extensions;
1212
using Our.Umbraco.DocTypeGridEditor.Helpers;
1313
using Our.Umbraco.DocTypeGridEditor.Models;
14+
using Umbraco.Core;
1415
using Umbraco.Core.Models;
1516
using Umbraco.Core.Models.PublishedContent;
1617
using Umbraco.Core.Services;
@@ -60,7 +61,7 @@ public IEnumerable<object> GetContentTypes([ModelBinder] string[] allowedContent
6061
{
6162
var allContentTypes = Current.Services.ContentTypeService.GetAll().ToList();
6263
var contentTypes = allContentTypes
63-
.Where(x => x.IsElement)
64+
.Where(x => x.IsElement && x.VariesByCulture() == false)
6465
.Where(x => allowedContentTypes == null || allowedContentTypes.Length == 0 || allowedContentTypes.Any(y => Regex.IsMatch(x.Alias, y)))
6566
.OrderBy(x => x.Name)
6667
.ToList();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
overlayOptions.allowedDocTypes = $scope.control.editor.config.allowedDocTypes || [];
8686
overlayOptions.showDocTypeSelectAsGrid = $scope.control.editor.config.showDocTypeSelectAsGrid === true;
8787
overlayOptions.nameTemplate = $scope.control.editor.config.nameTemplate;
88-
overlayOptions.size = $scope.control.editor.config.largeDialog ? null : "small";
88+
overlayOptions.size = $scope.control.editor.config.largeDialog ? null : $scope.control.editor.config.overlaySize || "small";
8989

9090
overlayOptions.dialogData = {
9191
docTypeAlias: $scope.control.value.dtgeContentTypeAlias,

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</div>
1212
</div>
1313
<div ng-if="preview"
14+
class="dtge-editor-preview-container"
1415
style="text-align: left;"
1516
dtge-bind-html-compile="preview"
1617
prevent-default>

0 commit comments

Comments
 (0)