V8: Make it possible to hide anchor/querystring input in the li… (#7031)
Wonderful work
This commit is contained in:
committed by
emma burstow
parent
2b1e330957
commit
2906eafa79
@@ -33,6 +33,7 @@ angular.module("umbraco").controller("Umbraco.Editors.LinkPickerController",
|
||||
};
|
||||
|
||||
$scope.showTarget = $scope.model.hideTarget !== true;
|
||||
$scope.showAnchor = $scope.model.hideAnchor !== true;
|
||||
|
||||
// this ensures that we only sync the tree once and only when it's ready
|
||||
var oneTimeTreeSync = {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<umb-box>
|
||||
<umb-box-content>
|
||||
|
||||
<div class="flex">
|
||||
<div ng-class="{'flex': showAnchor}">
|
||||
|
||||
<umb-control-group label="@defaultdialogs_urlLinkPicker" class="umb-linkpicker__url">
|
||||
<input type="text"
|
||||
@@ -27,7 +27,7 @@
|
||||
ng-disabled="model.target.id || model.target.udi" />
|
||||
</umb-control-group>
|
||||
|
||||
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-linkpicker__anchor">
|
||||
<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-linkpicker__anchor" ng-if="showAnchor">
|
||||
<input type="text"
|
||||
list="anchors"
|
||||
localize="placeholder"
|
||||
|
||||
@@ -82,6 +82,7 @@ function multiUrlPickerController($scope, angularHelper, localizationService, en
|
||||
currentTarget: target,
|
||||
dataTypeKey: $scope.model.dataTypeKey,
|
||||
ignoreUserStartNodes : ($scope.model.config && $scope.model.config.ignoreUserStartNodes) ? $scope.model.config.ignoreUserStartNodes : "0",
|
||||
hideAnchor: $scope.model.config && $scope.model.config.hideAnchor ? true : false,
|
||||
submit: function (model) {
|
||||
if (model.target.url || model.target.anchor) {
|
||||
// if an anchor exists, check that it is appropriately prefixed
|
||||
|
||||
@@ -16,6 +16,9 @@ namespace Umbraco.Web.PropertyEditors
|
||||
Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")]
|
||||
public bool IgnoreUserStartNodes { get; set; }
|
||||
|
||||
|
||||
[ConfigurationField("hideAnchor",
|
||||
"Hide anchor/query string input", "boolean",
|
||||
Description = "Selecting this hides the anchor/query string input field in the linkpicker overlay.")]
|
||||
public bool HideAnchor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user