Fixes to MultiNodePicker when using media.
This commit is contained in:
@@ -76,6 +76,7 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
|
||||
? "Media"
|
||||
: "Document";
|
||||
$scope.allowOpenButton = entityType === "Document" || entityType === "Media";
|
||||
$scope.allowEditButton = entityType === "Document";
|
||||
|
||||
//the dialog options for the picker
|
||||
var dialogOptions = {
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
{{node.name}}
|
||||
</a>
|
||||
|
||||
<div ng-if="!dialogEditor && ((model.config.showOpenButton && allowOpenButton) || model.config.showEditButton)">
|
||||
<small ng-if="model.config.showOpenButton && allowOpenButton"><a href ng-click="showNode($index)" ng-attr-title="{{model.config.showPathOnHover && 'Path: ' + node.path || undefined}}"><localize key="open">Open</localize></a></small>
|
||||
<small ng-if="model.config.showEditButton"><a href umb-launch-mini-editor="node"><localize key="edit">Edit</localize></a></small>
|
||||
<div ng-if="!dialogEditor && ((model.config.showOpenButton && allowOpenButton) || (model.config.showEditButton && allowEditButton))">
|
||||
<small ng-if="model.config.showOpenButton && allowOpenButton"><a href ng-click="showNode($index)"><localize key="open">Open</localize></a></small>
|
||||
<small ng-if="model.config.showEditButton && allowEditButton"><a href umb-launch-mini-editor="node"><localize key="edit">Edit</localize></a></small>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Umbraco.Web.PropertyEditors
|
||||
{
|
||||
_internalPreValues = new Dictionary<string, object>
|
||||
{
|
||||
{"startNodeId", "-1"},
|
||||
{"showOpenButton", "0"},
|
||||
{"showEditButton", "0"},
|
||||
{"startNodeId", "-1"},
|
||||
{"showPathOnHover", "0"}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
@@ -15,10 +11,12 @@ namespace Umbraco.Web.PropertyEditors
|
||||
public MultiNodeTreePickerPropertyEditor()
|
||||
{
|
||||
_internalPreValues = new Dictionary<string, object>
|
||||
{
|
||||
{"multiPicker", "1"},
|
||||
{"showEditButton", "0"}
|
||||
};
|
||||
{
|
||||
{"multiPicker", "1"},
|
||||
{"showOpenButton", "0"},
|
||||
{"showEditButton", "0"},
|
||||
{"showPathOnHover", "0"}
|
||||
};
|
||||
}
|
||||
|
||||
protected override PreValueEditor CreatePreValueEditor()
|
||||
@@ -47,9 +45,16 @@ namespace Umbraco.Web.PropertyEditors
|
||||
[PreValueField("maxNumber", "Maximum number of items", "number")]
|
||||
public string MaxNumber { get; set; }
|
||||
|
||||
|
||||
[PreValueField("showOpenButton", "Show open button", "boolean")]
|
||||
public string ShowOpenButton { get; set; }
|
||||
|
||||
[PreValueField("showEditButton", "Show edit button (this feature is in preview!)", "boolean")]
|
||||
public string ShowEditButton { get; set; }
|
||||
|
||||
[PreValueField("showPathOnHover", "Show path when hovering items", "boolean")]
|
||||
public bool ShowPathOnHover { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This ensures the multiPicker pre-val is set based on the maxNumber of nodes set
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user