You need to log in before you can comment on or make changes to this bug.
When a PopupStyleResource is requested, but not also used in a StyleResource, buttons in Popups are not correctly styled.
fixed
What application uses the PopupStyleResource, so that I can verify that this works. None of the sample apps seem to use it??
found it, and verified.....
Chris could u point me out which application you used to test this fix?
http://localhost/chameleon/samples/sample_enhanced.phtml <cwc2 type="LegendTemplate" visible="true" embedded="true" template="legend_template.html" popupstyleresource="TextButtons" popupwidth="500" popupheight="400" status="false" menubar="false"/> The LegendTemplate widget uses the popupstyleresource parameter to define the style of the buttons within the legend popup window.
Tell me if I'm wrong when testing this fix. I used the "sample_enhanced.phtml" sample and I added a sharedresource to it (see below). I then modified the "locate" widget in the "tools_enhanced.html" template (see below). I loaded the "sample_enhanced.phtml" sample and opened the "locate" window. The buttons were properly styled. --------------------- Shared resource: <cwc2 type="SharedResource" name="TextButtons2"> <textbuttonbackgroundimage value=""/> <imagewidth value="50"/> <imageheight value="24"/> <textbuttonpadding value="0"/> <textbuttonnudge value="0"/> <labelcolor value="111111"/> <labelfont value="fonts/Vera.ttf"/> <labelalign value="left"/> <labelfontsize value="8"/> <labelantialias value="true"/> <usetextbuttoncache value="false"/> <state value="normal"> <textbuttoncolor value="f0f0f0"/> <textbuttonborder_topleft_image value="borders/border_tl_1.png"/> <textbuttonborder_top_image value="borders/border_t_1.png"/> <textbuttonborder_topright_image value="borders/border_tr_1.png"/> <textbuttonborder_right_image value="borders/border_r_1.png"/> <textbuttonborder_left_image value="borders/border_l_1.png"/> <textbuttonborder_bottomright_image value="borders/border_br_1.png"/> <textbuttonborder_bottom_image value="borders/border_b_1.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_1.png"/> </state> <state value="hover"> <textbuttoncolor value="cccccc"/> <textbuttonborder_topleft_image value="borders/border_tl_2.png"/> <textbuttonborder_top_image value="borders/border_t_2.png"/> <textbuttonborder_topright_image value="borders/border_tr_2.png"/> <textbuttonborder_right_image value="borders/border_r_2.png"/> <textbuttonborder_left_image value="borders/border_l_2.png"/> <textbuttonborder_bottomright_image value="borders/border_br_2.png"/> <textbuttonborder_bottom_image value="borders/border_b_2.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_2.png"/> </state> <state value="selected"> <textbuttoncolor value="cccccc"/> <textbuttonborder_topleft_image value="borders/border_tl_3.png"/> <textbuttonborder_top_image value="borders/border_t_3.png"/> <textbuttonborder_topright_image value="borders/border_tr_3.png"/> <textbuttonborder_right_image value="borders/border_r_3.png"/> <textbuttonborder_left_image value="borders/border_l_3.png"/> <textbuttonborder_bottomright_image value="borders/border_br_3.png"/> <textbuttonborder_bottom_image value="borders/border_b_3.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_3.png"/> </state> </cwc2> -------------------- Widget modified: <cwc2 type="Locate" styleresource="TextButtons" popupresource="TextButtons2" PopupWidth="460" PopupHeight="550" Toolbar="false" Status="false" Menubar="false" Image="icons/icon_search.png" ImageTip="Find a place or NTS Sheet" Label="Locate" ZoomToScale="1000000"> <image state="normal"/> <image state="selected"/> <image state="hover"/> </cwc2>
Accordingly to Chris, this bug could be fixed.
The widget tag should have a property called popupstyleresource instead of popupresource. The test is, otherwise, correct as long as no other widget in the page uses TextButton2 AND the popup dialog for the widget is styled per the TextButton2 parameters and not per the TextButtons parameter (I suggest using a textbuttoncolor of "ff0000" so you know it really is different)
My previous test was not good. This test proved that "PopupStyleResource" is not used. Buttons are supposed to appear in red and they are not. Fedora Core 1 Mozilla 1.6 Chameleon 20040625 ------------------------- Sharedresource: <cwc2 type="SharedResource" name="TextButtons2"> <textbuttonbackgroundimage value=""/> <imagewidth value="120"/> <imageheight value="24"/> <textbuttonpadding value="0"/> <textbuttonnudge value="0"/> <labelcolor value="111111"/> <labelfont value="fonts/Vera.ttf"/> <labelalign value="left"/> <labelfontsize value="8"/> <labelantialias value="true"/> <usetextbuttoncache value="false"/> <state value="normal"> <textbuttoncolor value="ff0000"/> <textbuttonborder_topleft_image value="borders/border_tl_1.png"/> <textbuttonborder_top_image value="borders/border_t_1.png"/> <textbuttonborder_topright_image value="borders/border_tr_1.png"/> <textbuttonborder_right_image value="borders/border_r_1.png"/> <textbuttonborder_left_image value="borders/border_l_1.png"/> <textbuttonborder_bottomright_image value="borders/border_br_1.png"/> <textbuttonborder_bottom_image value="borders/border_b_1.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_1.png"/> </state> <state value="hover"> <textbuttoncolor value="cccccc"/> <textbuttonborder_topleft_image value="borders/border_tl_2.png"/> <textbuttonborder_top_image value="borders/border_t_2.png"/> <textbuttonborder_topright_image value="borders/border_tr_2.png"/> <textbuttonborder_right_image value="borders/border_r_2.png"/> <textbuttonborder_left_image value="borders/border_l_2.png"/> <textbuttonborder_bottomright_image value="borders/border_br_2.png"/> <textbuttonborder_bottom_image value="borders/border_b_2.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_2.png"/> </state> <state value="selected"> <textbuttoncolor value="cccccc"/> <textbuttonborder_topleft_image value="borders/border_tl_3.png"/> <textbuttonborder_top_image value="borders/border_t_3.png"/> <textbuttonborder_topright_image value="borders/border_tr_3.png"/> <textbuttonborder_right_image value="borders/border_r_3.png"/> <textbuttonborder_left_image value="borders/border_l_3.png"/> <textbuttonborder_bottomright_image value="borders/border_br_3.png"/> <textbuttonborder_bottom_image value="borders/border_b_3.png"/> <textbuttonborder_bottomleft_image value="borders/border_bl_3.png"/> </state> </cwc2> -------------------- Modified widget: <!-- LOCATE --> <td><cwc2 type="Locate" styleresource="TextButtons" PopupStyleResource="TextButtons2" PopupWidth="460" PopupHeight="550" Toolbar="false" Status="false" Menubar="false" Image="icons/icon_search.png" ImageTip="New Find a place or NTS Sheet" Label="Locate" ZoomToScale="1000000"> <image state="normal"/> <image state="selected"/> <image state="hover"/> </cwc2>
works for me, perhaps it was fixed after the last beta release?
Still there with Chameleon 20040709. I followed documentation on comment #9. Fedora Core 2 Chameleon 20040709
Norm is not crazy. :) Both Fred and I could not get it to work. using PopupStyleResource beta 2 20040709 windows
Changed target to 1.99 Beta 3.
using Norm's TextButton2 definition in sample_enhanced.html and modifying tools_enhanced.html -> MapSize widget to use TextButtons2 as popupstyleresource, confirm that this doesn't work and the buttons are drawn as html inputs (this is used when the styleresource is not available). looking at this now ...
some widgets do not call $this->moPopup->InitDefaults(), which was the only time that the popup style resource was getting initialized. I have modified Popup.php to check the style resource in DrawPublish as well, so the examples here will work now.
for the record, the following widgets were not properly initializing the popup objects: MapSize PrintWidget LegendTemplate Legend LayerManager ErrorReport DownloadSLD DownloadContext
verified on windows ie.6 lengend popup buttons turned red, pretty. :)
Verified on Fedora Core 2.