Re: [Powertop] [Announce] v2.5-rc1
Alexandra Yates <alexandra.yates at linux.intel.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <[email protected]> |
> On (10/23/13 09:12), Alexandra Yates wrote:
>> >>
>> >> This change enables the menu links and mouse over, but the font and
>> the
>> >> button background are all black, I don't think the css are working
>> here.
>> >> I will send you the image to your email that way you get to see it.
>> >>
>> >
>> > thanks. well, that's weird. I found rdesktop-ed win box around and
>> tested
>> > generated report on IE (don't know the version - 8 or 9). what IE
>> version
>> > is on the picture?
>> >
>>
>> You are welcome, what version of IE are you running?
>>
>
> ok. this is really the last one :)
>
> I think I found the issue -- textContent support in IE.
>
>
> ---
> src/powertop.css | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/src/powertop.css b/src/powertop.css
> index 6d43e07..ce7dbb2 100644
> --- a/src/powertop.css
> +++ b/src/powertop.css
> @@ -17,20 +17,29 @@ var powertop = {
> },
> cadd: function(idx, c){
> var el = document.getElementById(idx);
> - if (el)
> - el.classList.add(c);
> -
> + if (el) {
> + var cn = el.className;
> + if (cn.indexOf(c) != -1)
> + return;
> + cn += ' ' + c;
> + el.className = cn;
> + }
> },
> crm: function(id, c){
> var el = document.getElementById(id);
> - if (el)
> - el.classList.remove(c);
> + if (el) {
> + var cn = el.className
> + while (cn.indexOf(' ' + c) != -1)
> + cn = cn.replace(' ' + c,'');
> + el.className = cn;
> + }
> },
> newbutton: function(id, txt) {
> var x = document.createElement('div');
> x.id = id + '_button';
> x.className = 'nav_button';
> x.textContent = txt;
> + x.innerText = txt;
> x.onclick = function() { powertop.toggle(id); };
> return x;
> },
>
>
YES! that fixes the menu! It works in IE, FF, Chrome :)
Thank you,
Alexandra.