folders are more or less working.
This commit is contained in:
@@ -39,7 +39,7 @@ function memberTypeResource($q, $http, umbRequestHelper) {
|
||||
'Failed to retrieve content type');
|
||||
},
|
||||
|
||||
getEmpty: function () {
|
||||
getScaffold: function () {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
val-form-manager>
|
||||
|
||||
<umb-control-group label="Enter a folder name" hide-label="false">
|
||||
<input type="text" name="folderName" ng-model="model.folderName" class="umb-textstring textstring input-block-level" required />
|
||||
<input type="text" name="folderName" ng-model="model.folderName" class="umb-textstring textstring input-block-level" required />
|
||||
</umb-control-group>
|
||||
|
||||
<button type="submit" class="btn btn-primary"><localize key="general_create">Create</localize></button>
|
||||
|
||||
@@ -27,7 +27,11 @@ function contentCreateController($scope, $location, navigationService, contentTy
|
||||
var currPath = node.path ? node.path : "-1";
|
||||
navigationService.syncTree({ tree: "documenttype", path: currPath + "," + folderId, forceReload: true, activate: true });
|
||||
|
||||
$location.path("/documenttype/list/" + folderId);
|
||||
formHelper.resetForm({ scope: $scope });
|
||||
|
||||
var section = appState.getSectionState("currentSection");
|
||||
|
||||
$location.path("/" + section + "/documenttype/list/" + folderId);
|
||||
|
||||
}, function(err) {
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function DocumentTypeEditController($scope, $rootScope, $routeParams, $log, cont
|
||||
|
||||
if ($routeParams.create) {
|
||||
//we are creating so get an empty data type item
|
||||
contentTypeResource.getEmpty()
|
||||
contentTypeResource.getScaffold()
|
||||
.then(function(dt) {
|
||||
init(dt);
|
||||
});
|
||||
|
||||
@@ -31,13 +31,23 @@ namespace Umbraco.Web.Trees
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DocumentTypeContainer)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt => CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-folder", dt.HasChildren(),
|
||||
queryStrings.GetValue<string>("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + dt.Id)));
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-folder", dt.HasChildren(),
|
||||
queryStrings.GetValue<string>("application") + TreeAlias.EnsureStartsWith('/') + "/list/" + dt.Id);
|
||||
node.Path = dt.Path;
|
||||
return node;
|
||||
}));
|
||||
|
||||
nodes.AddRange(
|
||||
Services.EntityService.GetChildren(intId.Result, UmbracoObjectTypes.DocumentType)
|
||||
.OrderBy(entity => entity.Name)
|
||||
.Select(dt => CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-item-arrangement", false)));
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt.Id.ToString(), id, queryStrings, dt.Name, "icon-item-arrangement", false);
|
||||
node.Path = dt.Path;
|
||||
return node;
|
||||
}));
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user