DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB

Resolves 23626. ClientDependency work.

[TFS Changeset #57219]
This commit is contained in:
Shandem
2009-07-26 15:13:15 +00:00
parent 9e9598cbb5
commit 9a46338123
72 changed files with 830 additions and 326 deletions
+16 -3
View File
@@ -1,4 +1,17 @@
* DataType: 'editor' removed
** Before upgrading, ensure you are not using this data type
* //TODO: All removed files will be in the umbraco.Legacy project
* Many files have been removed but a zip file containing all removed files has been supplied
* DataType: 'editor' removed
* Many files have been removed but a zip file containing all removed files has been supplied
* Remove umbraco.controls.helper.cs?
* Any packages that have pages containing Umbraco Controls should now have a
DependencyLoader registered on them, otherwise the controls will not down register client files
to be downlaoded (perhaps theres a better way to implement this... (i.e. check if a DependencyLoader
exists in the current context, and if it doesn't it registers the scripts?)
* Umbraco_Client folder path needs to be specified in AppSettings
* The old TinyMCE was not upgraded to use ClientDependency but it's paths have been changed
to use the UmbracoClientPath setting
@@ -59,7 +59,9 @@ namespace umbraco.editorControls
{
base.OnLoad(e);
base.Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "subModal", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/common.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/subModal.js\"></script><link href=\"" + GlobalSettings.Path + "/js/submodal/subModal.css\" type=\"text/css\" rel=\"stylesheet\"></link>");
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/common.js", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Javascript);
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/subModal.js", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Javascript);
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/subModal.css", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Css);
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
@@ -51,7 +51,9 @@ namespace umbraco.editorControls
{
base.OnInit(e);
base.Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "subModal", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/common.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/subModal.js\"></script><link href=\"" + GlobalSettings.Path + "/js/submodal/subModal.css\" type=\"text/css\" rel=\"stylesheet\"></link>");
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/common.js", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Javascript);
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/subModal.js", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Javascript);
umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader.RegisterDependency("js/submodal/subModal.css", "UmbracoRoot", umbraco.presentation.ClientDependency.ClientDependencyType.Css);
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
presentation.webservices.ajaxHelpers.EnsureLegacyCalls(base.Page);
+1 -1
View File
@@ -320,7 +320,7 @@ namespace umbraco.editorControls.tinymce {
}
protected override void Render(HtmlTextWriter output) {
base.JavascriptLocation = "/umbraco_client/tinymce/tiny_mce.js";
base.JavascriptLocation = GlobalSettings.ClientPath + "/tinymce/tiny_mce.js";
base.Render(output);
}
@@ -13,7 +13,7 @@ using Content = umbraco.cms.businesslogic.Content;
namespace umbraco.editorControls.tinymce.webcontrol {
public class TinyMCE : WebControl, IPostBackDataHandler {
private string _javascriptLocation = "/umbraco_client/tinymce";
private string _javascriptLocation = GlobalSettings.ClientPath + "/tinymce";
private string _coreFile = "/tiny_mce.js";
private int _rows = 13;
private int _cols = 60;
@@ -91,7 +91,7 @@ namespace umbraco.editorControls.tinymce.webcontrol {
/// <param name="outWriter">The writer to draw the editor to</param>
protected override void Render(HtmlTextWriter writer) {
writer.WriteLine("<!-- tinyMCE -->\n");
// writer.WriteLine("<script language=\"javascript\" type=\"text/javascript\" src=\"" + JavascriptLocation + "\"/>\n");
writer.WriteLine("<script language=\"javascript\" type=\"text/javascript\">");
writer.WriteLine("tinyMCE.init({");
@@ -151,6 +151,10 @@
<Project>{511F6D8D-7717-440A-9A57-A507E9A8B27F}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\..\umbraco\presentation.ClientDependency\umbraco.presentation.ClientDependency.csproj">
<Project>{EA35B06D-0CC8-4830-A3F7-9BB3D36D0FAF}</Project>
<Name>umbraco.presentation.ClientDependency</Name>
</ProjectReference>
<ProjectReference Include="..\..\umbraco\presentation\umbraco.presentation.csproj">
<Name>umbraco.presentation</Name>
<Project>{651E1350-91B6-44B7-BD60-7207006D7003}</Project>
+5 -4
View File
@@ -3,12 +3,16 @@ using System.Data;
using Microsoft.ApplicationBlocks.Data;
using System.Data.SqlClient;
using System.Web.UI;
using umbraco.presentation.ClientDependency;
namespace umbraco.macroRenderings
{
/// <summary>
/// Summary description for content.
/// </summary>
[ClientDependency(103, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")]
[ClientDependency(104, ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")]
[ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")]
public class content : System.Web.UI.WebControls.WebControl, interfaces.IMacroGuiRendering
{
private string m_value = "";
@@ -31,10 +35,7 @@ namespace umbraco.macroRenderings
protected override void OnInit(EventArgs e) {
base.OnInit(e);
base.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ajax", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/webservices/ajax.js\"></script>");
base.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ajax1", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/xmlextras.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/xmlRequest.js\"></script>");
base.Page.ClientScript.RegisterClientScriptBlock(GetType(), "subModal", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/common.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/subModal.js\"></script><link href=\"" + GlobalSettings.Path + "/js/submodal/subModal.css\" type=\"text/css\" rel=\"stylesheet\"></link>");
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
ScriptManager sm = ScriptManager.GetCurrent(Page);
ServiceReference legacyPath = new ServiceReference(GlobalSettings.Path + "/webservices/legacyAjaxCalls.asmx");
+6 -4
View File
@@ -4,12 +4,16 @@ using Microsoft.ApplicationBlocks.Data;
using System.Data.SqlClient;
using System.Web.UI;
using umbraco.presentation.ClientDependency;
namespace umbraco.macroRenderings
{
/// <summary>
/// Summary description for content.
/// Summary description for media.
/// </summary>
[ClientDependency(103, ClientDependencyType.Javascript, "js/submodal/common.js", "UmbracoRoot")]
[ClientDependency(104, ClientDependencyType.Javascript, "js/submodal/subModal.js", "UmbracoRoot")]
[ClientDependency(ClientDependencyType.Css, "js/submodal/subModal.css", "UmbracoRoot")]
public class media : System.Web.UI.WebControls.WebControl, interfaces.IMacroGuiRendering
{
private string m_value = "";
@@ -38,9 +42,7 @@ namespace umbraco.macroRenderings
protected override void OnInit(EventArgs e) {
base.OnInit(e);
base.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ajax", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/webservices/ajax.js\"></script>");
base.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ajax1", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/xmlextras.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/xmlRequest.js\"></script>");
base.Page.ClientScript.RegisterClientScriptBlock(GetType(), "subModal", "<script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/common.js\"></script><script type=\"text/javascript\" src=\"" + GlobalSettings.Path + "/js/submodal/subModal.js\"></script><link href=\"" + GlobalSettings.Path + "/js/submodal/subModal.css\" type=\"text/css\" rel=\"stylesheet\"></link>");
// We need to make sure we have a reference to the legacy ajax calls in the scriptmanager
ScriptManager sm = ScriptManager.GetCurrent(Page);
@@ -120,6 +120,10 @@
<Project>{511F6D8D-7717-440A-9A57-A507E9A8B27F}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\..\umbraco\presentation.ClientDependency\umbraco.presentation.ClientDependency.csproj">
<Project>{EA35B06D-0CC8-4830-A3F7-9BB3D36D0FAF}</Project>
<Name>umbraco.presentation.ClientDependency</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs">
+3 -10
View File
@@ -8,9 +8,11 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Javascript, "CodeArea/javascript.js", "UmbracoClient")]
public class CodeArea : System.Web.UI.WebControls.TextBox {
public CodeArea() {
@@ -28,15 +30,6 @@ namespace umbraco.uicontrols {
public int OffSetX { get; set; }
public int OffSetY { get; set; }
protected override void OnInit(System.EventArgs e) {
//this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CodeAreaStyles", "<link rel='stylesheet' href='/umbraco_client/CodeArea/style.css' />");
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CodeAreaJavaScript", "<script language='javascript' src='/umbraco_client/CodeArea/javascript.js'></script>");
}
protected override void Render(HtmlTextWriter writer) {
base.Render(writer);
@@ -62,7 +55,7 @@ namespace umbraco.uicontrols {
writer.WriteLine(jsEventCode);
//this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CodeAreaEvents", jsEventCode);
}
}
+5 -4
View File
@@ -8,8 +8,11 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Css, "menuicon/style.css", "UmbracoClient")]
public class MenuImageButton : System.Web.UI.WebControls.ImageButton, MenuIconI {
private string _OnClickCommand = "";
@@ -47,7 +50,7 @@ namespace umbraco.uicontrols {
}
protected override void OnLoad(System.EventArgs EventArguments) {
SetupClientScript();
this.Width = Unit.Pixel(22);
this.Height = Unit.Pixel(23);
@@ -63,8 +66,6 @@ namespace umbraco.uicontrols {
}
}
private void SetupClientScript() {
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MENUICONCSS", "<link rel='stylesheet' href='/umbraco_client/menuicon/style.css' />");
}
}
}
+5 -4
View File
@@ -1,7 +1,10 @@
using System.ComponentModel;
using System.Web.UI;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Css, "menuicon/style.css", "UmbracoClient")]
internal class MenuIcon : System.Web.UI.WebControls.Image, MenuIconI {
private string _OnClickCommand = "";
private string _AltText = "init";
@@ -40,7 +43,7 @@ namespace umbraco.uicontrols {
}
protected override void OnLoad(System.EventArgs EventArguments) {
SetupClientScript();
// NH 17-01-2007. Trying to avoid inline styling soup
// Me.Width = WebControls.Unit.Pixel(22)
@@ -66,8 +69,6 @@ namespace umbraco.uicontrols {
}
}
private void SetupClientScript() {
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MENUICONCSS", "<link rel='stylesheet' href='/umbraco_client/menuicon/style.css' />");
}
}
}
+5 -4
View File
@@ -8,8 +8,13 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Javascript, "panel/javascript.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "panel/style.css", "UmbracoClient")]
public class UmbracoPanel : System.Web.UI.WebControls.Panel {
private ScrollingMenu _menu = new ScrollingMenu();
@@ -22,10 +27,6 @@ namespace umbraco.uicontrols {
}
protected override void OnLoad(System.EventArgs EventArguments) {
helper.AddLinkToHeader("PanelStyles", "/umbraco_client/panel/style.css", this.Page);
helper.AddScriptToHeader("PanelScript", "/umbraco_client/panel/javascript.js", this.Page);
// this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PanelStyles", "<link rel='stylesheet' href='/umbraco_client/panel/style.css' />");
// this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PanelScript", "<script type='text/javascript' src='/umbraco_client/panel/javascript.js'></script>");
_menu.Visible = hasMenu;
+8 -9
View File
@@ -8,10 +8,14 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ToolboxData("<{0}:ScrollingMenu runat=server></{0}:ScrollingMenu>")]
public class ScrollingMenu : System.Web.UI.WebControls.WebControl {
[ToolboxData("<{0}:ScrollingMenu runat=server></{0}:ScrollingMenu>")]
[ClientDependency(ClientDependencyType.Javascript, "scrollingmenu/javascript.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "scrollingmenu/style.css", "UmbracoClient")]
public class ScrollingMenu : System.Web.UI.WebControls.WebControl {
private ArrayList Icons = new ArrayList();
private string iconIds;
private int extraMenuWidth = 0;
@@ -65,16 +69,11 @@ namespace umbraco.uicontrols {
if (base.Visible)
{
SetupMenu();
SetupClientScript();
}
}
private void SetupClientScript() {
helper.AddLinkToHeader("SCROLLINGMENUCSS", "/umbraco_client/scrollingmenu/style.css", this.Page);
helper.AddScriptToHeader("SCROLLINGMENUJS", "/umbraco_client/scrollingmenu/javascript.js", this.Page);
// this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "SCROLLINGMENUCSS", "<link rel='stylesheet' href='/umbraco_client/scrollingmenu/style.css' />");
// this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "SCROLLINGMENUJS", "<script type='text/javascript' src='/umbraco_client/scrollingmenu/javascript.js'></script>");
}
private System.Web.UI.WebControls.Image scrollImage() {
System.Web.UI.WebControls.Image functionReturnValue = null;
+5 -2
View File
@@ -8,8 +8,12 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Javascript, "tabview/javascript.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "tabview/style.css", "UmbracoClient")]
public class TabView : System.Web.UI.WebControls.WebControl {
private HtmlInputHidden tb = new HtmlInputHidden();
private ArrayList Tabs = new ArrayList();
@@ -57,8 +61,7 @@ namespace umbraco.uicontrols {
}
private void SetupClientScript() {
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "TabviewCss", "<link rel='stylesheet' href='/umbraco_client/tabview/style.css' />");
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "TabviewJs", "<script language='javascript' src='/umbraco_client/tabview/javascript.js'></script>");
string strTmp = "";
for (int i = 1; i <= Tabs.Count; i++) {
+25 -22
View File
@@ -7,40 +7,43 @@ using System.Web.UI.HtmlControls;
namespace umbraco.uicontrols
{
[Obsolete("To register scripts and css files for controls, use the ClientDependency library")]
public class helper
{
[Obsolete("To register scripts and css files for controls, use the ClientDependency library")]
public static void AddLinkToHeader(string key, string src, Page page)
{
if (page.Header != null)
{
if (!page.ClientScript.IsClientScriptBlockRegistered(page.GetType(), key))
{
page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Empty);
((HtmlHead)page.Header).Controls.Add(new LiteralControl(String.Format("<link rel=\"stylesheet\" href=\"{0}\" />", src)));
}
}
else
{
//if (page.Header != null)
//{
// if (!page.ClientScript.IsClientScriptBlockRegistered(page.GetType(), key))
// {
// page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Empty);
// ((HtmlHead)page.Header).Controls.Add(new LiteralControl(String.Format("<link rel=\"stylesheet\" href=\"{0}\" />", src)));
// }
//}
//else
//{
// can't add to header, will failback to a simple register script
page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Format("<link rel=\"stylesheet\" href=\"{0}\" />", src));
}
//}
}
[Obsolete("To register scripts and css files for controls, use the ClientDependency library")]
public static void AddScriptToHeader(string key, string src, Page page)
{
if (page.Header != null)
{
if (!page.ClientScript.IsClientScriptBlockRegistered(page.GetType(), key))
{
page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Empty);
((HtmlHead)page.Header).Controls.Add(new LiteralControl(String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", src)));
}
}
else
{
//if (page.Header != null)
//{
// if (!page.ClientScript.IsClientScriptBlockRegistered(page.GetType(), key))
// {
// page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Empty);
// ((HtmlHead)page.Header).Controls.Add(new LiteralControl(String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", src)));
// }
//}
//else
//{
// can't add to header, will failback to a simple register script
page.ClientScript.RegisterClientScriptBlock(page.GetType(), key, String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", src));
}
//}
}
}
}
+4 -1
View File
@@ -8,8 +8,11 @@ using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.uicontrols {
[ClientDependency(ClientDependencyType.Css, "propertypane/style.css", "UmbracoClient")]
public class Pane : System.Web.UI.WebControls.Panel {
private TableRow tr = new TableRow();
@@ -77,7 +80,7 @@ namespace umbraco.uicontrols {
protected override void OnLoad(System.EventArgs EventArguments) {
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "propertypanestyles", "<link rel='stylesheet' href='/umbraco_client/propertypane/style.css' />");
}
protected override void Render(System.Web.UI.HtmlTextWriter writer) {
@@ -75,6 +75,12 @@
<Compile Include="TabPage.cs" />
<Compile Include="TabView.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\umbraco\presentation.ClientDependency\umbraco.presentation.ClientDependency.csproj">
<Project>{EA35B06D-0CC8-4830-A3F7-9BB3D36D0FAF}</Project>
<Name>umbraco.presentation.ClientDependency</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
+14
View File
@@ -114,6 +114,20 @@ namespace umbraco
}
}
/// <summary>
/// Gets the path to umbraco's client directory (/umbraco_client by default).
/// This is a relative path to the Umbraco Path as it always must exist beside the 'umbraco'
/// folder since the CSS paths to images depend on it.
/// </summary>
/// <value>The path.</value>
public static string ClientPath
{
get
{
return Path + "/../umbraco_client";
}
}
/// <summary>
/// Gets the database connection string
/// </summary>
+1
View File
@@ -287,6 +287,7 @@ namespace umbraco
/// The editor is therefor turned off by default and a standard Textarea is used instead
/// </summary>
/// <value><c>true</c> if the scripteditor is disabled; otherwise, <c>false</c>.</value>
[Obsolete("This value is no longer used in the Umbraco core")]
public static bool ScriptDisableEditor
{
get
@@ -5,6 +5,7 @@ using System.ComponentModel;
using System.Collections;
using System.Collections.Specialized;
using System.Globalization;
using umbraco.presentation.ClientDependency;
namespace umbraco.controls
{
@@ -13,6 +14,7 @@ namespace umbraco.controls
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:datePicker runat=server></{0}:datePicker>")]
[ClientDependency(ClientDependencyType.Javascript, "datepicker/javascript.js", "UmbracoClient")]
public class datePicker_old : System.Web.UI.WebControls.WebControl
{
private DateTime _datetime = new DateTime(1900, 1, 1);
@@ -86,7 +88,7 @@ namespace umbraco.controls
protected override void OnInit(EventArgs e)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "datepicker", "<script language='javascript' src='/umbraco_client/datepicker/javascript.js'></script>");
base.OnInit (e);
}
+6 -4
View File
@@ -5,14 +5,20 @@ using System.ComponentModel;
using System.Collections;
using System.Collections.Specialized;
using System.Globalization;
using umbraco.presentation.ClientDependency;
namespace umbraco.controls
{
/// <summary>
/// Summary description for datePicker.
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:datePicker runat=server></{0}:datePicker>")]
[ClientDependency(200, ClientDependencyType.Javascript, "datepicker/cal_s.js", "UmbracoClient")]
[ClientDependency(201, ClientDependencyType.Javascript, "datepicker/cal_set_s.js", "UmbracoClient")]
[ClientDependency(202, ClientDependencyType.Javascript, "datepicker/lang/calendar-en.js", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Css, "datepicker/aqua/theme.css", "UmbracoClient")]
public class datePicker : TextBox
{
private DateTime _datetime = DateTime.Now;
@@ -134,10 +140,6 @@ namespace umbraco.controls
" showsTime : true,\n" +
" timeFormat : 24 \n";
}
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "datepickerWithPopup", "<script language='javascript' src='/umbraco_client/datepicker/cal_s.js'></script>");
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "datepickerWithPopupHelper", "<script language='javascript' src='/umbraco_client/datepicker/cal_set_s.js'></script>");
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "datepickerWithPopupLang", "<script language='javascript' src='/umbraco_client/datepicker/lang/calendar-en.js'></script>");
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "datepickerWithPopSkin", "<link rel='stylesheet' href='/umbraco_client/datepicker/aqua/theme.css' />");
base.OnInit(e);
}
+5 -1
View File
@@ -130,6 +130,10 @@
<Project>{511F6D8D-7717-440A-9A57-A507E9A8B27F}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\presentation.ClientDependency\umbraco.presentation.ClientDependency.csproj">
<Project>{EA35B06D-0CC8-4830-A3F7-9BB3D36D0FAF}</Project>
<Name>umbraco.presentation.ClientDependency</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Actions\Action.cs">
@@ -286,7 +290,7 @@
<Compile Include="businesslogic\workflow\Notification.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="controls\datePicker.cs">
<Compile Include="controls\__TODELETE__datePicker.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="controls\datePickerWithpopup.cs">
@@ -16,6 +16,7 @@ namespace umbraco.presentation.ClientDependency
{
Priority = DefaultPriority;
DoNotOptimize = false;
PathNameAlias = "";
}
/// <summary>
@@ -35,18 +36,7 @@ namespace umbraco.presentation.ClientDependency
/// Useful for debugging dodgy scripts.
/// Default is false.
/// </remarks>
public bool DoNotOptimize { get; set; }
/// <summary>
/// If dependencies have a composite group name specified, the system will combine all dependency
/// file contents under the one group name and GZIP the output to output cache.
/// </summary>
/// <remarks>
/// This is optional but should be used to decrease the number of requests, save bandwidth and increase
/// performance on the client side.
/// Though both javascript and css files may have the same group name specified, they will be treated seperately.
/// </remarks>
//public string CompositeGroupName { get; set; }
public bool DoNotOptimize { get; set; }
/// <summary>
/// Gets or sets the priority.
@@ -91,8 +91,9 @@ namespace umbraco.presentation.ClientDependency
//get the file list
string[] strFiles = DecodeFrom64(fileset).Split(';');
//combine files
byte[] fileBytes = CompositeFileProcessor.CombineFiles(strFiles, context, type);
//combine files and get the definition types of them (internal vs external resources)
List<CompositeFileDefinition> fDefs;
byte[] fileBytes = CompositeFileProcessor.CombineFiles(strFiles, context, type, out fDefs);
//compress data
CompressionType cType = GetCompression(context);
outputBytes = CompositeFileProcessor.CompressBytes(cType, fileBytes);
@@ -102,8 +103,9 @@ namespace umbraco.presentation.ClientDependency
//Update the XML file map
CompositeFileXmlMapper.Instance.CreateMap(fileset, cType.ToString(),
strFiles.Select(x => new FileInfo(context.Server.MapPath(x))).ToList(),
compositeFileName);
fDefs
.Where(f => f.IsLocalFile)
.Select(x => new FileInfo(context.Server.MapPath(x.Uri))).ToList(), compositeFileName);
}
else
{
@@ -15,6 +15,32 @@ namespace umbraco.presentation.ClientDependency
deflate, gzip, none
}
/// <summary>
/// A simple class defining a Uri string and whether or not it is a local application file
/// </summary>
public class CompositeFileDefinition
{
public CompositeFileDefinition(string uri, bool isLocalFile)
{
IsLocalFile = isLocalFile;
Uri = uri;
}
public bool IsLocalFile { get; set; }
public string Uri { get; set; }
public override bool Equals(object obj)
{
return (obj.GetType().Equals(this.GetType())
&& ((CompositeFileDefinition)obj).IsLocalFile.Equals(IsLocalFile)
&& ((CompositeFileDefinition)obj).Uri.Equals(Uri));
}
public override int GetHashCode()
{
return Uri.GetHashCode();
}
}
/// <summary>
/// A utility class for combining, compressing and saving composite scripts/css files
/// </summary>
@@ -52,8 +78,11 @@ namespace umbraco.presentation.ClientDependency
/// <param name="fileList"></param>
/// <param name="context"></param>
/// <returns></returns>
public static byte[] CombineFiles(string[] strFiles, HttpContext context, ClientDependencyType type)
public static byte[] CombineFiles(string[] strFiles, HttpContext context, ClientDependencyType type, out List<CompositeFileDefinition> fileDefs)
{
List<CompositeFileDefinition> fDefs = new List<CompositeFileDefinition>();
MemoryStream ms = new MemoryStream(5000);
StreamWriter sw = new StreamWriter(ms);
foreach (string s in strFiles)
@@ -68,26 +97,28 @@ namespace umbraco.presentation.ClientDependency
//if the file doesn't exist, then we'll assume it is a URI external request
if (!fi.Exists)
{
WriteFileToStream(ref sw, s, type);
WriteFileToStream(ref sw, s, type, ref fDefs);
}
else
{
WriteFileToStream(ref sw, fi, type, s);
WriteFileToStream(ref sw, fi, type, s, ref fDefs);
}
}
else
{
//if it's not a file based dependency, try to get the request output.
WriteFileToStream(ref sw, s, type);
WriteFileToStream(ref sw, s, type, ref fDefs);
}
}
catch (Exception ex)
{
Type exType = ex.GetType();
if (exType.Equals(typeof(NotSupportedException)) || exType.Equals(typeof(ArgumentException)))
if (exType.Equals(typeof(NotSupportedException))
|| exType.Equals(typeof(ArgumentException))
|| exType.Equals(typeof(HttpException)))
{
//could not parse the string into a fileinfo, so we assume it is a URI
WriteFileToStream(ref sw, s, type);
//could not parse the string into a fileinfo or couldn't mappath, so we assume it is a URI
WriteFileToStream(ref sw, s, type, ref fDefs);
}
else
{
@@ -108,6 +139,7 @@ namespace umbraco.presentation.ClientDependency
byte[] outputBytes = ms.ToArray();
sw.Close();
ms.Close();
fileDefs = fDefs;
return outputBytes;
}
@@ -117,7 +149,7 @@ namespace umbraco.presentation.ClientDependency
/// <param name="sw"></param>
/// <param name="url"></param>
/// <returns></returns>
private static bool WriteFileToStream(ref StreamWriter sw, string url, ClientDependencyType type)
private static bool WriteFileToStream(ref StreamWriter sw, string url, ClientDependencyType type, ref List<CompositeFileDefinition> fileDefs)
{
string requestOutput;
bool rVal = false;
@@ -126,17 +158,19 @@ namespace umbraco.presentation.ClientDependency
{
//write the contents of the external request.
sw.WriteLine(ParseFileContents(requestOutput, type, url));
fileDefs.Add(new CompositeFileDefinition(url, false));
}
return rVal;
}
private static bool WriteFileToStream(ref StreamWriter sw, FileInfo fi, ClientDependencyType type, string origUrl)
private static bool WriteFileToStream(ref StreamWriter sw, FileInfo fi, ClientDependencyType type, string origUrl, ref List<CompositeFileDefinition> fileDefs)
{
try
{
//if it is a file based dependency then read it
string fileContents = File.ReadAllText(fi.FullName);
sw.WriteLine(ParseFileContents(fileContents, type, origUrl));
fileDefs.Add(new CompositeFileDefinition(origUrl, true));
return true;
}
catch (Exception ex)
@@ -12,6 +12,17 @@ namespace umbraco.presentation.ClientDependency.Controls
{
Priority = DefaultPriority;
DoNotOptimize = false;
PathNameAlias = "";
}
public ClientDependencyInclude(IClientDependencyFile file)
{
Priority = file.Priority;
DoNotOptimize = file.DoNotOptimize;
PathNameAlias = file.PathNameAlias;
FilePath = file.FilePath;
DependencyType = file.DependencyType;
InvokeJavascriptMethodOnLoad = file.InvokeJavascriptMethodOnLoad;
}
/// <summary>
@@ -21,7 +32,7 @@ namespace umbraco.presentation.ClientDependency.Controls
/// This will generally mean that if a developer doesn't specify a priority it will come after all other dependencies that
/// have unless the priority is explicitly set above 100.
/// </remarks>
protected const int DefaultPriority = 100;
public const int DefaultPriority = 100;
/// <summary>
/// If set to true, this file will not be compressed, combined, etc...
@@ -37,7 +48,6 @@ namespace umbraco.presentation.ClientDependency.Controls
public string FilePath { get; set; }
public string PathNameAlias { get; set; }
public string CompositeGroupName { get; set; }
public int Priority { get; set; }
public string InvokeJavascriptMethodOnLoad { get; set; }
@@ -21,16 +21,66 @@ namespace umbraco.presentation.ClientDependency.Controls
IsDebugMode = false;
}
private const string ContextKey = "ClientDependencyLoader";
public static void RegisterDependency(string filePath, ClientDependencyType type)
{
RegisterDependency(filePath, "", type);
}
public static void RegisterDependency(string filePath, string pathNameAlias, ClientDependencyType type)
{
RegisterDependency(ClientDependencyInclude.DefaultPriority, false, filePath, pathNameAlias, type, "");
}
/// <summary>
/// Dynamically registers a dependency into the loader at runtime.
/// This is similar to ScriptManager.RegisterClientScriptInclude
/// </summary>
/// <param name="file"></param>
public static void RegisterDependency(int priority, bool doNotOptimize, string filePath, string pathNameAlias, ClientDependencyType type, string invokeJavascriptMethodOnLoad)
{
if (!HttpContext.Current.Items.Contains(ContextKey))
throw new NullReferenceException("No ClientDependencyLoader found in the current request");
ClientDependencyLoader loader = HttpContext.Current.Items[ContextKey] as ClientDependencyLoader;
if (loader == null)
throw new Exception("Could not find a ClientDependencyLoader in the current request");
//loader.RegisteredFiles.Add(file);
//create/add a new control to this control's collection
if (type == ClientDependencyType.Css)
{
CssInclude cssInc = new CssInclude();
cssInc.DoNotOptimize = doNotOptimize;
cssInc.Priority = priority;
cssInc.FilePath = filePath;
cssInc.PathNameAlias = pathNameAlias;
cssInc.InvokeJavascriptMethodOnLoad = invokeJavascriptMethodOnLoad;
loader.Controls.Add(cssInc);
}
else
{
JsInclude jsInc = new JsInclude();
jsInc.DoNotOptimize = doNotOptimize;
jsInc.Priority = priority;
jsInc.FilePath = filePath;
jsInc.PathNameAlias = pathNameAlias;
jsInc.InvokeJavascriptMethodOnLoad = invokeJavascriptMethodOnLoad;
loader.Controls.Add(jsInc);
}
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (HttpContext.Current.Items.Contains("ClientDependencyLoader"))
if (HttpContext.Current.Items.Contains(ContextKey))
{
throw new Exception("Only one ClientDependencyLoader may exist on a page");
}
else
{
HttpContext.Current.Items.Add("ClientDependencyLoader", true);
HttpContext.Current.Items.Add(ContextKey, this);
}
}
@@ -12,5 +12,10 @@ namespace umbraco.presentation.ClientDependency.Controls
{
DependencyType = ClientDependencyType.Css;
}
public CssInclude(IClientDependencyFile file)
: base(file)
{
DependencyType = ClientDependencyType.Css;
}
}
}
@@ -12,6 +12,11 @@ namespace umbraco.presentation.ClientDependency.Controls
{
DependencyType = ClientDependencyType.Javascript;
}
public JsInclude(IClientDependencyFile file)
: base(file)
{
DependencyType = ClientDependencyType.Javascript;
}
}
}
@@ -10,7 +10,6 @@ namespace umbraco.presentation.ClientDependency
ClientDependencyType DependencyType { get; }
string InvokeJavascriptMethodOnLoad { get; set; }
int Priority { get; set; }
//string CompositeGroupName { get; set; }
string PathNameAlias { get; set; }
bool DoNotOptimize { get; set; }
}
@@ -50,19 +50,13 @@ namespace umbraco.presentation.ClientDependency.Providers
List<IClientDependencyFile> jsDependencies = AllDependencies.FindAll(
delegate(IClientDependencyFile a)
{
//if (!IsDebugMode)
// return a.DependencyType == ClientDependencyType.Javascript && string.IsNullOrEmpty(a.CompositeGroupName);
//else
return a.DependencyType == ClientDependencyType.Javascript;
return a.DependencyType == ClientDependencyType.Javascript;
}
);
List<IClientDependencyFile> cssDependencies = AllDependencies.FindAll(
delegate(IClientDependencyFile a)
{
//if (!IsDebugMode)
// return a.DependencyType == ClientDependencyType.Css && string.IsNullOrEmpty(a.CompositeGroupName);
//else
return a.DependencyType == ClientDependencyType.Css;
return a.DependencyType == ClientDependencyType.Css;
}
);
@@ -70,36 +64,28 @@ namespace umbraco.presentation.ClientDependency.Providers
jsDependencies.Sort((a, b) => a.Priority.CompareTo(b.Priority));
cssDependencies.Sort((a, b) => a.Priority.CompareTo(b.Priority));
//if (!IsDebugMode) RegisterCssFiles(ProcessCompositeGroups(ClientDependencyType.Css));
RegisterCssFiles(cssDependencies.ConvertAll<IClientDependencyFile>(a => { return (IClientDependencyFile)a; }));
//if (!IsDebugMode) RegisterJsFiles(ProcessCompositeGroups(ClientDependencyType.Javascript));
RegisterJsFiles(jsDependencies.ConvertAll<IClientDependencyFile>(a => { return (IClientDependencyFile)a; }));
//Register all startup scripts in order
RegisterStartupScripts(dependencies
.Where(x => !string.IsNullOrEmpty(x.InvokeJavascriptMethodOnLoad))
.OrderBy(x => x.Priority)
.ToList());
}
//private List<IClientDependencyFile> ProcessCompositeGroups(ClientDependencyType type)
//{
// List<IClientDependencyFile> dependencies = AllDependencies.FindAll(
// delegate(IClientDependencyFile a)
// {
// return a.DependencyType == type && !string.IsNullOrEmpty(a.CompositeGroupName);
// }
// );
// List<string> groups = new List<string>();
// List<IClientDependencyFile> files = new List<IClientDependencyFile>();
// foreach (IClientDependencyFile a in dependencies)
// {
// if (!groups.Contains(a.CompositeGroupName))
// {
// string url = ProcessCompositeGroup(dependencies, a.CompositeGroupName, type);
// groups.Add(a.CompositeGroupName);
// files.Add(new SimpleDependencyFile(url, type));
// DependantControl.Page.Trace.Write("ClientDependency", "Composite group " + a.CompositeGroupName + " URL: " + url);
// }
// }
// return files;
//}
/// <summary>
/// Registers all of the methods/scripts to be invoked that have been set in the InvokeJavaScriptMethodOnLoad propery
/// for each dependent js script.
/// </summary>
/// <param name="jsDependencies"></param>
protected virtual void RegisterStartupScripts(List<IClientDependencyFile> dependencies)
{
foreach (var js in dependencies)
{
DependantControl.Page.ClientScript.RegisterStartupScript(this.GetType(), js.GetHashCode().ToString(), js.InvokeJavascriptMethodOnLoad, true);
}
}
/// <summary>
/// Returns a list of urls. The array will consist of only one entry if
@@ -182,22 +168,7 @@ namespace umbraco.presentation.ClientDependency.Providers
}
}
}
//internal class SimpleDependencyFile : IClientDependencyFile
//{
// public SimpleDependencyFile(string filePath, ClientDependencyType type)
// {
// FilePath = filePath;
// DependencyType = type;
// }
// public string FilePath{get;set;}
// public ClientDependencyType DependencyType { get; set; }
// public string InvokeJavascriptMethodOnLoad { get; set; }
// public int Priority { get; set; }
// //public string CompositeGroupName { get; set; }
// public string PathNameAlias { get; set; }
//}
}
}
@@ -28,24 +28,35 @@ namespace umbraco.presentation.ClientDependency.Providers
if (jsDependencies.Count == 0)
return;
DetectScriptManager();
RegisterDependencyLoader();
StringBuilder dependencyCalls = new StringBuilder("UmbDependencyLoader");
foreach (IClientDependencyFile dependency in jsDependencies)
if (IsDebugMode)
{
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", dependency.FilePath));
dependencyCalls.AppendFormat(".AddJs('{0}','{1}')",
dependency.FilePath, dependency.InvokeJavascriptMethodOnLoad);
foreach (IClientDependencyFile dependency in jsDependencies)
{
ProcessSingleJsFile(string.Format("'{0}','{1}'", dependency.FilePath, dependency.InvokeJavascriptMethodOnLoad));
}
}
else
{
List<string> jsList = ProcessCompositeList(jsDependencies, ClientDependencyType.Javascript);
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Processed composite list: {0}", jsList[0]));
foreach (string js in jsList)
{
ProcessSingleJsFile(string.Format("'{0}','{1}'", js, string.Empty));
}
}
dependencyCalls.Append(';');
ScriptManager.RegisterClientScriptBlock(DependantControl, DependantControl.GetType(), jsDependencies.GetHashCode().ToString(),
dependencyCalls.ToString(), true);
}
protected override void ProcessSingleJsFile(string js)
{
throw new NotImplementedException();
StringBuilder strClientLoader = new StringBuilder("UmbDependencyLoader");
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", js));
strClientLoader.AppendFormat(".AddJs({0})", js);
strClientLoader.Append(';');
RegisterScript(strClientLoader.ToString());
}
protected override void RegisterCssFiles(List<IClientDependencyFile> cssDependencies)
@@ -53,47 +64,60 @@ namespace umbraco.presentation.ClientDependency.Providers
if (cssDependencies.Count == 0)
return;
DetectScriptManager();
RegisterDependencyLoader();
StringBuilder dependencyCalls = new StringBuilder("UmbDependencyLoader");
foreach (IClientDependencyFile dependency in cssDependencies)
if (IsDebugMode)
{
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", dependency.FilePath));
dependencyCalls.AppendFormat(".AddCss('{0}')", dependency.FilePath);
foreach (IClientDependencyFile dependency in cssDependencies)
{
ProcessSingleCssFile(dependency.FilePath);
}
}
dependencyCalls.Append(';');
ScriptManager.RegisterClientScriptBlock(DependantControl, DependantControl.GetType(), cssDependencies.GetHashCode().ToString(),
dependencyCalls.ToString(), true);
else
{
List<string> cssList = ProcessCompositeList(cssDependencies, ClientDependencyType.Css);
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Processed composite list: {0}", cssList[0]));
foreach (string css in cssList)
{
ProcessSingleCssFile(css);
}
}
}
protected override void ProcessSingleCssFile(string css)
{
throw new NotImplementedException();
StringBuilder strClientLoader = new StringBuilder("UmbDependencyLoader");
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", css));
strClientLoader.AppendFormat(".AddCss('{0}')", css);
strClientLoader.Append(';');
RegisterScript(strClientLoader.ToString());
}
/// <summary>
/// register loader script
/// </summary>
private void RegisterDependencyLoader()
{
// register loader script
if (!HttpContext.Current.Items.Contains(DependencyLoaderResourceName))
{
DependantControl.Page.ClientScript.RegisterClientScriptResource(typeof(ClientDependencyHelper), DependencyLoaderResourceName);
RegisterScriptFile(DependencyLoaderResourceName);
HttpContext.Current.Items[DependencyLoaderResourceName] = true;
}
}
private void DetectScriptManager()
private void RegisterScriptFile(string scriptPath)
{
try
{
Page pg = (Page)HttpContext.Current.CurrentHandler;
if (ScriptManager.GetCurrent(pg) == null)
throw new NullReferenceException("A ScriptManager needs to be declared on the page for ClientDependencyLoader to work");
}
catch
{
throw new NullReferenceException("ClientDependencyLoader only works with an active Page");
}
DependantControl.Page.ClientScript.RegisterClientScriptResource(this.GetType(), scriptPath);
}
private void RegisterScript(string strScript)
{
DependantControl.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), strScript.GetHashCode().ToString(), strScript, true);
}
}
}
@@ -23,7 +23,9 @@ namespace umbraco.presentation.ClientDependency.Providers
}
protected override void RegisterJsFiles(List<IClientDependencyFile> jsDependencies)
{
{
if (jsDependencies.Count == 0)
return;
if (IsDebugMode)
{
@@ -35,30 +37,33 @@ namespace umbraco.presentation.ClientDependency.Providers
else
{
List<string> jsList = ProcessCompositeList(jsDependencies, ClientDependencyType.Javascript);
if (jsList.Count == 0)
return;
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Processed composite list: {0}", jsList[0]));
foreach (string js in jsList)
{
ProcessSingleJsFile(js);
}
}
}
}
protected override void ProcessSingleJsFile(string js)
{
if (DependantControl.Page.Header == null)
throw new NullReferenceException("PageHeaderProvider requires a runat='server' tag in the page's header tag");
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", js));
//DependantControl.Page.Header.Controls.AddAt(m_CurrJsIndex++, new LiteralControl(string.Format(ScriptEmbed, js)));
AddToHead(string.Format(ScriptEmbed, js));
}
protected override void RegisterCssFiles(List<IClientDependencyFile> cssDependencies)
{
if (cssDependencies.Count == 0)
return;
if (IsDebugMode)
{
foreach (IClientDependencyFile dependency in cssDependencies)
@@ -68,9 +73,7 @@ namespace umbraco.presentation.ClientDependency.Providers
}
else
{
List<string> cssList = ProcessCompositeList(cssDependencies, ClientDependencyType.Css);
if (cssList.Count == 0)
return;
List<string> cssList = ProcessCompositeList(cssDependencies, ClientDependencyType.Css);
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Processed composite list: {0}", cssList[0]));
foreach (string css in cssList)
@@ -85,7 +88,6 @@ namespace umbraco.presentation.ClientDependency.Providers
if (DependantControl.Page.Header == null)
throw new NullReferenceException("PageHeaderProvider requires a runat='server' tag in the page's header tag");
DependantControl.Page.Trace.Write("ClientDependency", string.Format("Registering: {0}", css));
//DependantControl.Page.Header.Controls.AddAt(m_CurrJsIndex++, new LiteralControl(string.Format(CssEmbed, css)));
AddToHead(string.Format(CssEmbed, css));
}
@@ -95,7 +97,7 @@ namespace umbraco.presentation.ClientDependency.Providers
/// </summary>
/// <param name="literal"></param>
private void AddToHead(string literal)
{
{
List<int> indexes = new List<int>();
Type iDependency = typeof(IClientDependencyFile);
foreach (Control ctl in DependantControl.Page.Header.Controls)
@@ -1,10 +1,10 @@
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="noNodes.aspx.cs" Inherits="umbraco.presentation.config.splashes.noNodes" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<head runat="server">
<title>Umbraco <%=umbraco.GlobalSettings.CurrentVersion%> - no pages found</title>
<script type="text/javascript" src="/umbraco_client/ui/jquery.js"></script>
<style type="text/css">
@@ -49,6 +49,14 @@
</head>
<body>
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="0" />
<form id="Form1" method="post" runat="server">
<asp:ScriptManager runat="server" ID="umbracoScriptManager"></asp:ScriptManager>
@@ -24,6 +24,7 @@ namespace umbraco.presentation.config.splashes
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected void Page_Load(object sender, EventArgs e)
{
ClientLoader.DataBind();
bt_launch.Attributes.Add("onclick", "document.location.href='../.." + GlobalSettings.Path + "';");
}
}
+19 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,24 @@ namespace umbraco.presentation.config.splashes {
public partial class noNodes {
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// Form1 control.
/// </summary>
+1 -14
View File
@@ -157,20 +157,7 @@ namespace umbraco
else
Page.Trace.IsEnabled = false;
// test for edit mode
/*if (helper.UserInLiveEditingMode())
{
// turn off request validation when in Live Editing mode
// can probably be removed
new System.Web.Configuration.PagesSection().ValidateRequest = false;
if (ScriptManager.GetCurrent(this.Page) == null)
{
throw new Exception("Umbraco Live Editing Requires a Script Manager in the template");
}
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "umbEditCss", "<link href=\"" + GlobalSettings.Path + "/css/umbLiveEditing.css\" type=\"text/css\" rel=\"stylesheet\"></link>", false);
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "umbEditJs", GlobalSettings.Path + "/js/umbLiveEditing.js");
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "umbEditPrototype", GlobalSettings.Path + "/js/prototype.js");
}*/
}
+18 -13
View File
@@ -1,9 +1,9 @@
<%@ Page Language="c#" CodeBehind="default.aspx.cs" AutoEventWireup="True" Inherits="umbraco.presentation.install._default" EnableViewState="False" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<head runat="server">
<title>Umbraco <%=umbraco.GlobalSettings.CurrentVersion%> Configuration Wizard</title>
<style type="text/css">
@@ -19,17 +19,7 @@
.actions a:hover{text-decoration: underline;}
.passtestresult{margin-left: 15px; font-weight: bold; padding: 4px 10px 4px 10px !Important;}
</style>
<script type="text/javascript" src="/umbraco_client/ui/jquery.js"></script>
<script type="text/javascript" src="/umbraco_client/modal/modal.js"></script>
<script type="text/javascript" src="/umbraco_client/passwordStrength/passwordStrength.js"></script>
<link rel="Stylesheet" href="style.css" type="text/css" />
<!-- Seperate modal stylesheet -->
<link href="/umbraco_client/modal/style.css" type="text/css" rel="stylesheet" />
</style>
<script type="text/javascript">
@@ -64,6 +54,21 @@
</head>
<body>
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="ClientSideRegistration" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="style.css" />
<umb:CssInclude ID="CssInclude2" runat="server" FilePath="modal/style.css" PathNameAlias="UmbracoClient" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="0" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="modal/modal.js" PathNameAlias="UmbracoClient" Priority="1" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="passwordStrength/passwordStrength.js" PathNameAlias="UmbracoClient" Priority="3" />
<form id="Form1" method="post" runat="server">
<asp:ScriptManager runat="server" ID="umbracoScriptManager">
</asp:ScriptManager>
@@ -22,6 +22,8 @@ namespace umbraco.presentation.install
protected void Page_Load(object sender, System.EventArgs e)
{
ClientLoader.DataBind();
//If user wishes to subscribe to security updates
if (!string.IsNullOrEmpty(Request["email"]) && !string.IsNullOrEmpty(Request["name"]))
SubscribeToNewsLetter(Request["name"], Request["email"]);
+55 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,60 @@ namespace umbraco.presentation.install {
public partial class _default {
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// CssInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.CssInclude CssInclude1;
/// <summary>
/// CssInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.CssInclude CssInclude2;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
/// <summary>
/// JsInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude2;
/// <summary>
/// Form1 control.
/// </summary>
@@ -1442,12 +1442,12 @@
</Compile>
<Compile Include="umbraco\users\UserPermissions.cs" />
<Compile Include="umbraco\users\UserTypeTasks.cs" />
<Compile Include="umbraco\viewHtml.aspx.cs">
<DependentUpon>viewHtml.aspx</DependentUpon>
<Compile Include="umbraco\__TODELETE__viewHtml.aspx.cs">
<DependentUpon>__TODELETE__viewHtml.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco\viewHtml.aspx.designer.cs">
<DependentUpon>viewHtml.aspx</DependentUpon>
<Compile Include="umbraco\__TODELETE__viewHtml.aspx.designer.cs">
<DependentUpon>__TODELETE__viewHtml.aspx</DependentUpon>
</Compile>
<Compile Include="umbraco\webService.asmx.cs">
<DependentUpon>webService.asmx</DependentUpon>
@@ -2434,7 +2434,7 @@
<Content Include="umbraco\users\EditUser.aspx" />
<Content Include="umbraco\users\EditUserType.aspx" />
<Content Include="umbraco\users\PermissionEditor.aspx" />
<Content Include="umbraco\viewHtml.aspx" />
<Content Include="umbraco\__TODELETE__viewHtml.aspx" />
<Content Include="umbraco\webService.asmx" />
<Content Include="umbraco\webservices\ajax.js" />
<Content Include="umbraco\webservices\CacheRefresher.asmx">
@@ -3861,8 +3861,8 @@
<DependentUpon>EditUser.aspx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco\viewHtml.aspx.resx">
<DependentUpon>viewHtml.aspx.cs</DependentUpon>
<EmbeddedResource Include="umbraco\__TODELETE__viewHtml.aspx.resx">
<DependentUpon>__TODELETE__viewHtml.aspx.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="umbraco\webService.asmx.resx">
@@ -7,9 +7,9 @@
<title></title>
</head>
<body>
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="ClientSideRegistration" IsDebugMode="true" >
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="ClientSideRegistration" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
@@ -1,4 +1,4 @@
<%@ Page language="c#" Codebehind="viewHtml.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.viewHtml" %>
<%@ Page language="c#" Codebehind="__TODELETE__viewHtml.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.viewHtml" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
@@ -1,15 +1,23 @@
using System.IO;
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections;
using System.Web.UI;
using umbraco.presentation.ClientDependency;
namespace umbraco.controls
{
using System.IO;
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections;
using System.Web.UI;
/// <summary>
/// TODO: REmove the dependencies on prototype and scriptaculous!!
/// doesn't work when combining scripts which is why DoNotOptimize is flagged.
/// </summary>
[ClientDependency(500, ClientDependencyType.Javascript, "js/prototype.js", "UmbracoRoot", DoNotOptimize = true)]
[ClientDependency(501, ClientDependencyType.Javascript, "js/scriptaculous/scriptaculous.js?load=effects,dragdrop", "UmbracoRoot",
InvokeJavascriptMethodOnLoad = "Position.includeScrollOffsets = true;", DoNotOptimize = true)]
public partial class ContentTypeControlNew : System.Web.UI.UserControl
{
public uicontrols.TabPage InfoTabPage;
@@ -41,7 +49,7 @@ namespace umbraco.controls
protected void Page_Load(object sender, System.EventArgs e)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "dragdrop", "<script src=\"" + GlobalSettings.Path + "/js/prototype.js\" type=\"text/javascript\"></script><script src=\"" + GlobalSettings.Path + "/js/scriptaculous/scriptaculous.js?load=effects,dragdrop\" type=\"text/javascript\"></script><script type=\"text/javascript\">Position.includeScrollOffsets = true;</script>");
pp_newTab.Text = ui.Text("newtab", umbraco.BasePages.UmbracoEnsuredPage.CurrentUser);
pp_alias.Text = umbraco.ui.Text("alias", umbraco.BasePages.UmbracoEnsuredPage.CurrentUser);
@@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.BasePages;
using umbraco.presentation.ClientDependency;
namespace umbraco.controls.GenericProperties
{
@@ -13,6 +14,8 @@ namespace umbraco.controls.GenericProperties
/// <summary>
/// Summary description for GenericProperty.
/// </summary>
[ClientDependency(ClientDependencyType.Css, "GenericProperty/genericproperty.css", "UmbracoClient")]
[ClientDependency(ClientDependencyType.Javascript, "GenericProperty/genericproperty.js", "UmbracoClient")]
public partial class GenericProperty : System.Web.UI.UserControl
{
@@ -222,8 +225,7 @@ namespace umbraco.controls.GenericProperties
//
InitializeComponent();
base.OnInit(e);
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "GenericPropertyCss", "<link href=\"/umbraco_client/GenericProperty/genericproperty.css\" type=\"text/css\" rel=\"stylesheet\">");
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "GenericPropertyJs", "<script src=\"/umbraco_client/GenericProperty/genericproperty.js\" type=\"text/javascript\"></script>");
this.Delete += new System.EventHandler(defaultDeleteHandler);
}
@@ -2,12 +2,14 @@ using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using umbraco.presentation.ClientDependency;
namespace umbraco.controls
{
/// <summary>
/// Summary description for dualSelectbox.
/// </summary>
[ClientDependency(ClientDependencyType.Javascript, "js/dualSelectBox.js", "UmbracoRoot")]
public class DualSelectbox : System.Web.UI.WebControls.WebControl, System.Web.UI.INamingContainer
{
private ListItemCollection _items = new ListItemCollection();
@@ -123,12 +125,7 @@ namespace umbraco.controls
_remove.Attributes.Add("onClick", "dualSelectBoxShift('" + this.ClientID + "');");
}
protected override void OnInit(EventArgs e)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "dualSelectBox", "<script language='javascript' src='" + GlobalSettings.Path + "/js/dualSelectBox.js'></script>");
base.OnInit (e);
}
}
@@ -1,8 +1,11 @@
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Install boost" CodeBehind="Boost.aspx.cs" Inherits="umbraco.presentation.developer.packages.Boost" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="/umbraco_client/ui/accordian.js"></script>
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="ui/accordian.js" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
function showProgress(button, elementId) {
var img = document.getElementById(elementId);
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,15 @@ namespace umbraco.presentation.developer.packages {
public partial class Boost {
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
/// <summary>
/// Panel1 control.
/// </summary>
@@ -72,7 +72,7 @@
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
@@ -19,7 +19,7 @@
<body class="umbracoDialog" style="margin: 15px 10px 0px 10px;">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
@@ -1,12 +1,22 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsertAnchor.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.InsertAnchor" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head runat="server">
<title><%= umbraco.ui.Text("insertAnchor") %></title>
<script type="text/javascript" src="/umbraco_client/tinymce3/tiny_mce_popup.js"></script>
<script type="text/javascript" src="/umbraco_client/tinymce3/themes/umbraco/js/anchor.js"></script>
<base target="_self" />
</head>
<body style="display: none">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/themes/umbraco/js/anchor.js" PathNameAlias="UmbracoClient" Priority="101" />
<form onsubmit="AnchorDialog.update();return false;" action="#">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
@@ -4,12 +4,16 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace umbraco.presentation.umbraco.plugins.tinymce3 {
public partial class InsertAnchor : BasePages.UmbracoEnsuredPage {
namespace umbraco.presentation.umbraco.plugins.tinymce3
{
public partial class InsertAnchor : BasePages.UmbracoEnsuredPage
{
protected void Page_Load(object sender, EventArgs e) {
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
ClientLoader.DataBind();
}
}
}
}
}
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,5 +12,32 @@ namespace umbraco.presentation.umbraco.plugins.tinymce3 {
public partial class InsertAnchor {
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
}
}
@@ -1,14 +1,24 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertChar.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.insertChar" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head runat="server">
<title><%= umbraco.ui.Text("insertCharacter")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="/umbraco_client/tinymce3/tiny_mce_popup.js"></script>
<script type="text/javascript" src="/umbraco_client/tinymce3/themes/umbraco/js/charmap.js"></script>
<base target="_self" />
</head>
<body id="charmap" style="display:none">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/themes/umbraco/js/charmap.js" PathNameAlias="UmbracoClient" Priority="101" />
<table align="center" border="0" cellspacing="0" cellpadding="2">
<tr>
<td id="charmapView" rowspan="2" align="left" valign="top">
@@ -4,10 +4,14 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace umbraco.presentation.umbraco.plugins.tinymce3 {
public partial class insertChar : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
}
}
namespace umbraco.presentation.umbraco.plugins.tinymce3
{
public partial class insertChar : System.Web.UI.Page
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
ClientLoader.DataBind();
}
}
}
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,5 +12,32 @@ namespace umbraco.presentation.umbraco.plugins.tinymce3 {
public partial class insertChar {
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
}
}
@@ -1,24 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertImage.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertImage" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>{#advimage_dlg.dialog_title}</title>
<script type="text/javascript" src="../../../umbraco_client/ui/jquery.js"></script>
<script type="text/javascript" src="../../../umbraco_client/ui/default.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/mctabs.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/form_utils.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/validate.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/editable_selects.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/plugins/umbracoimg/js/image.js"></script>
<!--
<link href="../../../umbraco_client/tinymce3/plugins/advImage/css/advimage.css" rel="stylesheet" type="text/css" />
-->
<base target="_self" />
<script type="text/javascript" language="javascript">
@@ -112,6 +100,23 @@
</head>
<body id="advimage" style="display: none">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="0" />
<umb:JsInclude ID="JsInclude8" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="4" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/mctabs.js" PathNameAlias="UmbracoClient" Priority="101" />
<umb:JsInclude ID="JsInclude6" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
<umb:JsInclude ID="JsInclude7" runat="server" FilePath="tinymce3/utils/validate.js" PathNameAlias="UmbracoClient" Priority="103" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="tinymce3/utils/editable_selects.js" PathNameAlias="UmbracoClient" Priority="110" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/plugins/umbracoimg/js/image.js" PathNameAlias="UmbracoClient" Priority="111" />
<form runat="server" onsubmit="ImageDialog.insert();return false;" action="#">
<input type="hidden" name="orgWidth" id="orgWidth" /><input type="hidden" name="orgHeight" id="orgHeight" />
@@ -13,6 +13,8 @@ namespace umbraco.presentation.plugins.tinymce3
protected void Page_Load(object sender, System.EventArgs e)
{
ClientLoader.DataBind();
pp_src.Text = ui.Text("url");
pp_title.Text = ui.Text("name");
pp_dimensions.Text = ui.Text("dimensions");
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,87 @@ namespace umbraco.presentation.plugins.tinymce3 {
public partial class insertImage {
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude3;
/// <summary>
/// JsInclude8 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude8;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude5 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude5;
/// <summary>
/// JsInclude6 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude6;
/// <summary>
/// JsInclude7 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude7;
/// <summary>
/// JsInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude2;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
/// <summary>
/// pane_src control.
/// </summary>
@@ -1,4 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertLink.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertLink" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -6,17 +7,6 @@
<head id="Head1" runat="server">
<title>{#advlink_dlg.title}</title>
<script type="text/javascript" src="../../../umbraco_client/ui/jquery.js"></script>
<!--
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/mctabs.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/validate.js"></script>
<link href="../../../umbraco_client/tinymce3/plugins/advlink/css/advlink.css" rel="stylesheet" type="text/css" />
-->
<script type="text/javascript" src="../../../umbraco_client/tinymce3/tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/plugins/advlink/js/advlink.js"></script>
<script type="text/javascript" src="../../../umbraco_client/tinymce3/utils/form_utils.js"></script>
<base target="_self" />
@@ -80,6 +70,19 @@
</head>
<body id="advlink" style="display: none">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/jquery.js" PathNameAlias="UmbracoClient" Priority="0" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="tinymce3/plugins/advlink/js/advlink.js" PathNameAlias="UmbracoClient" Priority="101" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
<form runat="server" action="#">
<asp:ScriptManager EnablePartialRendering="false" runat="server">
<Services>
@@ -12,6 +12,8 @@ namespace umbraco.presentation.plugins.tinymce3
protected void Page_Load(object sender, System.EventArgs e)
{
ClientLoader.DataBind();
uicontrols.TabPage tp = tv_options.NewTabPage(ui.Text("content"));
tp.HasMenu = false;
tp.Controls.Add(pane_content);
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -22,6 +22,51 @@ namespace umbraco.presentation.plugins.tinymce3 {
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// ClientLoader control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.ClientDependencyLoader ClientLoader;
/// <summary>
/// JsInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude2;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude3;
/// <summary>
/// JsInclude4 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// pane_url control.
/// </summary>
@@ -26,10 +26,11 @@ namespace umbraco.cms.presentation.settings.stylesheet
if(!IsPostBack)
{
// editor source
if (UmbracoSettings.ScriptDisableEditor)
editorSource.Text = "<script src=\"../../js/textareaEditor.js\" type=\"text/javascript\"></script>";
else
editorSource.Text = "<script src=\"../../js/codepress/codepress.js\" type=\"text/javascript\"></script>";
if (!UmbracoSettings.ScriptDisableEditor)
{
// TODO: Register the some script editor js file if you can find a good one.
}
ClientTools
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadStylesheets>().Tree.Alias)
+1 -1
View File
@@ -26,7 +26,7 @@
<body>
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
+3 -2
View File
@@ -19,7 +19,7 @@
<body id="umbracoMainPageBody">
<umb:ClientDependencyLoader runat="server" id="ClientLoader" EmbedType="Header" IsDebugMode="false" >
<Paths>
<umb:ClientDependencyPath Name="UmbracoClient" Path="~/umbraco_client" />
<umb:ClientDependencyPath Name="UmbracoClient" Path='<%#umbraco.GlobalSettings.ClientPath%>' />
<umb:ClientDependencyPath Name="UmbracoRoot" Path='<%#umbraco.GlobalSettings.Path%>' />
</Paths>
</umb:ClientDependencyLoader>
@@ -40,6 +40,7 @@
<umb:JsInclude ID="JsInclude11" runat="server" FilePath="js/language.aspx" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="modal/modal.js" PathNameAlias="UmbracoClient" Priority="10" />
<umb:JsInclude ID="JsInclude12" runat="server" FilePath="js/UmbracoSpeechBubbleBackend.js" PathNameAlias="UmbracoRoot" />
@@ -109,7 +110,7 @@
</div>
</div>
<script type="text/javascript" src="js/UmbracoSpeechBubbleBackend.js"></script>
<script type="text/javascript">
+9
View File
@@ -148,6 +148,15 @@ namespace umbraco.cms.presentation {
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude4;
/// <summary>
/// JsInclude12 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude12;
/// <summary>
/// Form1 control.
/// </summary>
@@ -4,13 +4,12 @@
<%@ Register Src="NodePermissions.ascx" TagName="NodePermissions" TagPrefix="user" %>
<%@ Register Namespace="umbraco.presentation.controls" Assembly="umbraco" TagPrefix="tree" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.presentation.ClientDependency.Controls" Assembly="umbraco.presentation.ClientDependency" %>
<asp:Content ContentPlaceHolderID="head" runat="server">
<script type="text/javascript" src="/umbraco_client/Application/JQuery/jquery.metadata.min.js"></script>
<link rel="stylesheet" type="text/css" href="/umbraco_client/Tree/Themes/tree_component.css" />
<link rel="stylesheet" type="text/css" href="/umbraco/css/umbracoGui.css" />
<link rel="stylesheet" type="text/css" href="../css/permissionsEditor.css" />
<script type="text/javascript" src="PermissionsEditor.js"></script>
<umb:CssInclude ID="CssInclude2" runat="server" FilePath="css/permissionsEditor.css" PathNameAlias="UmbracoRoot" />
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="css/umbracoGui.css" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="PermissionsEditor.js" />
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server">
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -13,6 +13,33 @@ namespace umbraco.cms.presentation.user {
public partial class PermissionEditor {
/// <summary>
/// CssInclude2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.CssInclude CssInclude2;
/// <summary>
/// CssInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.CssInclude CssInclude1;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.presentation.ClientDependency.Controls.JsInclude JsInclude1;
/// <summary>
/// pnlUmbraco control.
/// </summary>