WORK IN PROGRESS, GET THE STABLE SOURCE FROM THE DOWNLOADS TAB

4.0.3 release merged into 4.1.0 branch, css tweaks to tree and context menu

[TFS Changeset #64446]
This commit is contained in:
PerPloug
2010-03-04 15:04:19 +00:00
parent d7c1b29b2e
commit 1d6c3f655d
19 changed files with 270 additions and 42 deletions
+3 -1
View File
@@ -93,6 +93,8 @@
<!-- Baseline Language file for translation tool -->
<copy file="${build.dir}\umbraco\config\lang\en.xml" tofile="${web.dir}\usercontrols\translation\langs\en.xml" failonerror="false" overwrite="true"/>
<!-- LINQ2UMB dll-->
<copy file="${root.dir}\LinqToUmbraco\src\umbraco.Linq\Core\bin\Debug - Fixed Version\umbraco.Linq.Core.dll" tofile="${build.dir}\bin\umbraco.Linq.Core.dll" failonerror="false" overwrite="true"/>
<delete dir="${build.dir}\webservices" />
@@ -107,7 +109,7 @@
<delete dir="${build.dir}\python" />
<delete dir="${build.dir}\xslt" />
<delete dir="${build.dir}\usercontrols" />
<delete>
<fileset>
+4 -2
View File
@@ -45,7 +45,7 @@ namespace umbraco.BusinessLogic.Actions
if (_actionHandlers.Count > 0)
return;
List<Type> foundIActionHandlers = TypeFinder.FindClassesOfType<IActionHandler>();
List<Type> foundIActionHandlers = TypeFinder.FindClassesOfType<IActionHandler>(true);
foreach (Type type in foundIActionHandlers)
{
IActionHandler typeInstance;
@@ -63,7 +63,7 @@ namespace umbraco.BusinessLogic.Actions
if (_actions.Count > 0)
return;
List<Type> foundIActions = TypeFinder.FindClassesOfType<IAction>();
List<Type> foundIActions = TypeFinder.FindClassesOfType<IAction>(true);
foreach (Type type in foundIActions)
{
IAction typeInstance;
@@ -250,4 +250,6 @@ namespace umbraco.BusinessLogic.Actions
);
}
}
}
+15 -15
View File
@@ -11,19 +11,19 @@ using umbraco.interfaces;
namespace umbraco.BusinessLogic.Actions
{
/// <summary>
/// Implement the IActionHandler interface in order to automatically get code
/// run whenever a document, member or media changed, deleted, created etc.
/// The Clases implementing IActionHandler are loaded at runtime which means
/// that there are no other setup when creating a custom actionhandler.
/// </summary>
/// <example>
///
/// </example>
public interface IActionHandler
{
bool Execute(Document documentObject, IAction action);
IAction[] ReturnActions();
string HandlerName();
}
/// <summary>
/// Implement the IActionHandler interface in order to automatically get code
/// run whenever a document, member or media changed, deleted, created etc.
/// The Clases implementing IActionHandler are loaded at runtime which means
/// that there are no other setup when creating a custom actionhandler.
/// </summary>
/// <example>
///
/// </example>
public interface IActionHandler
{
bool Execute(Document documentObject, IAction action);
IAction[] ReturnActions();
string HandlerName();
}
}
+32
View File
@@ -1479,6 +1479,11 @@ namespace umbraco.cms.businesslogic.web
public delegate void MoveToTrashEventHandler(Document sender, MoveToTrashEventArgs e);
/// <summary>
/// The index event handlers
/// </summary>
public delegate void IndexEventHandler(Document sender, AddToIndexEventArgs e);
/// <summary>
/// Occurs when [before save].
/// </summary>
@@ -1734,6 +1739,33 @@ namespace umbraco.cms.businesslogic.web
AfterRollBack(this, e);
}
/// <summary>
/// Occurs when [before add to index].
/// </summary>
public static event IndexEventHandler BeforeAddToIndex;
/// <summary>
/// Raises the <see cref="E:BeforeAddToIndex"/> event.
/// </summary>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected virtual void FireBeforeAddToIndex(AddToIndexEventArgs e) {
if (BeforeAddToIndex != null)
BeforeAddToIndex(this, e);
}
/// <summary>
/// Occurs when [after add to index].
/// </summary>
public static event IndexEventHandler AfterAddToIndex;
/// <summary>
/// Raises the <see cref="E:AfterAddToIndex"/> event.
/// </summary>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected virtual void FireAfterAddToIndex(AddToIndexEventArgs e)
{
if (AfterAddToIndex != null)
AfterAddToIndex(this, e);
}
private Dictionary<Property, object> _knownProperties;
private Func<KeyValuePair<Property, object>, string, bool> propertyTypeByAlias = (pt, alias) => pt.Key.PropertyType.Alias == alias;
public object this[string alias]
+32 -2
View File
@@ -26,6 +26,8 @@ using System.Web.Security;
using umbraco.cms.businesslogic.language;
using umbraco.IO;
using umbraco.presentation;
using System.Collections;
using System.Collections.Generic;
namespace umbraco
{
@@ -176,7 +178,7 @@ namespace umbraco
new Guid("27ab3022-3dfa-47b6-9119-5945bc88fd66"),
DocumentId);
else
content.Instance.UnPublishNode(DocumentId);
content.Instance.ClearDocumentCache(DocumentId);
}
/// <summary>
@@ -863,7 +865,7 @@ namespace umbraco
/// <returns>A string with the DayOfWeek matching the current contexts culture settings</returns>
public static string GetWeekDay(string Date)
{
return DateTime.Parse(Date).DayOfWeek.ToString();
return DateTime.Parse(Date).ToString("dddd");
}
/// <summary>
@@ -1149,6 +1151,8 @@ namespace umbraco
{
if (UmbracoSettings.UseAspNetMasterPages)
{
System.Collections.Generic.Dictionary<object, object> items = getCurrentContextItems();
if (!umbraco.presentation.UmbracoContext.Current.LiveEditingContext.Enabled)
{
HttpContext Context = HttpContext.Current;
@@ -1165,6 +1169,10 @@ namespace umbraco
Context.Server.Execute(
string.Format("/default.aspx?umbPageID={0}&alttemplate={1}{2}",
PageId, new template(TemplateId).TemplateAlias, queryString), sw);
// update the local page items again
updateLocalContextItems(items, Context);
return sw.ToString();
}
else
@@ -1190,6 +1198,28 @@ namespace umbraco
}
}
private static System.Collections.Generic.Dictionary<object, object> getCurrentContextItems()
{
IDictionary items = HttpContext.Current.Items;
System.Collections.Generic.Dictionary<object, object> currentItems = new Dictionary<object, object>();
IDictionaryEnumerator ide = items.GetEnumerator();
while (ide.MoveNext())
{
currentItems.Add(ide.Key, ide.Value);
}
return currentItems;
}
private static void updateLocalContextItems(IDictionary items, HttpContext Context)
{
Context.Items.Clear();
IDictionaryEnumerator ide = items.GetEnumerator();
while (ide.MoveNext())
{
Context.Items.Add(ide.Key, ide.Value);
}
}
/// <summary>
/// Renders the default template for a specific page.
/// </summary>
+1
View File
@@ -31,6 +31,7 @@ namespace umbraco.presentation.cache {
/// <remarks/>
public CacheRefresher() {
this.Url = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + IOHelper.ResolveUrl(SystemDirectories.Webservices) + "/cacheRefresher.asmx";
}
/// <remarks/>
@@ -6,6 +6,7 @@ using umbraco.BusinessLogic;
using umbraco.DataLayer;
using umbraco.BasePages;
using umbraco.IO;
using umbraco.cms.businesslogic.member;
namespace umbraco
{
@@ -1316,9 +1317,26 @@ namespace umbraco
#endregion
}
public class NewMemberUIEventArgs : System.ComponentModel.CancelEventArgs
{
}
public class memberTasks : interfaces.ITaskReturnUrl
{
/// <summary>
/// The new event handler
/// </summary>
new public delegate void NewUIMemberEventHandler(Member sender, string unencryptedPassword, NewMemberUIEventArgs e);
new public static event NewUIMemberEventHandler NewMember;
new protected virtual void OnNewMember(NewMemberUIEventArgs e, string unencryptedPassword, Member m)
{
if (NewMember != null)
{
NewMember(m, unencryptedPassword, e);
}
}
private string _alias;
private int _parentID;
@@ -1374,6 +1392,10 @@ namespace umbraco
m.Password = password;
m.Email = email;
m.LoginName = name.Replace(" ", "").ToLower();
NewMemberUIEventArgs e = new NewMemberUIEventArgs();
this.OnNewMember(e, password, m);
_returnUrl = "members/editMember.aspx?id=" + m.Id.ToString();
}
else
+17 -4
View File
@@ -29,6 +29,7 @@
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="ui/default.css" PathNameAlias="UmbracoClient" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="ui/jqueryui.js" PathNameAlias="UmbracoClient" />
<form id="Form1" method="post" runat="server">
@@ -88,11 +89,23 @@
</form>
<script type="text/javascript">
document.getElementById("lname").focus();
document.getElementById('<%= hf_height.ClientID %>').value = getViewportHeight();
document.getElementById('<%= hf_width.ClientID %>').value = getViewportWidth();
</script>
jQuery("#ctl00_body_lname").focus();
jQuery('#<%= hf_height.ClientID %>').value = getViewportHeight();
jQuery('#<%= hf_width.ClientID %>').value = getViewportWidth();
</script>
<asp:PlaceHolder Visible="false" ID="loginError" runat="server">
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#loginTable").effect("shake", { times: 5, distance: 5 }, 80);
jQuery("#ctl00_body_lname").attr("style", jQuery("#ctl00_body_lname").attr("style") + "; border: 2px solid red;");
jQuery("#ctl00_body_passw").attr("style", jQuery("#ctl00_body_lname").attr("style") + "; border: 2px solid red;");
});
</script>
</asp:PlaceHolder>
</body>
</html>
@@ -109,6 +109,9 @@ namespace umbraco.cms.presentation
else
Response.Redirect(Request["redir"]);
}
else {
loginError.Visible = true;
}
}
/// <summary>
+19 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
// Runtime Version:2.0.50727.3603
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -40,6 +40,15 @@ namespace umbraco.cms.presentation {
/// </remarks>
protected global::ClientDependency.Core.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::ClientDependency.Core.Controls.JsInclude JsInclude2;
/// <summary>
/// Form1 control.
/// </summary>
@@ -138,5 +147,14 @@ namespace umbraco.cms.presentation {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hf_width;
/// <summary>
/// loginError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder loginError;
}
}
@@ -1,4 +1,4 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="umbracoDialog.master.cs" Inherits="umbraco.presentation.umbraco.masterpages.umbracoDialog" %>
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="umbracoDialog.master.cs" Inherits="umbraco.presentation.masterpages.umbracoDialog" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
@@ -7,6 +7,7 @@
<head id="Head1" runat="server">
<title></title>
<!-- Default script and style -->
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="ui/default.css" PathNameAlias="UmbracoClient" />
@@ -4,15 +4,33 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace umbraco.presentation.umbraco.masterpages {
namespace umbraco.presentation.masterpages {
public partial class umbracoDialog : System.Web.UI.MasterPage {
public bool reportModalSize { get; set; }
public static event MasterPageLoadHandler Load;
public static event MasterPageLoadHandler Init;
protected void Page_Load(object sender, EventArgs e)
{
ClientLoader.DataBind();
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "setRoot", "UmbClientMgr.setUmbracoPath(\"" + IO.IOHelper.ResolveUrl( IO.SystemDirectories.Umbraco ) + "\");", true);
FireOnLoad(e);
}
protected override void OnInit(EventArgs e) {
base.OnInit(e);
if (Init != null) {
Init(this, e);
}
}
protected virtual void FireOnLoad(EventArgs e) {
if (Load != null) {
Load(this, e);
}
}
}
}
@@ -1,14 +1,14 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
// Runtime Version:2.0.50727.3603
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.umbraco.masterpages {
namespace umbraco.presentation.masterpages {
public partial class umbracoDialog {
@@ -4,13 +4,43 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace umbraco.presentation.umbraco.masterpages
//This is only in case an upgrade goes wrong and the the /masterpages/ files are not copied over
//which would result in an error. so we have kept the old namespaces intact with references to new ones
using mp = umbraco.presentation.masterpages;
namespace umbraco.presentation.umbraco.masterpages {
public class umbracoPage : mp.umbracoPage { }
public class umbracoDialog : mp.umbracoDialog { }
}
namespace umbraco.presentation.masterpages
{
public delegate void MasterPageLoadHandler(object sender, System.EventArgs e);
public partial class umbracoPage : System.Web.UI.MasterPage
{
public static event MasterPageLoadHandler Load;
public static event MasterPageLoadHandler Init;
protected void Page_Load(object sender, EventArgs e)
{
ClientLoader.DataBind();
FireOnLoad(e);
}
protected override void OnInit(EventArgs e) {
base.OnInit(e);
if (Init != null) {
Init(this, e);
}
}
protected virtual void FireOnLoad(EventArgs e) {
if (Load != null) {
Load(this, e);
}
}
}
}
@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace umbraco.presentation.umbraco.masterpages {
namespace umbraco.presentation.masterpages {
public partial class umbracoPage {
@@ -5,6 +5,8 @@
min-height: 20px;
font: icon;
position:relative;
font-family: Arial,Lucida Grande;
font-size: 12px;
}
.tree-umbraco li a
{
@@ -95,32 +97,41 @@
background: #f0f0f0 url(contextMenuBg.gif) repeat-y left;
border: 1px solid #979797;
padding: 3px;
padding-top: 2px;
padding-bottom: 0px;
width: 180px;
font-family: Arial,Lucida Grande;
font-size: 11px;
z-index: 1000;
margin: 0px;
display: block;
}
#jstree-contextmenu.tree-umbraco-context li
{
border-left:none;
background:transparent;
margin:0;
height: 26px;
}
#jstree-contextmenu.tree-umbraco-context li a
{
border:0px;
padding: 1px;
margin: 1px;
padding: 2px;
height: 20px;
line-height:20px;
color: #1a1818;
text-decoration: none;
text-indent: 0px;
margin-top: 1px !Important;
margin-bottom: 3px !Important;
}
#jstree-contextmenu.tree-umbraco-context li a:hover
{
border: 1px solid #a8d8eb;
padding: 0px;
padding: 1px;
background: #dcecf3;
text-indent: 0px;
}
@@ -131,7 +142,7 @@
font-size: 1px;
height: 1px;
line-height: 1px;
margin: 0 2px 0 24px;
margin: 0 2px 4px 29px;
min-height: 1px;
display: block;
}
@@ -140,11 +151,12 @@
{
height: 16px;
width: 16px;
margin: 1px 10px 0 2px;
margin: 1px 10px 0 4px;
}
#jstree-contextmenu.tree-umbraco-context li a ins {display:none;}
#jstree-contextmenu.tree-umbraco-context li a span {margin:0;padding-left:0px;background:none;}
#jstree-contextmenu.tree-umbraco-context li a ins {display:none;}
#jstree-contextmenu.tree-umbraco-context li a span {margin:0;padding-left:1px;background:none;}
#jstree-contextmenu.tree-umbraco-context li a span div.menuLabel{padding-left: 37px;}
/* Tree icons sprites */
+2 -2
View File
@@ -28,8 +28,8 @@
<UmbracoExamine configSource="config\ExamineSettings.config" />
<ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
<appSettings>
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=virtual;user id=web;password=farmer" />
<add key="umbracoConfigurationStatus" value="4.1.0.beta" />
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=umbraco;user id=web;password=farmer" />
<add key="umbracoConfigurationStatus" value="4.1.0.betaII" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/data/umbraco.config" />
+43
View File
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text;
using umbraco.cms.businesslogic.member;
namespace umbraco.providers.members
{
public class Helper
{
public static bool GuidPseudoTryParse(string guidToTest)
{
Guid memberUniqueId;
try
{
memberUniqueId = new Guid(guidToTest);
}
catch (FormatException)
{
memberUniqueId = Guid.Empty;
return false;
}
return true;
}
public static Member GetMemberByUsernameOrGuid(string userNameOrGuid)
{
Member m = null;
// test if username is a GUID (then it comes from member core login)
if (GuidPseudoTryParse(userNameOrGuid))
{
m = new Member(new Guid(userNameOrGuid));
}
else
{
m = Member.GetMemberFromLoginName(userNameOrGuid);
}
return m;
}
}
}
+2 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D7636876-0756-43CB-A192-138C6F0D5E42}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -51,6 +51,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="members\Helper.cs" />
<Compile Include="members\MembersMembershipProvider.cs" />
<Compile Include="members\MembersProfileProvider.cs" />
<Compile Include="members\MembersRoleProvider.cs" />