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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user