diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.controller.js index 5850225e68..c8eacd14c6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.controller.js @@ -37,10 +37,13 @@ angular.module('umbraco') }; $scope.clear = function() { - $scope.model.value.id = undefined; - $scope.node = undefined; + $scope.model.value.id = undefined; + $scope.node = undefined; + $scope.model.value.query = undefined; }; + + //we always need to ensure we dont submit anything broken $scope.$on("formSubmitting", function (ev, args) { if($scope.model.value.type === "member"){ $scope.model.value.id = -1; diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.html index 8bf33770c9..8811b549b5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesource.html @@ -1,54 +1,77 @@
- -

- -
- - -
- + +
+ + + -
- - - Available placeholders:
- $current: current page or closest found ancestor
- $parent: parent page or closest found ancestor
- $root: root of the content tree
- $site: Ancestor node at level 1
+ + + + +
    +
  • + + + Show xpath query help + + + +

    + Use Xpath query to set a root node on the tree, either based on a search from the root of the content tree, or by using a context-aware placeholder. +

    + +

    + Placeholders finds the nearest published ID and runs its query from there. so for instance: + +

    $parent/newsArticle
    + + Will try to get the parent if available, but will then fall back to the nearest ancestor and query for all news articles there. +

    + +

    + Available placeholders:
    + $current: current page or closest found ancestor
    + $parent: parent page or closest found ancestor
    + $root: root of the content tree
    + $site: Ancestor node at level 1
    +

    - - - ...Or pick a node - -
+ +
  • + + Cancel and clear query +
  • + +
    \ No newline at end of file