Adds the ability to provide the Entity Type to the treepicker dialog controller rather than just guessing from the type. This allows other types than just Document, Media or Member to be picked properly without errors.

Also fixed treepicker prevallue controller to pass in treeAlias properly to treepicker dialog.
This commit is contained in:
Robert Foster
2015-06-20 09:37:20 +10:00
parent 7c4a189aa3
commit d5baa586cf
2 changed files with 3 additions and 2 deletions

View File

@@ -26,7 +26,8 @@ angular.module("umbraco").controller("Umbraco.Dialogs.TreePickerController",
searchText = value + "...";
});
var entityType = "Document";
// Allow the entity type to be passed in but defaults to Document for backwards compatibility.
var entityType = dialogOptions.entityType ? dialogOptions.entityType : "Document";
//min / max values

View File

@@ -29,7 +29,7 @@ angular.module('umbraco')
$scope.openContentPicker =function() {
var d = dialogService.treePicker({
section: config.type,
treeAlias: config.type,
treeAlias: config.treeAlias,
multiPicker: config.multiPicker,
callback: populate
});