Commit fc36850a authored by Viet Hoang's avatar Viet Hoang

support to add multiple ImageCoordinateField to a template and make it work properly

parent ccbae6bb
......@@ -7,7 +7,7 @@
namespace Vhs.ImageCoordinatePickerField.Fields
{
public class ImageCoordinateField : Text, IContentField
public class ImageCoordinatePicker : Text, IContentField
{
public string GetValue()
{
......@@ -23,8 +23,10 @@ public override void HandleMessage(Message message)
{
base.HandleMessage(message);
if (!message.Name.Equals("vhs:PickCoordinate"))
if (!message.Name.Equals("vhs:PickCoordinate") || message["id"] != this.ID)
{
return;
}
// manage to get the container id (Sitecore item id) of this field
// onFocus attribute's value will be like this
......
......@@ -88,7 +88,7 @@
<ItemGroup>
<Compile Include="Constants\QueryStringKeys.cs" />
<Compile Include="Dialogs\ImageCoordinatePickerDialog.cs" />
<Compile Include="Fields\ImageCoordinatePickerField.cs" />
<Compile Include="Fields\ImageCoordinatePicker.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\ConfigurationService.cs" />
</ItemGroup>
......
......@@ -7,7 +7,7 @@
namespace Vhs.ImageCoordinatePickerField2.Fields
{
public class ImageCoordinatePickerField : Text, IContentField
public class ImageCoordinatePicker : Text, IContentField
{
public string GetValue()
{
......@@ -23,8 +23,10 @@ public override void HandleMessage(Message message)
{
base.HandleMessage(message);
if (!message.Name.Equals("vhs:PickCoordinate2"))
if (!message.Name.Equals("vhs:PickCoordinate2") || message["id"] != this.ID)
{
return;
}
// manage to get the container id (Sitecore item id) of this field
// onFocus attribute's value will be like this
......
......@@ -88,7 +88,7 @@
<ItemGroup>
<Compile Include="Constants\QueryStringKeys.cs" />
<Compile Include="Dialogs\ImageCoordinatePickerDialog.cs" />
<Compile Include="Fields\ImageCoordinatePickerField.cs" />
<Compile Include="Fields\ImageCoordinatePicker.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\ConfigurationService.cs" />
</ItemGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment