Select to view content in your preferred language

Pop-Up 2.3.1 Text Color Change

2703
20
05-03-2011 07:34 AM
TomLucky
Occasional Contributor
I am having an issue with the new 2.3.1 pop-up text changing color from white to black after a hyperlink is clicked.  I can query features without any problems with the color until I click the hyperlink in my description section.  The hyperlink works correctly, however after opening the hyperlink, all the pop-up descriptions have a text color of black instead of white.  Only the text in the description is black which makes it difficult to read against the dark pop-up background.  The title, "Zoom To" link, and even the hyperlink in my description remain white.  I am using the unmodified 2.3.1 FlexViewer.  Below is my pop-up configuration.

<?xml version="1.0" ?>
<configuration>
    <title>{Tax_Parcel.CAMA_PIN}</title>
 <description>
     <![CDATA[<b>Address:  </b>{TAX2010.Address}<b><br>Owner:  </b>{TAX2010.owner}<b><br>Co-Owner:  </b>{TAX2010.co_owner}<b><br>Tax District:  </b>{TAX2010.tax_district}<br><a href='http://indekalb/departments/taxcommissioner/Display.asp?parcel={Tax_Parcel.CAMA_PIN}'><b>Property Tax Link</b></a>]]>
 </description>
</configuration>

<!--
    Pop-up configuration file for:
    http://gis-image-srv1/ArcGIS/rest/services/Parcels/MapServer/26
-->


Any suggestions?

Thanks,

Tom
Tags (2)
0 Kudos
20 Replies
PaulMcBride
Occasional Contributor
I'm experiencing the same problem.  If I figure anything out I will post the fix.
0 Kudos
philippschnetzer
Frequent Contributor
Same here - except for me the colour stays the same but the font type actually changes!  This only happens after a link is clicked in the popup and then another popup is invoked.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   I found the fix but it involves extending the PopUpRendererSkin from the API and is not for the novice.  Let me know if you are really ready to tackle this your self and I will post the fixed PopUpRendererSkin.mxml.
0 Kudos
philippschnetzer
Frequent Contributor
Robert,

Yes, please post your fix.  I am currently using a modified popup renderer so it should be easy enough for me to integrate your fix.  Thanks a lot!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

    In your case the fix will be simple then. In your custom PopUpRendererSkin.mxml just find this piece of code and update it with the commented fix.

     if (popUpInfo.description)
     {
      htmlText = StringUtil.substitute(popUpInfo.description, formattedAttributes);
      if (htmlText)
      {
       cleanAndSetHtmlText(descriptionText, htmlText);
       vGroup.addElement(descriptionText);
      }
//Fix for the 2.3.x popup text color bug RJS
      descriptionText.styleSheet = textStyleSheet;
     }
0 Kudos
PaulMcBride
Occasional Contributor
Robert, thank for the help you have provided so far, but I do not have a custom popuprendererskin how would you recommend proceeding with the fix?

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

   The fix is only for people using the source code, so do you fall in that category?
0 Kudos
TomLucky
Occasional Contributor
Robert,

Thanks for tracking down this bug.  Since I am not compiling my own code, I guess I will have to wait until this is fixed in the next release.  I also want to say thanks for all the work you do on this message board.   I would not have made as much progress with my Flex site without your assistance.

Regards,

Tom
0 Kudos
PaulMcBride
Occasional Contributor
Robert,

Yes I am using the source code.  Would it be better for me to migrate to flexviewer 2.3.1 from 2.3 while I am doing these sorts of changes?

Thanks again!
0 Kudos