Can't change some TocEntry Styles

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Can't change some TocEntry Styles

Post by Charlie »

In WebHelp, I'm trying to change the background color of a TOC entry when it is selected. For example, if the help is called from a context-sensitive situation, and the TOC is synchronized, the context-sensitive topic is highlighted in the TOC. I cannot find where that highlighted color is controlled.

The TocEntry style in the skin editor, doesn't have that property, neither does the toc.htm in C:\Program Files\MadCap Software\MadCap Flare V5\Flare.app\Resources\WebHelp\Default.flwht.

I can control some of the attributes in the toc.htm, but some have no effect. For example,

a:hover
{
color: green;
text-decoration: none;
font-weight: bold;
}

The color: green; does nothing, but font-weight: bold; works fine. It seems that somewhere there are some settings that are overriding some of the settings in the toc.htm file.

Any ideas?

Charlie
carolynmwallace
Sr. Propeller Head
Posts: 168
Joined: Thu Jan 31, 2008 12:21 pm
Location: Durham, NC

Re: Can't change some TocEntry Styles

Post by carolynmwallace »

There are a couple of things going on here.

First, the CSS you included is for a link when the cursor is hovering over it (a.hover) So you wouldn't see some of the effect unless you put your cursor over the link.

Second, the CSS attribute "color" refers to font color. In this case, when you hovered your cursor over a link, the text should have turned green. To change the background color, use the "background-color" attribute.

Unfortunately, neither of these will help you with what you want, which is to have the TOC entry turn a different BG color when the user opens the file through CSH. I don't have Flare open right now and I can't remember what CSS feature controls the BG color of TOC entries.

Sorry! :-(
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

Thanks for the try! The a:hover was just used as an example of some of the attributes working and others not. Even with the color green specified, when I hover over an entry, the text turns red! At the same time specifying font-weight as bold, does work when I hover over an entry. Something seems to be overriding the color attribute for hover.

thanks :)
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Can't change some TocEntry Styles

Post by Nita Beck »

I believe this is covered in MadCap's Flare Knowledge Base:

http://kb.madcapsoftware.com/Content/Fl ... _Color.htm
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

I tried changing the colors in the MadCapToc.js per the knowledge base article, and it doesn't seem to work. Any idea as to what I might be doing, or not doing?
Charlie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Can't change some TocEntry Styles

Post by LTinker68 »

After making the change, did you do a forced refresh (Shift + F5) in the browser window? Otherwise it might be loading from the cache, and you need to force it to reload everything.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

Thanks, I tried it and it didn't work... I tried deleting all internet files, cookies, etc. still no luck. Perhaps it's Monday!!?? :|
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Can't change some TocEntry Styles

Post by LTinker68 »

And just to verify, you made the change in the appropriate Flare program version folder (i.e., v5 not v4 or vice versa)? If you have multiple versions of Flare, then you'd need to make the change in all the program folders.

You should also delete the Output folder before rebuilding, too.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

I changed the entry in both versions (4 and 5) of MadCapToc.js. Cleaned the project (tried that earlier, along with restarting Flare, and rebooting...), restarted Flare again, and still no luck. I also made sure that the hover color in the Toc.htm matched what I chose in the .js file. Does this work for you? Even made a new project (compiles a whole lot quicker...).
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Can't change some TocEntry Styles

Post by LTinker68 »

It doesn't work in the new project either?

Where are you building the output to? Your local computer, a shared drive, or a web server? Do any others in your office also not see the change, or is it just on your computer that you don't see the change?

What hex color did you specify? Could you copy-and-paste that line of code into the forum? If you're using just the name equivalent (e.g., green), did you try it with a hex value (e.g., #669900)? That article specifically mentions using the hex color not the name equivalent, so it may not work with the name equivalent at all.

BTW, are you building WebHelp or HTML Help or DotNet Help? You mentioned WebHelp earlier, but I want to make sure you're talking about WebHelp as in the output type and not WebHelp as the general term for online help. Because I don't think making that modification would affect HTML Help or DotNet Help, although I'm not positive about DotNet Help.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

I found the problem... the MadCapAll.js is where the "real" entries are. Search for gCurrSelection.style.backgroundColor to change the selected background color, and TocEntryOnmouseover to change the hover color. Just curious as to why they have the same thing in so many places...?? It doesn't seem as if changing anything in MadCapToc.js does anything. At least for me.

I am using WebHelp, not one of the others.

Thanks for your input - it encouraged me to continue looking!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Can't change some TocEntry Styles

Post by LTinker68 »

You know, it seems to me like when v5 came out they did change the location and someone updated a forum entry about that, but if I'm remembering that correctly, then it sounds like MadCap hasn't updated the KB article to reflect the differences based on what version number you have. Or maybe it wasn't the TOC but something else, like the mini-TOCs.

In any case, why don't you go back to that KB article and add a comment indicating the version you're using and the correct file to update. Hopefully others, including MadCap, will see that when they go to the article.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Can't change some TocEntry Styles

Post by wclass »

Charlie wrote:I found the problem... the MadCapAll.js is where the "real" entries are. Search for gCurrSelection.style.backgroundColor to change the selected background color, and TocEntryOnmouseover to change the hover color. Just curious as to why they have the same thing in so many places...?? It doesn't seem as if changing anything in MadCapToc.js does anything. At least for me.
This one can be explained (sorry for not spotting it earlier). On a webhelp target, on the "Performance" tab, there is an option to "Condense Javascript files". If this is ticked, all js are combined and the system uses MadCapAll.js, otherwise it uses all the individual script files. This was an update in v5.

Definitely looks like a need to update the KB.
Margaret Hassall - Melbourne
Charlie
Propeller Head
Posts: 22
Joined: Thu Oct 16, 2008 3:08 pm

Re: Can't change some TocEntry Styles

Post by Charlie »

Thanks Margaret! That almost makes sense...

As far as the knowledge base, I tried to leave a comment on the topic but a single character was to many for the comment.... ugh! I submitted a bug report.

I also had the pleasure of upgrading to 5.0.1 and I discovered that all the .js scripts were replaced. That means that any changes I made were wiped out with the upgrade.
Post Reply