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

Use the item picker overlay style for selecting type, on multiple doctype grid editors. #100

Merged
merged 1 commit into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public IEnumerable<object> GetContentTypes([ModelBinder] string[] allowedContent
guid = x.Key,
name = x.Name,
alias = x.Alias,
description = x.Description,
icon = x.Icon
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT

$scope.model.nameExp = nameExp;

$scope.selectDocType = function () {
$scope.selectDocType = function (alias) {
$scope.dialogMode = "edit";
$scope.model.dialogData.docTypeAlias = $scope.selectedDocType.alias;
$scope.model.dialogData.docTypeAlias = alias;
loadNode();
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<div class="dtge-dialog " ng-controller="Our.Umbraco.DocTypeGridEditor.Dialogs.DocTypeGridEditorDialog">

<div ng-switch="dialogMode">

<umb-control-group label="Choose a content type" ng-switch-when="selectDocType">
<select class="umb-editor" ng-change="selectDocType()" name="selectDocType" ng-model="$parent.$parent.selectedDocType" ng-options="dt as dt.name for dt in docTypes" required>
<option value=""><localize key="choose" />...</option>
</select>
</umb-control-group>
<div ng-switch-when="selectDocType">
<h5>Select a content type</h5>
<ul class="umb-actions umb-actions-child">
<li data-element="action-create-{{docType.alias}}" ng-repeat="docType in docTypes | orderBy:'name':false">
<a ng-click="selectDocType(docType.alias)">
<i class="large {{docType.icon}}"></i>
<span class="menu-label">
{{docType.name}}
<small>
{{docType.description}}
</small>
</span>
</a>
</li>
</ul>
</div>

<div ng-switch-when="edit">

Expand Down