Files
Umbraco-CMS/components/umbraco.controls/UmbracoClientDependencyLoader.cs
Shandem df323b8c4e DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB
Moved Client Dependency out of Umbraco codebase and into it's own CodePlex project
Fixed some bugs with Live Editing
Cleaned up some old Client Dependency files

[TFS Changeset #57920]
2009-08-10 11:14:28 +00:00

49 lines
1.4 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.Providers;
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", GlobalSettings.ClientPath);
this.AddPath("UmbracoRoot", GlobalSettings.Path);
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;
}
}
}
}