DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEAST TAB
fixing bug 25082 and the locallink bug [TFS Changeset #61298]
This commit is contained in:
@@ -7,6 +7,7 @@ using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Schema;
|
||||
using System.Xml;
|
||||
using System.Reflection;
|
||||
|
||||
namespace umbraco.Linq.Core.Node
|
||||
{
|
||||
@@ -321,10 +322,25 @@ namespace umbraco.Linq.Core.Node
|
||||
{
|
||||
if (this._knownTypes == null)
|
||||
{
|
||||
this._knownTypes = (from a in AppDomain.CurrentDomain.GetAssemblies()
|
||||
from t in a.GetTypes()
|
||||
where t.GetCustomAttributes(typeof(DocTypeAttribute), true).Length == 1
|
||||
select t).ToDictionary(k => ((UmbracoInfoAttribute)k.GetCustomAttributes(typeof(UmbracoInfoAttribute), true)[0]).Alias);
|
||||
this._knownTypes = new Dictionary<string, Type>();
|
||||
foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var p in (from t in a.GetTypes()
|
||||
where t.GetCustomAttributes(typeof(DocTypeAttribute), true).Length == 1
|
||||
select t).ToDictionary(k => ((UmbracoInfoAttribute)k.GetCustomAttributes(typeof(UmbracoInfoAttribute), true)[0]).Alias))
|
||||
{
|
||||
this._knownTypes.Add(p.Key, p.Value);
|
||||
}
|
||||
}
|
||||
catch (ReflectionTypeLoadException)
|
||||
{
|
||||
//just ignore, this gets thrown if a reference doesn't exist on the server
|
||||
//for example, the code generation assemblies, they need VS
|
||||
//but if you're installing VS on a server you'd just doing it wrong...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this._knownTypes;
|
||||
|
||||
@@ -213,13 +213,14 @@ function openContent(id) {
|
||||
}
|
||||
protected void SetActionAttribute(ref XmlTreeNode treeElement, Document dd)
|
||||
{
|
||||
//TODO: Work out why the DialogMode isn't working
|
||||
// Check for dialog behaviour
|
||||
if (this.DialogMode == TreeDialogModes.fulllink)
|
||||
if (this.DialogMode == TreeDialogModes.fulllink && !this.IsDialog)
|
||||
{
|
||||
string nodeLink = CreateNodeLink(dd);
|
||||
treeElement.Action = String.Format("javascript:openContent('{0}');", nodeLink);
|
||||
}
|
||||
else if (this.DialogMode == TreeDialogModes.locallink)
|
||||
else if (this.IsDialog) //(this.DialogMode == TreeDialogModes.locallink)
|
||||
{
|
||||
string nodeLink = string.Format("{{localLink:{0}}}", dd.Id);
|
||||
// try to make a niceurl too
|
||||
|
||||
Reference in New Issue
Block a user