Gets the tree reloading when the customtreeparams change too so now the language selection will auto trigger the tree to reload ... next task we'll make it re-sycn and work.
This commit is contained in:
@@ -420,8 +420,8 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
||||
emitEvent("treeNodeAltSelect", { element: elem, tree: scope.tree, node: n, event: ev });
|
||||
};
|
||||
|
||||
//watch for section changes
|
||||
scope.$watch("section", function (newVal, oldVal) {
|
||||
//watch for section changes and customtreeparams changes
|
||||
scope.$watchCollection("[section, customtreeparams]", function (newVal, oldVal) {
|
||||
|
||||
if (!scope.tree) {
|
||||
loadTree();
|
||||
@@ -440,7 +440,7 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
|
||||
//clear any active trees to reset lookups
|
||||
lastSection = newVal;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
setupExternalEvents();
|
||||
loadTree();
|
||||
|
||||
@@ -170,7 +170,16 @@ angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
|
||||
queryParams["languageId"] = vm.selectedLanguage.id;
|
||||
}
|
||||
var queryString = $.param(queryParams); //create the query string from the params object
|
||||
vm.customTreeParams = queryString + (queryString ? "&" : "") + ($scope.model.customTreeParams ? $scope.model.customTreeParams : "");
|
||||
|
||||
if (!queryString) {
|
||||
vm.customTreeParams = $scope.model.customTreeParams;
|
||||
}
|
||||
else {
|
||||
vm.customTreeParams = queryString;
|
||||
if ($scope.model.customTreeParams) {
|
||||
vm.customTreeParams += "&" + $scope.model.customTreeParams;
|
||||
}
|
||||
}
|
||||
|
||||
vm.treeReady = true;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,9 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
||||
},
|
||||
treeAlias: $scope.model.config.startNode.type,
|
||||
section: $scope.model.config.startNode.type,
|
||||
idType: "int"
|
||||
idType: "int",
|
||||
//only show the lang selector for content
|
||||
showLanguageSelector: $scope.model.config.startNode.type === "content"
|
||||
};
|
||||
|
||||
//since most of the pre-value config's are used in the dialog options (i.e. maxNumber, minNumber, etc...) we'll merge the
|
||||
|
||||
Reference in New Issue
Block a user