Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
SC-ILI committed Apr 13, 2017
1 parent e32bd0a commit d6d3154
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Sitecore.Support.102657.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9EBE17D8-E84A-4850-B60C-56A83A2B1972}") = "Sitecore.Support.102657", "Sitecore.Support.102657\Sitecore.Support.102657.csproj", "{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions src/Sitecore.Support.102657/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Sitecore.Support.102657")]
[assembly: AssemblyProduct("Sitecore.Support.102657")]
[assembly: ComVisible(false)]
88 changes: 88 additions & 0 deletions src/Sitecore.Support.102657/Sitecore.Support.102657.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0A7F33BF-E605-49BA-B0B1-40F0945BE6C9}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sitecore.Support</RootNamespace>
<AssemblyName>Sitecore.Support.102657</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Sitecore.Kernel">
<HintPath>..\packages\SC.Sitecore.Kernel.8.1.3\lib\Sitecore.Kernel.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="web.config" />
</ItemGroup>
<ItemGroup>
<Content Include="sitecore\shell\client\Sitecore\ExperienceEditor\Commands\SelectMode.js" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:50941/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
4 changes: 4 additions & 0 deletions src/Sitecore.Support.102657/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SC.Sitecore.Kernel" version="8.1.3" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
define(["sitecore", "/-/speak/v1/ExperienceEditor/ExperienceEditor.js"], function (Sitecore, ExperienceEditor) {
Sitecore.Commands.SelectMode =
{
canExecute: function (context, parent) {
if (!context.button) {
return context.app.canExecute("ExperienceEditor.Mode.CanSelectMode", context.currentContext);
}

if (!ExperienceEditor.isInMode("edit")) {
context.button.set({ isPressed : true });
}

return true;
},

execute: function (context) {
context.currentContext.value = encodeURIComponent(context.currentContext.argument + "|" + window.parent.location);
ExperienceEditor.PipelinesUtil.generateRequestProcessor("ExperienceEditor.Mode.SelectModeRequest", function (response) {
// Sitecore Support FIX 102657
preprocessDebugMode(response);
// Sitecore Support FIX 102657
window.parent.location = response.responseValue.value;
}).execute(context);
},


};
});

// Sitecore Support FIX 102657
function preprocessDebugMode(response) {
var location = response.responseValue.value;
while (location.indexOf("&&") > 0) {
location = location.replace("&&", "&");
}
if (location.indexOf("sc_debug=1") > 0) {
var questionParts = location.split("?");
if (questionParts.length == 2) {
var queryParts = questionParts[1].split("&");
var newQueryParts = [];
for (var i=0; i<queryParts.length; i++) {
if (!queryParts[i].startsWith("sc_mode=")) {
newQueryParts.push(queryParts[i]);
}
}
location = newQueryParts.join("&");
}
response.responseValue.value = questionParts[0] + "?" + location;
}
}
// Sitecore Support FIX 102657
4 changes: 4 additions & 0 deletions src/Sitecore.Support.102657/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Do not change this file - it must be empty, see https://github.com/SitecoreSupport/PatchCreator/issues/13 -->
</configuration>

0 comments on commit d6d3154

Please sign in to comment.