Select to view content in your preferred language

Pop-Up 2.3.1 Text Color Change

2460
20
05-03-2011 07:34 AM
TomLucky
New Contributor III
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
philippschnetzer
Occasional Contributor III
Robert,

The fix you posted doesn't seem to work for me.  I'm still having the issue of text colour changes and also font type and size changes.  Again, this only happens for the html code written in the <description> tags.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Paul,

      Yes it is best to stay up to date as Version 2.3.1 fixed some big issues esri had.

So to get the fix in your FlexViewer and have it apply to all your popups you nee to create a com.esri.ags.skins package by right clciking on the src folder in Flash Builder and choosing new package. Then just paste the attached mxml file in the zip and run the flexviewer app.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

   Are you sure your skin is getting applied?
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

I am sure the skin is applied - I downloaded the API, modified the skin, copied it into com.esri.viewer.skins in the src folder and then added this to my default.css to make my modified skin the default for all popups:
esri|PopUpRenderer
{
 skinClass:ClassReference('com.esri.viewer.skins.PopUpRendererSkin');
}

The behaviour I am seeing does not seem to have a conclusive pattern - 'usually' if I simply click inside a popup window (just anywhere - not necessarily a link or anything clickable) and then close it and open another popup it will have changed the font type, size and colour.

I have decided to show all the desired fields using the <description> tags rather than the <fields> tag because it offers more flexibility in terms of hyperlinks and so on....and its this <description> html text that loses its formatting....here's a sample in case something pops out at you:
<description>
     <![CDATA[<b>Community:  <FONT COLOR="#4D0000"><i>{COMMUNITY}</i></FONT><br>Unit #'s:  <FONT COLOR="#4D0000"><i>{Unit_NOs}</i></FONT><br>Total Units:  <FONT COLOR="#4D0000"><i>{Total_Unit}</i></FONT><br>Comments:  <FONT COLOR="#4D0000"><i>{COMMENTS}</i></FONT><br></b>]]>   
 </description>

In the above case for my civic popup if I click in the popup (usually) the font decreases in size and the font type changes as well (once I open up a new popup) - but the colour stays the same (black for field names and reddish for the feature attributes).  Sorry for the long winded explanation.  Your time is seriously much appreciated - phenomenal.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Philipp ,

   Can you post your custom PopUpRendererSkin?
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

Forgot to mention that I also modified the PopUpMediaBrowser - but only to remove the border inside the popup. The only changes I made to the PopUpRenderer are the sizes...

Thanks
0 Kudos
PaulMcBride
New Contributor III
Robert,
Thanks for the help!  It fixed my issue perfectly.

Paul
0 Kudos
EricVenden
Occasional Contributor II
Paul,

      Yes it is best to stay up to date as Version 2.3.1 fixed some big issues esri had.

So to get the fix in your FlexViewer and have it apply to all your popups you nee to create a com.esri.ags.skins package by right clciking on the src folder in Flash Builder and choosing new package. Then just paste the attached mxml file in the zip and run the flexviewer app.


Robert,
For this fix...when you say run the app - do you mean run it and then export to release?
Thanks
Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

  Just to test if the change is working you would run or debug the Flex Viewer app. Then once satisfied export a release build so that you can copy the bin-release files over to your production web server.
0 Kudos
JoeSimpson
New Contributor III
Robert,

Thank you so much for posting the PopUprendererSkin, this is great! Being very new at working with the source code in Flash Builder, is there an easy way to left-align my fields within the popup window?

Thank you,
Joe
0 Kudos