V8: Filter out invalid selections in the MNTP "Allowed items" picker (#6641)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
f2dfdd6086
commit
b0d7bdaa77
@@ -42,6 +42,11 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe
|
||||
|
||||
var editor = {
|
||||
multiPicker: true,
|
||||
filterCssClass: "not-allowed not-published",
|
||||
filter: function (item) {
|
||||
// filter out folders (containers), element types (for content) and already selected items
|
||||
return item.nodeType === "container" || item.metaData.isElement || !!_.findWhere(vm.itemTypes, { udi: item.udi });
|
||||
},
|
||||
submit: function (model) {
|
||||
var newItemTypes = _.map(model.selection,
|
||||
function(selected) {
|
||||
|
||||
Reference in New Issue
Block a user