You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Brian Raymes <br...@teotech.com> on 2020/10/05 16:54:45 UTC

RE: [EXTERNAL] Re: ListAlternateRowColor bead

One thing to keep in mind, getClassStyle is coupled to the “first” stylesheet referenced in the html template. With the current implementation, if you have more than one, getClassStyle will fail to find the appropriate items if the item being looked for is not within the first file.

Problem -> document.styleSheets[0]

The CORS error popped up for me in a few cases and confused me as I am running a server and not offline. It was because I had a couple stylesheets before the one that royale compiler creates in the generated html file.

This may or may not be related to the issue being discussed here. 😉

Brian



From: Carlos Rovira <ca...@apache.org>
Sent: Sunday, October 4, 2020 11:53 AM
To: users@royale.apache.org
Subject: [EXTERNAL] Re: ListAlternateRowColor bead

One thing. That class (that should be temporal until we get fixed some compiler problems with some CSS rules) uses dynamic selectors and getClassStyle with needs some special configuration to launch chrome when working offline. Could be that the problem?
If you see TDJ online it works right: https://royale.apache.org/tourdejewel/#!list_panel

see:

/**
     * Get an Object with all styles in a CSS className.
     * classname must match exactly the selector used in the CSS
     *
     * Note that due to CORS restrictions im Chrome, if you're working offline you need to
     * use: chrome --allow-file-access-from-files, or other browser
     *
     * @royalesuppressexport
     */
    COMPILE::JS
    public function getClassStyle(className:String):Object

El dom., 4 oct. 2020 a las 20:49, Carlos Rovira (<ca...@apache.org>>) escribió:
Sorry, the link you provide require access. Better use a site to share images like http://imgur.com/

El dom., 4 oct. 2020 a las 19:07, Maria Jose Esteve (<mj...@iest.com>>) escribió:
Hello,
I have started using the "ListAlternateRowColor" bead in my Jewel List controls but the background-color does not change for the selected item or for the highlighted item, over. The font color does change but the background-color does not.
I have looked at the TDJ and I see that it does work there but I have not found "the reason".
I don't have any custom styles, neither with the tag "style" nor with "className".

We can see the example in the ECharts project but I include a gif to show the behavior. [1]

Any ideas?

[1] https://drive.google.com/file/d/16F4jNBhJf1xu9BsX9uc_Kj36jYX0bitE/view?usp=sharing

Thx.
Hiedra.



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira


Re: [EXTERNAL] Re: ListAlternateRowColor bead

Posted by Carlos Rovira <ca...@apache.org>.
Hi Brian,
thanks for bringing this to my attention. Maybe we should do something to
make "getClassStyle" more generalistic...but I can't think of anything. Any
idea?
thanks

El lun., 5 oct. 2020 a las 18:54, Brian Raymes (<br...@teotech.com>)
escribió:

> One thing to keep in mind, getClassStyle is coupled to the “*first*”
> stylesheet referenced in the html template. With the current
> implementation, if you have more than one, getClassStyle will fail to find
> the appropriate items if the item being looked for is not within the first
> file.
>
>
>
> Problem -> document.styleSheets[0]
>
>
>
> The CORS error popped up for me in a few cases and confused me as I am
> running a server and not offline. It was because I had a couple stylesheets
> before the one that royale compiler creates in the generated html file.
>
>
>
> This may or may not be related to the issue being discussed here. 😉
>
>
>
> Brian
>
>
>
>
>
>
>
> *From:* Carlos Rovira <ca...@apache.org>
> *Sent:* Sunday, October 4, 2020 11:53 AM
> *To:* users@royale.apache.org
> *Subject:* [EXTERNAL] Re: ListAlternateRowColor bead
>
>
>
> One thing. That class (that should be temporal until we get fixed some
> compiler problems with some CSS rules) uses dynamic selectors
> and getClassStyle with needs some special configuration to launch chrome
> when working offline. Could be that the problem?
>
> If you see TDJ online it works right:
> https://royale.apache.org/tourdejewel/#!list_panel
>
>
>
> see:
>
>
>
> */***
>
> *     * Get an Object with all styles in a CSS className.*
>
> *     * classname must match exactly the selector used in the CSS*
>
> *     * *
>
> *     * Note that due to CORS restrictions im Chrome, if you're working
> offline you need to*
>
> *     * use: chrome --allow-file-access-from-files, or other browser*
>
> *     * *
>
> *     * @royalesuppressexport*
>
> *     */*
>
>     COMPILE::JS
>
>     public function getClassStyle(className:String):Object
>
>
>
> El dom., 4 oct. 2020 a las 20:49, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Sorry, the link you provide require access. Better use a site to share
> images like http://imgur.com/
>
>
>
> El dom., 4 oct. 2020 a las 19:07, Maria Jose Esteve (<mj...@iest.com>)
> escribió:
>
> Hello,
>
> I have started using the "ListAlternateRowColor" bead in my Jewel List
> controls but the background-color does not change for the selected item or
> for the highlighted item, over. The font color does change but the
> background-color does not.
>
> I have looked at the TDJ and I see that it does work there but I have not
> found "the reason".
>
> I don't have any custom styles, neither with the tag "style" nor with
> "className".
>
>
>
> We can see the example in the ECharts project but I include a gif to show
> the behavior. [1]
>
>
>
> Any ideas?
>
>
>
> [1]
> https://drive.google.com/file/d/16F4jNBhJf1xu9BsX9uc_Kj36jYX0bitE/view?usp=sharing
>
>
>
> Thx.
>
> Hiedra.
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [EXTERNAL] Re: ListAlternateRowColor bead

Posted by Maria Jose Esteve <mj...@iest.com>.
Hello Brian, Carlos.

For my part, I verify that I have several css files in my debug-compilation, in this order:

    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700" />
    <link rel="stylesheet" type="text/css" href="App.css">

And finally:
   var link = document.createElement("link");
   link.setAttribute("rel", "stylesheet");
   link.setAttribute("type", "text/css");
   link.setAttribute("href", "https://pro.fontawesome.com/releases/v5.13.0/css/all.css");
   document.head.appendChild(link);

With this order the ListAlternateRowColor doesn't work, but if I change the order and put the App.css first, IT DOES WORK.

I will be attentive in case someone responds to Carlos 😝

Thx.
Hiedra

De: Brian Raymes <br...@teotech.com>
Enviado el: lunes, 5 de octubre de 2020 18:55
Para: users@royale.apache.org
Asunto: RE: [EXTERNAL] Re: ListAlternateRowColor bead

One thing to keep in mind, getClassStyle is coupled to the “first” stylesheet referenced in the html template. With the current implementation, if you have more than one, getClassStyle will fail to find the appropriate items if the item being looked for is not within the first file.

Problem -> document.styleSheets[0]

The CORS error popped up for me in a few cases and confused me as I am running a server and not offline. It was because I had a couple stylesheets before the one that royale compiler creates in the generated html file.

This may or may not be related to the issue being discussed here. 😉

Brian



From: Carlos Rovira <ca...@apache.org>>
Sent: Sunday, October 4, 2020 11:53 AM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: [EXTERNAL] Re: ListAlternateRowColor bead

One thing. That class (that should be temporal until we get fixed some compiler problems with some CSS rules) uses dynamic selectors and getClassStyle with needs some special configuration to launch chrome when working offline. Could be that the problem?
If you see TDJ online it works right: https://royale.apache.org/tourdejewel/#!list_panel

see:

/**
     * Get an Object with all styles in a CSS className.
     * classname must match exactly the selector used in the CSS
     *
     * Note that due to CORS restrictions im Chrome, if you're working offline you need to
     * use: chrome --allow-file-access-from-files, or other browser
     *
     * @royalesuppressexport
     */
    COMPILE::JS
    public function getClassStyle(className:String):Object

El dom., 4 oct. 2020 a las 20:49, Carlos Rovira (<ca...@apache.org>>) escribió:
Sorry, the link you provide require access. Better use a site to share images like http://imgur.com/

El dom., 4 oct. 2020 a las 19:07, Maria Jose Esteve (<mj...@iest.com>>) escribió:
Hello,
I have started using the "ListAlternateRowColor" bead in my Jewel List controls but the background-color does not change for the selected item or for the highlighted item, over. The font color does change but the background-color does not.
I have looked at the TDJ and I see that it does work there but I have not found "the reason".
I don't have any custom styles, neither with the tag "style" nor with "className".

We can see the example in the ECharts project but I include a gif to show the behavior. [1]

Any ideas?

[1] https://drive.google.com/file/d/16F4jNBhJf1xu9BsX9uc_Kj36jYX0bitE/view?usp=sharing

Thx.
Hiedra.



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira