diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs index 928223af6e..f9a440f219 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseMediaTree.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; using umbraco.BasePages; @@ -87,8 +87,15 @@ function openMedia(id) { } else { - xNode.Action = null; - xNode.DimNode(); + if (dd.ContentType.Alias.ToLower() == "folder") + { + xNode.Action = "javascript:jQuery('.umbTree #" + dd.Id.ToString() + "').click();"; + } + else + { + xNode.Action = null; + xNode.Style.DimNode(); + } } } else diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs index 94e960a52e..5e6000dcc0 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs @@ -475,7 +475,7 @@ namespace umbraco public static Node GetRandom(this IList nodes) { var random = umbraco.library.GetRandom(); - return nodes[random.Next(0, (nodes.Count - 1))]; + return nodes[random.Next(0, nodes.Count)]; } /// diff --git a/src/umbraco.editorControls/umbraco.editorControls.csproj b/src/umbraco.editorControls/umbraco.editorControls.csproj index 44579c7d1d..b4636781e3 100644 --- a/src/umbraco.editorControls/umbraco.editorControls.csproj +++ b/src/umbraco.editorControls/umbraco.editorControls.csproj @@ -102,6 +102,10 @@ AllRules.ruleset + + {651E1350-91B6-44B7-BD60-7207006D7003} + Umbraco.Web + False ..\..\lib\ClientDependency.Core.dll @@ -154,10 +158,6 @@ {511F6D8D-7717-440A-9A57-A507E9A8B27F} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - {651E1350-91B6-44B7-BD60-7207006D7003} - umbraco.presentation - {52AB8F1F-FB76-4E8C-885F-0747B6CE71EC} umbraco.macroRenderings