Merge pull request #7344 from kjac/v8/fix/mntp-start-node-and-filter
V8: Display MNTP "Allow items of type" correctly when a start node is set
This commit is contained in:
@@ -19,15 +19,16 @@ angular.module('umbraco')
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if($scope.model.value.id && $scope.model.value.type !== "member"){
|
if($scope.model.value.id && $scope.model.value.type !== "member"){
|
||||||
entityResource.getById($scope.model.value.id, entityType()).then(function(item){
|
entityResource.getById($scope.model.value.id, entityType()).then(function(item){
|
||||||
populate(item);
|
populate(item);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$timeout(function () {
|
||||||
|
treeSourceChanged();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$timeout(function () {
|
|
||||||
treeSourceChanged();
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
function entityType() {
|
function entityType() {
|
||||||
var ent = "Document";
|
var ent = "Document";
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe
|
|||||||
|
|
||||||
var allItemTypes = null;
|
var allItemTypes = null;
|
||||||
var currentItemType = null;
|
var currentItemType = null;
|
||||||
var initialLoad = true;
|
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
vm.loading = true;
|
vm.loading = true;
|
||||||
@@ -86,13 +85,12 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
eventsService.on("treeSourceChanged", function (e, args) {
|
eventsService.on("treeSourceChanged", function (e, args) {
|
||||||
currentItemType = args.value;
|
|
||||||
// reset the model value if we changed node type (but not on the initial load)
|
// reset the model value if we changed node type (but not on the initial load)
|
||||||
if (!initialLoad) {
|
if (!!currentItemType && currentItemType !== args.value) {
|
||||||
vm.itemTypes = [];
|
vm.itemTypes = [];
|
||||||
updateModel();
|
updateModel();
|
||||||
}
|
}
|
||||||
initialLoad = false;
|
currentItemType = args.value;
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user