Select to view content in your preferred language

Popup close button

1673
8
01-21-2013 05:44 AM
LiamCollins
Emerging Contributor
I was hoping someone could help me with the location of the close button in my popup window.

I edited the size of my popup window in the popuprendererskin.mxml successfully my problem is the close button is now located in the middle of the popup window. I want it to be anchored to the right of the popup window. I can???t seem to find where I can edit how I set the location of this button.

I have attached an image to show my problem.
[ATTACH=CONFIG]20916[/ATTACH]

Any help on this would be greatly appreciated thanks.
Liam
Tags (2)
0 Kudos
8 Replies
RhettZufelt
MVP Notable Contributor
Hi Liam,

Not sure how/where you modified the popuprendererskin to change the size, but if you modify it in the SparkSkin at the top, the close button will automatically stay in the upper right.

<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:esri="http://www.esri.com/2008/ags"
             xmlns:supportClasses="com.esri.ags.skins.supportClasses.*"
    maxWidth="500"
    minWidth="350"
    maxHeight="500"
    height="100%"
             preinitialize="skin_preinitializeHandler(event)">

    <fx:Metadata>


R_
0 Kudos
LiamCollins
Emerging Contributor
This is where I have edited the popuprendererskin see below

<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:esri="http://www.esri.com/2008/ags"
             xmlns:supportClasses="com.esri.ags.skins.supportClasses.*"
                                           maxWidth="900"
    minWidth="800"
    maxHeight="600"
             preinitialize="skin_preinitializeHandler(event)">


is there anywhere else I could be going wrong?
0 Kudos
RhettZufelt
MVP Notable Contributor
Not sure as I can't repeat your issue.  Any changes I make to the top of the popuprendereskin don't seem to do it.
Of course, not sure how your config looks, as it appears as if you are pulling in some media other than just attachemnts, which I haven't tested.

Have you modified the PopUpMediaBrowserSkin or any image size stuff anywhere?

R_
0 Kudos
LiamCollins
Emerging Contributor
No the PopupMediaBrowserSkin has remained untouched so far. The media attachment is a .jpeg which I have also set as a hyperlink so when you click on the image it opens in a new window.  The image shows fine in the media window and the hyperlink works but the close button has remained in the middle.

I am stumped as I cant seem to find the location of that close buttons function to even begin trying to edit it.

I thought it would have been located somewhere in the PopUpRenderedSkin or PopUpMediaBrowserSkin like the functions for the Next, Previous and Zoom to buttons.
0 Kudos
RhettZufelt
MVP Notable Contributor
any chance you could include your popupconfig.xml so I can try to reproduce with similar data?

Also, I think the close button is handled in the ContentNavigator component.

R_
0 Kudos
LiamCollins
Emerging Contributor
Here is my Popup Config.

<?xml version="1.0" ?>
<configuration>
    <title>{DESCRIPT}</title>
    <description>
  <![CDATA[<a href='{Hyperlink_Relative_Path}'><img src='{jpg_Popup_Path}' width=800></a>
              <!--   <img src='{jpg_Popup_Path}' width=800> -->
   



  ]]>
    </description>
 
    <fields>
        <field name="PHOTOTYPE"/>
        <field name="FIELDDATE"/>
        <field name="DESCRIPT"/>
        <field name="Hyperlink_Relative_Path"/>
    </fields>

</configuration>
0 Kudos
RhettZufelt
MVP Notable Contributor
Here is my Popup Config.

<?xml version="1.0" ?>
<configuration>
    <title>{DESCRIPT}</title>
    <description>
  <![CDATA[<a href='{Hyperlink_Relative_Path}'><img src='{jpg_Popup_Path}' width=800></a>

  ]]>
    </description>
 </configuration>


Might try this.  The documentation says to use the description OR the fields not both.  However, it doesn't make mine wack out like that, but have not tested with medias as of yet either.

Might try removing the width=800 from the href as well and see if that is messing it up as I think it's supposed to fit the image to the frame.

R_
0 Kudos
RhettZufelt
MVP Notable Contributor
Actually,

It doesn't look like you are doing anything fancy, just pulling up the image with a hyperlink and no other data fields.

Might try this instead and not use the description tag.

<?xml version="1.0" ?>
<configuration>
    <title>{DESCRIPT}</title>
<!-- <description>
  <![CDATA[<a href='{Hyperlink_Relative_Path}'><img src='{jpg_Popup_Path}' width=800></a>
  ]]>
    </description> -->
 
    <fields>
    </fields>
    <medias>
    <media type="image" 
           title="{DESCRIPT}"
           imagesource="{jpg_Popup_Path}"
           imagelink="{Hyperlink_Relative_Path}"/>

</medias>
</configuration>


R_
0 Kudos