diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
index 9d2cca3e6d..cfab82213a 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs
@@ -5,6 +5,8 @@
///
public interface IPublishedProperty
{
+ PublishedPropertyType PropertyType { get; }
+
///
/// Gets the alias of the property.
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
index 507e6f7843..bf1d940dbe 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
@@ -11,7 +11,9 @@ namespace Umbraco.Core.Models.PublishedContent
/// Instances of the class are immutable, ie
/// if the property type changes, then a new class needs to be created.
public class PublishedPropertyType
- {
+ {
+ //fixme - API design review, should this be an interface?
+
private readonly IPublishedModelFactory _publishedModelFactory;
private readonly PropertyValueConverterCollection _propertyValueConverters;
private readonly object _locker = new object();
diff --git a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
index c5b27554c9..4f63533693 100644
--- a/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
+++ b/src/Umbraco.Tests/PublishedContent/SolidPublishedSnapshot.cs
@@ -250,6 +250,7 @@ namespace Umbraco.Tests.PublishedContent
class SolidPublishedProperty : IPublishedProperty
{
+ public PublishedPropertyType PropertyType { get; set; }
public string Alias { get; set; }
public object SolidSourceValue { get; set; }
public object SolidValue { get; set; }
diff --git a/src/Umbraco.Web.UI/Umbraco/Views/Preview/web.config b/src/Umbraco.Web.UI/Umbraco/Views/Preview/web.config
index 5ab8bbc7d6..339972c139 100644
--- a/src/Umbraco.Web.UI/Umbraco/Views/Preview/web.config
+++ b/src/Umbraco.Web.UI/Umbraco/Views/Preview/web.config
@@ -9,7 +9,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/Views/Web.config b/src/Umbraco.Web.UI/Views/Web.config
index 9a97ba5be2..9c0bd5b5df 100644
--- a/src/Umbraco.Web.UI/Views/Web.config
+++ b/src/Umbraco.Web.UI/Views/Web.config
@@ -1,65 +1,65 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/src/Umbraco.Web.UI/umbraco/Install/Views/Web.config b/src/Umbraco.Web.UI/umbraco/Install/Views/Web.config
index d7f2ec9848..a14bad0760 100644
--- a/src/Umbraco.Web.UI/umbraco/Install/Views/Web.config
+++ b/src/Umbraco.Web.UI/umbraco/Install/Views/Web.config
@@ -9,7 +9,7 @@
-
+
@@ -38,11 +38,11 @@
-->
+ pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
+ userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
-
+
diff --git a/src/Umbraco.Web.UI/web.Template.Debug.config b/src/Umbraco.Web.UI/web.Template.Debug.config
index 510b4f17db..9bda916f26 100644
--- a/src/Umbraco.Web.UI/web.Template.Debug.config
+++ b/src/Umbraco.Web.UI/web.Template.Debug.config
@@ -356,7 +356,7 @@
-
+
@@ -368,7 +368,7 @@
-
+
diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config
index 901e9ea6d3..3b9835877a 100644
--- a/src/Umbraco.Web.UI/web.Template.config
+++ b/src/Umbraco.Web.UI/web.Template.config
@@ -95,7 +95,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
index 1ebfcb2841..6b3581aeab 100644
--- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
+++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs
@@ -195,72 +195,6 @@ namespace Umbraco.Web
return htmlHelper.Action(actionName, metaData.ControllerName, routeVals);
}
- #region GetCropUrl
-
- [Obsolete("Use the UrlHelper.GetCropUrl extension instead")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IHtmlString GetCropUrl(this HtmlHelper htmlHelper, IPublishedContent mediaItem, string cropAlias)
- {
- return new HtmlString(mediaItem.GetCropUrl(cropAlias: cropAlias, useCropDimensions: true));
- }
-
- [Obsolete("Use the UrlHelper.GetCropUrl extension instead")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IHtmlString GetCropUrl(this HtmlHelper htmlHelper, IPublishedContent mediaItem, string propertyAlias, string cropAlias)
- {
- return new HtmlString(mediaItem.GetCropUrl(propertyAlias: propertyAlias, cropAlias: cropAlias, useCropDimensions: true));
- }
-
- [Obsolete("Use the UrlHelper.GetCropUrl extension instead")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IHtmlString GetCropUrl(this HtmlHelper htmlHelper,
- IPublishedContent mediaItem,
- int? width = null,
- int? height = null,
- string propertyAlias = Constants.Conventions.Media.File,
- string cropAlias = null,
- int? quality = null,
- ImageCropMode? imageCropMode = null,
- ImageCropAnchor? imageCropAnchor = null,
- bool preferFocalPoint = false,
- bool useCropDimensions = false,
- bool cacheBuster = true,
- string furtherOptions = null,
- ImageCropRatioMode? ratioMode = null,
- bool upScale = true)
- {
- return
- new HtmlString(mediaItem.GetCropUrl(width, height, propertyAlias, cropAlias, quality, imageCropMode,
- imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBuster, furtherOptions, ratioMode,
- upScale));
- }
-
- [Obsolete("Use the UrlHelper.GetCropUrl extension instead")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IHtmlString GetCropUrl(this HtmlHelper htmlHelper,
- string imageUrl,
- int? width = null,
- int? height = null,
- string imageCropperValue = null,
- string cropAlias = null,
- int? quality = null,
- ImageCropMode? imageCropMode = null,
- ImageCropAnchor? imageCropAnchor = null,
- bool preferFocalPoint = false,
- bool useCropDimensions = false,
- string cacheBusterValue = null,
- string furtherOptions = null,
- ImageCropRatioMode? ratioMode = null,
- bool upScale = true)
- {
- return
- new HtmlString(imageUrl.GetCropUrl(width, height, imageCropperValue, cropAlias, quality, imageCropMode,
- imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBusterValue, furtherOptions, ratioMode,
- upScale));
- }
-
- #endregion
-
#region BeginUmbracoForm
///
diff --git a/src/Umbraco.Web/Routing/UrlProvider.cs b/src/Umbraco.Web/Routing/UrlProvider.cs
index 5ef245d73b..6fa818f392 100644
--- a/src/Umbraco.Web/Routing/UrlProvider.cs
+++ b/src/Umbraco.Web/Routing/UrlProvider.cs
@@ -190,10 +190,8 @@ namespace Umbraco.Web.Routing
// this the ONLY place where we deal with default culture - IUrlProvider always receive a culture
if (culture == null)
- {
- culture = content.ContentType.Variations.Has(ContentVariation.CultureNeutral) // fixme CultureSegment
- ? _variationContextAccessor.VariationContext.Culture
- : null;
+ {
+ culture = _variationContextAccessor.VariationContext.Culture;
}
if (current == null)
diff --git a/src/Umbraco.Web/UrlHelperRenderExtensions.cs b/src/Umbraco.Web/UrlHelperRenderExtensions.cs
index 100881241f..bc2e2cef8f 100644
--- a/src/Umbraco.Web/UrlHelperRenderExtensions.cs
+++ b/src/Umbraco.Web/UrlHelperRenderExtensions.cs
@@ -6,6 +6,7 @@ using Umbraco.Core;
using Umbraco.Core.Exceptions;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
+using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Web.Composing;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
@@ -227,6 +228,29 @@ namespace Umbraco.Web
imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBusterValue, furtherOptions, ratioMode,
upScale);
return htmlEncode ? new HtmlString(HttpUtility.HtmlEncode(url)) : new HtmlString(url);
+ }
+
+ public static IHtmlString GetCropUrl(this UrlHelper urlHelper,
+ ImageCropperValue imageCropperValue,
+ int? width = null,
+ int? height = null,
+ string cropAlias = null,
+ int? quality = null,
+ ImageCropMode? imageCropMode = null,
+ ImageCropAnchor? imageCropAnchor = null,
+ bool preferFocalPoint = false,
+ bool useCropDimensions = false,
+ string cacheBusterValue = null,
+ string furtherOptions = null,
+ ImageCropRatioMode? ratioMode = null,
+ bool upScale = true,
+ bool htmlEncode = true)
+ {
+ var imageUrl = imageCropperValue.Src;
+ var url = imageUrl.GetCropUrl(imageCropperValue, width, height, cropAlias, quality, imageCropMode,
+ imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBusterValue, furtherOptions, ratioMode,
+ upScale);
+ return htmlEncode ? new HtmlString(HttpUtility.HtmlEncode(url)) : new HtmlString(url);
}
#endregion