Commit b056e3e8 authored by Viet Hoang's avatar Viet Hoang

Merge branch 'ImageCoordinatePicker2' into 'develop'

Image coordinate picker2

See merge request !13
parents 98fb82e6 f5edb7f9
......@@ -4,3 +4,5 @@ For more information, please visit the blogs:
* [Sync Media Folder Sitecore Processor](https://buoctrenmay.wordpress.com/2017/03/25/storing-sitecore-media-assets-on-the-file-system-and-how-to-get-synced-at-your-machine/)
* [Media Provider For Graysale](https://buoctrenmay.wordpress.com/2017/05/24/how-to-enable-grayscale-feature-on-sitecore-xp-8/)
* [Pre-population Item Version](https://buoctrenmay.wordpress.com/2017/05/27/pre-population-item-version-module-for-sitecore-development/)
* [How to inject the custom icons to Sitecore 8](https://buoctrenmay.wordpress.com/2017/06/17/how-to-inject-the-custom-icons-to-sitecore-8/)
* [How to get public URL of a media item inside Sitecore](https://buoctrenmay.wordpress.com/2017/07/08/how-to-get-public-url-of-a-media-item-inside-sitecore/)
\ No newline at end of file
using Sitecore;
using Sitecore.Configuration;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Globalization;
using Sitecore.IO;
using Sitecore.Resources;
using Sitecore.Text;
using Sitecore.Web;
using Sitecore.Web.UI;
using Sitecore.Web.UI.HtmlControls;
using Sitecore.Web.UI.Pages;
using Sitecore.Web.UI.Sheer;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Web.UI;
namespace Vhs.CustomIconsInjector.Dialogs
{
public class SetIconForm : DialogForm
{
protected Scrollbox CustomList { get; set; }
protected Scrollbox ApplicationsV2List { get; set; }
protected Scrollbox FlagsV2List { get; set; }
protected Scrollbox BusinessV2List { get; set; }
protected Scrollbox NetworkV2List { get; set; }
protected Scrollbox PeopleV2List { get; set; }
protected Scrollbox SoftwareV2List { get; set; }
protected Scrollbox ApplicationsList { get; set; }
protected Scrollbox AppsList { get; set; }
protected Scrollbox BusinessList { get; set; }
protected Scrollbox ControlsList { get; set; }
protected Scrollbox Core1List { get; set; }
protected Scrollbox Core2List { get; set; }
protected Scrollbox Core3List { get; set; }
protected Scrollbox DatabaseList { get; set; }
protected Scrollbox FlagsList { get; set; }
protected Edit IconFile { get; set; }
protected Scrollbox ImagingList { get; set; }
protected Scrollbox MultimediaList { get; set; }
protected Scrollbox NetworkList { get; set; }
protected Scrollbox OfficeList { get; set; }
protected Scrollbox OfficeWhiteList { get; set; }
protected Scrollbox OtherList { get; set; }
protected Scrollbox PeopleList { get; set; }
protected Scrollbox RecentList { get; set; }
protected Scrollbox SoftwareList { get; set; }
protected VerticalTabstrip TabStrip { get; set; }
protected Scrollbox WordProcessingList { get; set; }
protected override void OnLoad(EventArgs e)
{
Assert.ArgumentNotNull((object)e, "e");
base.OnLoad(e);
this.TabStrip.OnChange += new EventHandler(this.TabStrip_OnChange);
if (Context.ClientPage.IsEvent)
return;
Item itemFromQueryString = UIUtil.GetItemFromQueryString(Database.GetDatabase(WebUtil.GetQueryString("sc_content", Context.ContentDatabase.Name)));
Assert.IsNotNull((object)itemFromQueryString, typeof(Item));
string queryString = WebUtil.GetQueryString("fld_id");
if (string.IsNullOrEmpty(queryString))
this.IconFile.Value = itemFromQueryString.Appearance.Icon;
else
this.IconFile.Value = itemFromQueryString.Fields[ID.Parse(queryString)].Value;
this.RenderIcons();
this.RenderRecentIcons();
}
protected override void OnOK(object sender, EventArgs args)
{
Assert.ArgumentNotNull(sender, "sender");
Assert.ArgumentNotNull((object)args, "args");
SheerResponse.SetDialogValue(this.IconFile.Value);
base.OnOK(sender, args);
}
protected void TabStrip_OnChange(object sender, EventArgs e)
{
Assert.ArgumentNotNull(sender, "sender");
Assert.ArgumentNotNull((object)e, "e");
SheerResponse.Eval("scUpdateControls();");
}
private static void DrawIcons(string prefix, string img, string area)
{
string[] files = SetIconForm.GetFiles(prefix);
int num1 = files.Length;
if (num1 == 0)
num1 = 1;
int height = (num1 / 24 + (num1 % 24 == 0 ? 0 : 1)) * 40;
using (Bitmap bitmap1 = new Bitmap(960, height, PixelFormat.Format32bppArgb))
{
if (prefix == "OfficeWhite")
Graphics.FromImage((System.Drawing.Image)bitmap1).FillRectangle(Brushes.DarkGray, 0, 0, 960, height);
HtmlTextWriter htmlTextWriter = new HtmlTextWriter((TextWriter)new StringWriter());
htmlTextWriter.WriteLine("<map name=\"" + prefix + "\">");
string relativeIconPath = prefix + "/32x32/";
int num2 = 0;
using (Graphics graphics = Graphics.FromImage((System.Drawing.Image)bitmap1))
{
foreach (string path in files)
{
int num3 = num2 % 24;
int num4 = num2 / 24;
string themedImageSource = Images.GetThemedImageSource(relativeIconPath + path, ImageDimension.id32x32);
try
{
using (Bitmap bitmap2 = Settings.Icons.UseZippedIcons ? new Bitmap(ZippedIcon.GetStream(relativeIconPath + path, ZippedIcon.GetZipFile(relativeIconPath))) : new Bitmap(FileUtil.MapPath(themedImageSource)))
graphics.DrawImage((System.Drawing.Image)bitmap2, num3 * 40 + 4, num4 * 40 + 4, 32, 32);
string str1 = string.Format("{0},{1},{2},{3}", (object)(num3 * 40 + 4), (object)(num4 * 40 + 4), (object)(num3 * 40 + 36), (object)(num4 * 40 + 36));
string str2 = StringUtil.Capitalize(Path.GetFileNameWithoutExtension(path).Replace("_", " "));
htmlTextWriter.WriteLine("<area shape=\"rect\" coords=\"{0}\" href=\"#\" alt=\"{1}\" sc_path=\"{2}\"/>", (object)str1, (object)str2, (object)(relativeIconPath + path));
++num2;
}
catch (Exception ex)
{
Log.Warn("Unable to open icon " + themedImageSource, ex, (object)typeof(SetIconForm));
}
}
}
htmlTextWriter.WriteLine("</map>");
FileUtil.WriteToFile(area, htmlTextWriter.InnerWriter.ToString());
bitmap1.Save(img, ImageFormat.Png);
}
}
private static string GetFilename(string prefix)
{
return FileUtil.MapPath(FileUtil.MakePath(TempFolder.Folder, "icons_" + prefix + ".png"));
}
private static string[] GetFiles(string prefix)
{
Assert.ArgumentNotNullOrEmpty(prefix, "prefix");
if (!Settings.Icons.UseZippedIcons)
return SetIconForm.GetFolderFiles(prefix);
return SetIconForm.GetZippedFiles(prefix);
}
private static string[] GetFolderFiles(string prefix)
{
string[] files = Directory.GetFiles(FileUtil.MapPath("/sitecore/shell/themes/standard/" + prefix + "/32x32"));
for (int index = 0; index < files.Length; ++index)
files[index] = Path.GetFileName(files[index]);
return files;
}
private static string[] GetZippedFiles(string prefix)
{
return ZippedIcon.GetFiles(prefix, "/sitecore/shell/themes/standard/" + prefix + ".zip");
}
private static void RenderIcons(Scrollbox scrollbox, string prefix)
{
Assert.ArgumentNotNull((object)scrollbox, "scrollbox");
Assert.ArgumentNotNullOrEmpty(prefix, "prefix");
string filename = SetIconForm.GetFilename(prefix);
string str = Path.ChangeExtension(filename, ".html");
if (!File.Exists(filename) || !File.Exists(str))
SetIconForm.DrawIcons(prefix, filename, str);
HtmlTextWriter output = new HtmlTextWriter((TextWriter)new StringWriter());
output.Write(FileUtil.ReadFromFile(str));
SetIconForm.WriteImageTag(filename, prefix, output);
scrollbox.InnerHtml = output.InnerWriter.ToString();
}
private void RenderIcons()
{
SetIconForm.RenderIcons(this.CustomList, "Custom");
SetIconForm.RenderIcons(this.ApplicationsV2List, "ApplicationsV2");
SetIconForm.RenderIcons(this.BusinessV2List, "BusinessV2");
SetIconForm.RenderIcons(this.FlagsV2List, "FlagsV2");
SetIconForm.RenderIcons(this.NetworkV2List, "NetworkV2");
SetIconForm.RenderIcons(this.PeopleV2List, "PeopleV2");
SetIconForm.RenderIcons(this.SoftwareV2List, "SoftwareV2");
SetIconForm.RenderIcons(this.ApplicationsList, "Applications");
SetIconForm.RenderIcons(this.AppsList, "Apps");
SetIconForm.RenderIcons(this.BusinessList, "Business");
SetIconForm.RenderIcons(this.ControlsList, "Control");
SetIconForm.RenderIcons(this.Core1List, "Core");
SetIconForm.RenderIcons(this.Core2List, "Core2");
SetIconForm.RenderIcons(this.Core3List, "Core3");
SetIconForm.RenderIcons(this.DatabaseList, "Database");
SetIconForm.RenderIcons(this.FlagsList, "Flags");
SetIconForm.RenderIcons(this.ImagingList, "Imaging");
SetIconForm.RenderIcons(this.MultimediaList, "Multimedia");
SetIconForm.RenderIcons(this.NetworkList, "Network");
SetIconForm.RenderIcons(this.OfficeList, "Office");
SetIconForm.RenderIcons(this.OfficeWhiteList, "OfficeWhite");
SetIconForm.RenderIcons(this.OtherList, "Other");
SetIconForm.RenderIcons(this.PeopleList, "People");
SetIconForm.RenderIcons(this.SoftwareList, "Software");
SetIconForm.RenderIcons(this.WordProcessingList, "WordProcessing");
}
private void RenderRecentIcons()
{
int num = 0;
ListString listString = new ListString(Registry.GetString("/Current_User/RecentIcons"));
HtmlTextWriter htmlTextWriter = new HtmlTextWriter((TextWriter)new StringWriter());
ImageBuilder imageBuilder = new ImageBuilder()
{
Width = 32,
Height = 32
};
foreach (string str in listString)
{
imageBuilder.Src = Images.GetThemedImageSource(str, ImageDimension.id32x32);
imageBuilder.Alt = StringUtil.Capitalize(FileUtil.GetFileNameWithoutExtension(str).Replace("_", " "));
imageBuilder.Class = "scRecentIcon";
htmlTextWriter.Write(imageBuilder.ToString());
++num;
}
if (num == 0)
{
htmlTextWriter.Write("<div align=\"center\" style=\"padding:32px 0px 0px 0px\"><i>");
htmlTextWriter.Write(Translate.Text("There are no icons to display."));
htmlTextWriter.Write("</i></div>");
}
this.RecentList.InnerHtml = htmlTextWriter.InnerWriter.ToString();
}
private static void WriteImageTag(string img, string prefix, HtmlTextWriter output)
{
Assert.ArgumentNotNull((object)img, "img");
Assert.ArgumentNotNull((object)prefix, "prefix");
Assert.ArgumentNotNull((object)output, "output");
ImageBuilder imageBuilder;
using (Bitmap bitmap = new Bitmap(img))
imageBuilder = new ImageBuilder()
{
Src = FileUtil.UnmapPath(img),
Width = bitmap.Width,
Height = bitmap.Height,
Usemap = "#" + prefix
};
output.WriteLine(imageBuilder.ToString());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Vhs.CustomIconsInjector")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Vhs.CustomIconsInjector")]
[assembly: AssemblyCopyright("Copyright © viet.hoang.sitecore@gmail.com 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e246265b-04e5-44a6-b542-ad92bb768aa0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
<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>{6A952CC3-A869-4A2E-97B6-CBCEC9C23CF4}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vhs.CustomIconsInjector</RootNamespace>
<AssemblyName>Vhs.CustomIconsInjector</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</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="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Synchronization, Version=2.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Microsoft Sync Framework\Microsoft.Synchronization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Synchronization.Files, Version=2.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\Microsoft Sync Framework\Microsoft.Synchronization.Files.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Kernel, Version=10.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sitecore.Kernel.NoReferences.8.2.170407\lib\NET452\Sitecore.Kernel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Web.Razor">
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages.Deployment">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages.Razor">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.Helpers">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure">
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc">
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="sitecore\shell\Applications\Content Manager\Dialogs\Set Icon\Set Icon.xml">
<SubType>Designer</SubType>
</Content>
<None Include="Properties\PublishProfiles\Local.pubxml" />
<Content Include="sitecore\shell\Themes\Standard\Custom.zip" />
<None Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Dialogs\SetIconForm.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<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>9229</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:9229/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<appSettings>
<add key="webpages:Version" value="3.0.0.0"/>
<add key="webpages:Enabled" value="false"/>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6"/>
<httpRuntime targetFramework="4.6"/>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net46" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net46" />
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net46" developmentDependency="true" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
<package id="Sitecore.Kernel.NoReferences" version="8.2.170407" targetFramework="net46" developmentDependency="true" />
</packages>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<SetIcon>
<FormDialog Header="Change Icon" Submittable="false" Text="Click the new icon that you want to assign to the selected item.">
<CodeBeside Type="Vhs.CustomIconsInjector.Dialogs.SetIconForm, Vhs.CustomIconsInjector"/>
<Script Src="/sitecore/shell/Applications/Content Manager/Dialogs/Set Icon/SetIcon.js" />
<Stylesheet>
#TabStrip {
padding-bottom: 50px;
}
.ie #RecentList {
width: 100% !important;
}
#tabcontent_Recent td {vertical-align:top;}
.scRecentIcon {
cursor: pointer;
margin: 5px 5px 5px 0;
}
#List {
position: absolute;
top: 65px;
bottom: 0;
left: 0;
right: 0;
overflow: auto;
padding: 10px 0 10px 5px;
}
#List > div {
border: 0 !important;
}
.iconFileName {
padding-top: 8px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
</Stylesheet>
<div class="scStretch">
<VerticalTabstrip ID="TabStrip">
<Tab ID="Recent" Header="Recent">
<GridPanel Width="100%" Height="100%" Fixed="true">
<Scrollbox ID="RecentList" Class="scScrollbox scFixSize scFixSize8 scKeepFixSize" Height="100%" GridPanel.Height="100%" Border="none" Click="javascript:scClick(this,event)"/>
</GridPanel>
</Tab>
<Tab ID="Icons" Header="Icons">
<div class="scStretch">
<Border Padding="0 5px 15px 5px">
<Combobox ID="Selector" Change="javascript:scChange(this,event)">
<ListItem Header="Applications" Value="Applications"/>
<ListItem Header="ApplicationsV2" Value="ApplicationsV2"/>
<ListItem Header="Apps" Value="Apps"/>
<ListItem Header="CUSTOM" Value="Custom"/>
<ListItem Header="Business" Value="Business"/>
<ListItem Header="BusinessV2" Value="BusinessV2"/>
<ListItem Header="Controls" Value="Controls"/>
<ListItem Header="Core 1" Value="Core1" />
<ListItem Header="Core 2" Value="Core2"/>
<ListItem Header="Core 3" Value="Core3" />
<ListItem Header="Database" Value="Database"/>
<ListItem Header="Flags" Value="Flags"/>
<ListItem Header="FlagsV2" Value="FlagsV2"/>
<ListItem Header="Imaging" Value="Imaging"/>
<ListItem Header="Multimedia" Value="Multimedia"/>
<ListItem Header="Network" Value="Network" />"
<ListItem Header="NetworkV2" Value="NetworkV2" />
<ListItem Header="Office" Value="Office" />
<ListItem Header="Office White" Value="OfficeWhite" />
<ListItem Header="Other" Value="Other" />
<ListItem Header="People" Value="People" />
<ListItem Header="PeopleV2" Value="PeopleV2" />
<ListItem Header="Software" Value="Software" />
<ListItem Header="SoftwareV2" Value="SoftwareV2" />
<ListItem Header="Word Processing" Value="WordProcessing"/>
</Combobox>
</Border>
<Border Padding="0 5px" style="font-weight:600;">
<Literal Text="Icons:"/>
</Border>
<Border ID="List" Click="javascript:scClick(this,event)">
<Scrollbox ID="ApplicationsList" Border="none"/>