From 23e4003af030a6d0b302b48cf57a6799a1589964 Mon Sep 17 00:00:00 2001 From: Robert Stocks Date: Tue, 27 Aug 2013 12:04:20 +0100 Subject: [PATCH 1/6] U4-516 - Fix DatePicker with time default value Enables the standard jQuery date picker to parse the current value of the field correctly, this prevents it from defaulting to Today and overwriting the currently stored value. --- .../umbraco_client/DateTimePicker/timepicker.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js b/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js index af27a79d43..f5034b4707 100644 --- a/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js +++ b/src/Umbraco.Web.UI/umbraco_client/DateTimePicker/timepicker.js @@ -62,9 +62,19 @@ $.datepicker._connectDatepicker = function(target, inst) { */ $.datepicker._showDatepickerOverride = $.datepicker._showDatepicker; $.datepicker._showDatepicker = function (input) { + // keep the current value + var originalval = input.value; + + // Keep the first 10 chars for now yyyy-mm-dd - this removes the time part which was breaking the standardDatePicker parsing code + input.value = originalval.length>10 ? originalval.substring(0, 10) : originalval; + + // Call the original method which will show the datepicker $.datepicker._showDatepickerOverride(input); + // Put it back + input.value = originalval; + input = input.target || input; // find from button/image trigger From a262f0b3423094e607f501b0b76c64d591495810 Mon Sep 17 00:00:00 2001 From: AndyButland Date: Sat, 31 Aug 2013 22:52:54 +0100 Subject: [PATCH 2/6] Fixed bug where member authorise attribute was not restricting for groups --- src/Umbraco.Web/Security/WebSecurity.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index f45ff9c30e..a7a57c3c32 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -70,15 +70,15 @@ namespace Umbraco.Web.Security var allowGroupsList = allowGroups as IList ?? allowGroups.ToList(); if (allowAction && allowGroupsList.Any(allowGroup => allowGroup != string.Empty)) { - // Allow only if member's type is in list + // Allow only if member is assigned to a group in the list var groups = Roles.GetRolesForUser(member.LoginName); - allowAction = groups.Select(s => s.ToLowerInvariant()).Intersect(groups.Select(myGroup => myGroup.ToLowerInvariant())).Any(); + allowAction = allowGroupsList.Select(s => s.ToLowerInvariant()).Intersect(groups.Select(myGroup => myGroup.ToLowerInvariant())).Any(); } // If specific members defined, check member is of one of those if (allowAction && allowMembers.Any()) { - // Allow only if member's type is in list + // Allow only if member's Id is in the list allowAction = allowMembers.Contains(member.Id); } } From 14303fab0c73c47cfeed75c9f884312650129aa8 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 1 Sep 2013 15:05:17 +0200 Subject: [PATCH 3/6] File move didn't make it into the csproj file previously, leading to build errors. Fixed! Also changed default PartialView template and added another Empty one --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 5 +---- .../Templates/EmptyTemplate (ForUseWithCustomViews).cshtml | 1 + .../Umbraco/PartialViews/Templates/EmptyTemplate.cshtml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index e6268bac20..f42a281ded 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -516,6 +516,7 @@ umbracoPage.Master + QuickSearch.ascx ASPXCodeBehind @@ -2142,11 +2143,7 @@ - - - - diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml new file mode 100644 index 0000000000..8d10a3a9c7 --- /dev/null +++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate (ForUseWithCustomViews).cshtml @@ -0,0 +1 @@ +@inherits Umbraco.Web.Mvc.UmbracoViewPage \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml index d82bc50fef..2363dcc14c 100644 --- a/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml +++ b/src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml @@ -1 +1 @@ -@inherits Umbraco.Web.Mvc.UmbracoViewPage \ No newline at end of file +@inherits Umbraco.Web.Mvc.UmbracoTemplatePage \ No newline at end of file From 3d4b54064f73deda916a9aaf99cd5a0ac649c2fd Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 1 Sep 2013 15:32:55 +0200 Subject: [PATCH 4/6] I love managing files in csproj files.. NOT. --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index f42a281ded..f9d60fbacb 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -516,7 +516,6 @@ umbracoPage.Master - QuickSearch.ascx ASPXCodeBehind @@ -2149,6 +2148,9 @@ + + Code + @@ -2606,8 +2608,8 @@ - - + + From e9b9fb15c12e113bc323e55a1bc82db7b47e3eaa Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 1 Sep 2013 16:47:28 +0200 Subject: [PATCH 5/6] Can't install starterkits message was always showing, even if install folder was present --- .../umbraco/developer/Packages/StarterKits.aspx.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs index 0352406992..d7298d09a1 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs +++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Web; -using System.Web.UI; using Umbraco.Core.IO; using Umbraco.Web.UI.Install.Steps.Skinning; using Umbraco.Web.UI.Pages; @@ -24,9 +21,9 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages private void ShowStarterKits() { - if (Directory.Exists(this.Server.MapPath(SystemDirectories.Install)) == false) + if (Directory.Exists(Server.MapPath(SystemDirectories.Install)) == false) { - this.InstallationDirectoryNotAvailable.Visible = true; + InstallationDirectoryNotAvailable.Visible = true; StarterKitNotInstalled.Visible = false; StarterKitInstalled.Visible = false; @@ -41,7 +38,6 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages StarterKitNotInstalled.Visible = true; StarterKitInstalled.Visible = false; - InstallationDirectoryNotAvailable.Visible = true; } From c3ef39661b9f4467e3836da62fafc521158dcc99 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 1 Sep 2013 17:21:19 +0200 Subject: [PATCH 6/6] Fix MySQL install failing on UmbracoServer table --- .../DatabaseModelDefinitions/DefinitionFactory.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs index f987e69b3d..9b08279716 100644 --- a/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs +++ b/src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs @@ -3,6 +3,7 @@ using System.Data; using System.Linq; using System.Reflection; using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Core.Persistence.SqlSyntax; namespace Umbraco.Core.Persistence.DatabaseModelDefinitions { @@ -107,6 +108,12 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions var constraintAttribute = propertyInfo.FirstAttribute(); if (constraintAttribute != null) { + //Special case for MySQL as it can't have multiple default DateTime values, which + //is what the umbracoServer table definition is trying to create + if (SqlSyntaxContext.SqlSyntaxProvider is MySqlSyntaxProvider && definition.TableName == "umbracoServer" && + definition.TableName.ToLowerInvariant() == "lastNotifiedDate".ToLowerInvariant()) + return definition; + definition.ConstraintName = constraintAttribute.Name ?? string.Empty; definition.DefaultValue = constraintAttribute.Default ?? string.Empty; }