Bug 444 - [Chameleon-Core] PopupStyleResource not available in Popups
: [Chameleon-Core] PopupStyleResource not available in Popups
Status: CLOSED FIXED
: Chameleon
Core
: 1.99
: PC Windows XP
: P2 normal
: 1.99 beta 3
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-06-08 14:51 by
Modified: 2004-10-27 16:22 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-06-08 14:51:51
When a PopupStyleResource is requested, but not also used in a StyleResource,
buttons in Popups are not correctly styled.
------- Comment #1 From 2004-06-08 14:54:53 -------
fixed
------- Comment #2 From 2004-06-24 15:11:16 -------
What application uses the PopupStyleResource, so that I can verify that this
works. None of the sample apps seem to use it??
------- Comment #3 From 2004-06-24 15:17:37 -------
found it, and verified.....
------- Comment #4 From 2004-07-05 12:05:24 -------
Chris could u point me out which application you used to test this fix?
------- Comment #5 From 2004-07-05 13:31:34 -------
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.
------- Comment #6 From 2004-07-05 15:30:47 -------
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>
------- Comment #7 From 2004-07-05 16:01:19 -------
Accordingly to Chris, this bug could be fixed.
------- Comment #8 From 2004-07-07 11:52:10 -------
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)
------- Comment #9 From 2004-07-07 14:25:12 -------
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>
  
------- Comment #10 From 2004-07-08 12:22:10 -------
works for me, perhaps it was fixed after the last beta release?
------- Comment #11 From 2004-07-13 16:52:47 -------
Still there with Chameleon 20040709.  I followed documentation on comment #9.

Fedora Core 2
Chameleon 20040709
------- Comment #12 From 2004-07-14 11:30:06 -------
Norm is not crazy. :) Both Fred and I could not get it to work. using
PopupStyleResource

beta 2 20040709 windows
------- Comment #13 From 2004-07-22 15:26:34 -------
Changed target to 1.99 Beta 3.
------- Comment #14 From 2004-10-07 14:41:10 -------
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 ...
------- Comment #15 From 2004-10-07 15:01:14 -------
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.
------- Comment #16 From 2004-10-07 15:08:39 -------
for the record, the following widgets were not properly initializing the popup
objects:

MapSize
PrintWidget
LegendTemplate
Legend
LayerManager
ErrorReport
DownloadSLD
DownloadContext
------- Comment #17 From 2004-10-25 15:32:02 -------
verified on windows ie.6 lengend popup buttons turned red, pretty. :)
------- Comment #18 From 2004-10-27 16:22:09 -------
Verified on Fedora Core 2.