Skip to content

Commit

Permalink
Merge pull request #14 from dmytroduk/cms11
Browse files Browse the repository at this point in the history
Rebuild for EPiServer Cms 11
  • Loading branch information
dmytroduk authored Mar 2, 2018
2 parents d6de352 + 4553daa commit 971eed6
Show file tree
Hide file tree
Showing 19 changed files with 563 additions and 367 deletions.
Binary file modified .nuget/NuGet.exe
Binary file not shown.
142 changes: 86 additions & 56 deletions Duk.EPiServer.Disqus.UI/Duk.EPiServer.Disqus.UI.csproj

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions Duk.EPiServer.Disqus.UI/Duk.EPiServer.Disqus.UI.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
<package >
<metadata>
<id>Duk.EPiServer.Disqus.UI</id>
<version>1.4.0</version>
<version>1.5.0</version>
<title>Disqus comments configuration UI</title>
<authors>Dmytro Duk</authors>
<owners>Dmytro Duk</owners>
<projectUrl>http://dmytroduk.com/projects/disqus-for-episerver</projectUrl>
<iconUrl>https://raw.githubusercontent.com/dmytroduk/Duk.EPiServer.Disqus/master/msbuild/Tools/icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://github.com/dmytroduk/Duk.EPiServer.Disqus/blob/master/License.md</licenseUrl>
<summary>Disqus integration UI for EPiServer-based websites.</summary>
<description>User interface to configure Disqus comments on EPiServer-based websites.</description>
<releaseNotes>Built for EPiServer CMS 10.</releaseNotes>
<releaseNotes>Built for EPiServer CMS 11.</releaseNotes>
<copyright>Dmytro Duk</copyright>
<tags>EPiServerModulePackage ThirdPartyAddOn Disqus Comments Social UI</tags>
<dependencies>
<dependency id="EPiServer.CMS.Core" version="[10.0.1,11)" />
<dependency id="EPiServer.Framework" version="[10.0.1,11)" />
<dependency id="Duk.EPiServer.Disqus" version="[1.4,2.0)" />
<dependency id="EPiServer.Packaging" version="[3.2.1,4.0)" />
<dependency id="EPiServer.CMS.Core" version="[11.1.0,12)" />
<dependency id="EPiServer.Framework" version="[11.1.0,12)" />
<dependency id="Duk.EPiServer.Disqus" version="[1.5,2.0)" />
<dependency id="EPiServer.Packaging" version="[3.4.0,4.0)" />
<dependency id="EPiServer.CMS.UI.Core" version="[11.1.0,12)" />
</dependencies>
</metadata>
<files>
Expand Down
13 changes: 8 additions & 5 deletions Duk.EPiServer.Disqus.UI/Models/EditModeClientResourceRegister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace Duk.EPiServer.Disqus.UI.Models
/// <summary>
/// Registers client resources that are required to indicate Disqus threads in Edit UI.
/// </summary>
[ClientResourceRegister]
public class EditModeClientResourceRegister : IClientResourceRegister
[ClientResourceRegistrator]
public class EditModeClientResourceRegister : IClientResourceRegistrator
{
private readonly LocalizationService _localizationService;
private readonly IContextProvider _contextProvider;
Expand All @@ -32,8 +32,7 @@ public EditModeClientResourceRegister(LocalizationService localizationService, I
/// Registers the Disqus client resources to be rendered in defined areas.
/// </summary>
/// <param name="requiredResources">The required resources.</param>
/// <param name="context">The context.</param>
public void RegisterResources(IRequiredClientResourceList requiredResources, HttpContextBase context)
public void RegisterResources(IRequiredClientResourceList requiredResources)
{
var renderingContext = _contextProvider.GetContext();

Expand All @@ -58,7 +57,11 @@ public void RegisterResources(IRequiredClientResourceList requiredResources, Htt
// Inject the following styles for Edit and Preview modes
requiredResources.Require("duk-disqus.PreviewMode");

context.Items[ResourcesAreRegisteredKey] = true;
var httpContext = HttpContext.Current;
if (httpContext != null)
{
httpContext.Items[ResourcesAreRegisteredKey] = true;
}
}

/// <summary>
Expand Down
10 changes: 4 additions & 6 deletions Duk.EPiServer.Disqus.UI/Models/RenderingEditModeExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void RegisterClientResources(IRequiredClientResourceList requiredResource
// Require scripts here.
// Styles should be require in client resource register to make sure that they are added in Header area before that area is rendered.

// HACK: Ugly fallback to register client resources (styles) if it was not registered using IClientResourceRegister.
// HACK: Ugly fallback to register client resources (styles) if it was not registered using IClientResourceRegistrator.
// It may happen when templates don't meet the standard requirements for EPiServer CMS page templates
// and don't require/render client resources. For example: block preview template in Alloy.
// Open question: Should we solve it here?
Expand All @@ -55,12 +55,10 @@ public void RegisterClientResources(IRequiredClientResourceList requiredResource
return;
}
// Fallback: register now
var register = ServiceLocator.Current.GetAllInstances<IClientResourceRegister>()
var register = ServiceLocator.Current.GetAllInstances<IClientResourceRegistrator>()
.FirstOrDefault(r => typeof (EditModeClientResourceRegister) == r.GetType());
if (register != null)
{
register.RegisterResources(requiredResources, _context);
}

register?.RegisterResources(requiredResources);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Duk.EPiServer.Disqus.UI/Models/UiInitializationModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public class UiInitializationModule : IConfigurableModule
/// </summary>
/// <param name="context">The context.</param>
public void ConfigureContainer(ServiceConfigurationContext context)
{
context.Container.Configure(ce => ce.For<IRenderingEditModeExtension>().Use<RenderingEditModeExtension>());
{
context.Services.AddTransient<IRenderingEditModeExtension, RenderingEditModeExtension>();
}

/// <summary>
Expand Down
48 changes: 36 additions & 12 deletions Duk.EPiServer.Disqus.UI/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,84 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EPiServer.Framework" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Shell" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.2.0" newVersion="10.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Data" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Licensing" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.ApplicationModules" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Events" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="StructureMap" publicKeyToken="e60ad81abae3c223" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.9.463" newVersion="3.1.9.463" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Configuration" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.XForms" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Enterprise" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.LinkAnalyzer" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Web.WebControls" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.ImageLibrary" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Data.Cache" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.1.0" newVersion="10.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Framework.AspNet" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Cms.AspNet" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.UI" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EPiServer.Cms.Shell.UI" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.1.0.0" newVersion="11.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
30 changes: 20 additions & 10 deletions Duk.EPiServer.Disqus.UI/packages.config
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net45" developmentDependency="true" />
<package id="Castle.Windsor" version="3.3.0" targetFramework="net45" developmentDependency="true" />
<package id="EPiServer.CMS.Core" version="10.0.1" targetFramework="net45" />
<package id="EPiServer.CMS.UI.Core" version="10.0.2" targetFramework="net45" />
<package id="EPiServer.Framework" version="10.0.1" targetFramework="net45" />
<package id="EPiServer.Logging.Log4Net" version="2.1.0" targetFramework="net45" developmentDependency="true" />
<package id="log4net" version="2.0.3" targetFramework="net45" developmentDependency="true" />
<package id="Castle.Core" version="4.2.1" targetFramework="net461" developmentDependency="true" />
<package id="Castle.Windsor" version="4.1.0" targetFramework="net461" developmentDependency="true" />
<package id="EPiServer.CMS.AspNet" version="11.1.0" targetFramework="net461" />
<package id="EPiServer.CMS.Core" version="11.1.0" targetFramework="net461" />
<package id="EPiServer.CMS.UI.Core" version="11.1.0" targetFramework="net461" />
<package id="EPiServer.Framework" version="11.1.0" targetFramework="net461" />
<package id="EPiServer.Framework.AspNet" version="11.1.0" targetFramework="net461" />
<package id="EPiServer.Logging.Log4Net" version="2.2.0" targetFramework="net461" developmentDependency="true" />
<package id="log4net" version="2.0.8" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" developmentDependency="true" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net40" developmentDependency="true" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" developmentDependency="true" />
<package id="Microsoft.Tpl.Dataflow" version="4.5.24" targetFramework="net461" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" developmentDependency="true" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" developmentDependency="true" />
<package id="structuremap.web-signed" version="3.1.6.186" targetFramework="net45" />
<package id="structuremap-signed" version="3.1.6.186" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" developmentDependency="true" />
<package id="System.ComponentModel.Annotations" version="4.4.0" targetFramework="net461" />
<package id="System.Data.SqlClient" version="4.4.0" targetFramework="net461" />
<package id="System.Reflection.Emit" version="4.3.0" targetFramework="net461" />
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net461" />
<package id="System.Security.AccessControl" version="4.4.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Xml" version="4.4.0" targetFramework="net461" />
<package id="System.Security.Permissions" version="4.4.0" targetFramework="net461" />
<package id="System.Security.Principal.Windows" version="4.4.0" targetFramework="net461" />
<package id="System.Threading.AccessControl" version="4.4.0" targetFramework="net461" />
</packages>
Loading

0 comments on commit 971eed6

Please sign in to comment.