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

Commit cf978c0

Browse files
authored
Merge pull request #4 from ArnoldV/v8upgrade
Show the icon, the title of the chosen block and the description when…
2 parents 4da8868 + 770457c commit cf978c0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public IEnumerable<object> GetContentTypes([ModelBinder] string[] allowedContent
8484
}
8585

8686
[HttpGet]
87-
public object GetContentTypeIcon([ModelBinder] string contentTypeAlias)
87+
public object GetContentType([ModelBinder] string contentTypeAlias)
8888
{
8989
Guid docTypeGuid;
9090
if (Guid.TryParse(contentTypeAlias, out docTypeGuid))

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
$scope.title = $scope.control.value.value.name;
4545
}
4646
if ("dtgeContentTypeAlias" in $scope.control.value && $scope.control.value.dtgeContentTypeAlias) {
47-
dtgeResources.getContentTypeIcon($scope.control.value.dtgeContentTypeAlias).then(function (data2) {
47+
dtgeResources.getContentType($scope.control.value.dtgeContentTypeAlias).then(function (data2) {
48+
$scope.title = data2.title;
49+
$scope.description = data2.description;
4850
if (data2.icon) {
4951
$scope.icon = data2.icon;
5052
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'Failed to retrieve content types'
2121
);
2222
},
23-
getContentTypeIcon: function (contentTypeAlias) {
23+
getContentType: function (contentTypeAlias) {
2424
var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypeIcon?contentTypeAlias=" + contentTypeAlias);
2525
return umbRequestHelper.resourcePromise(
2626
$http.get(url),

0 commit comments

Comments
 (0)