Files
Umbraco-CMS/components/umbraco.controls/UmbracoClientDependencyLoader.cs
PerPloug 5f92006bb6 WORK IN PROGRESS, GET THE STABLE SOURCE FROM THE DOWNLOADS TAB
Virtual Directory support, DLR compatible script engine

[TFS Changeset #63625]
2010-01-28 12:51:46 +00:00

50 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using ClientDependency.Core.Controls;
using ClientDependency.Core.FileRegistration.Providers;
using umbraco.IO;
namespace umbraco.uicontrols
{
/// <summary>
/// Used to load in all client dependencies for Umbraco.
/// Ensures that both UmbracoClient and UmbracoRoot paths are added to the loader.
/// </summary>
public class UmbracoClientDependencyLoader : ClientDependencyLoader
{
/// <summary>
/// Set the defaults
/// </summary>
public UmbracoClientDependencyLoader()
: base()
{
this.AddPath("UmbracoClient", IOHelper.ResolveUrl( SystemDirectories.Umbraco_client ));
this.AddPath("UmbracoRoot", IOHelper.ResolveUrl( SystemDirectories.Umbraco ));
this.ProviderName = PageHeaderProvider.DefaultName;
}
public static new ClientDependencyLoader TryCreate(Control parent, out bool isNew)
{
if (ClientDependencyLoader.Instance == null)
{
UmbracoClientDependencyLoader loader = new UmbracoClientDependencyLoader();
parent.Controls.Add(loader);
isNew = true;
return loader;
}
else
{
isNew = false;
return ClientDependencyLoader.Instance;
}
}
}
}