Web Help contents tree expanded by default

Post here questions and problems related to editing and publishing DITA content.
phila
Posts: 3
Joined: Wed Jul 24, 2013 1:46 pm

Web Help contents tree expanded by default

Post by phila »

Hi Everyone,

I'm using <oXygen/> XML Author version 15.0, and used it to transform DITA topics to a web-based help info centre. In the search/contents pane, one of the trees is now expanded by default. I would like it to be minimized. Any idea what might've happened and how to fix it?

Thanks
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Web Help contents tree expanded by default

Post by sorin_ristache »

Hi,

There is no tree on the Search tab of the Webhelp output so I assume you refer to the tree with the table of contents on the Content pane. Do you mean this tree is expanded by default when the index.html main page or the index_frames.html one is loaded up in the browser?

Can you post here or send us a screenshot with your browser window? In case it will not be obvious from your screenshot: What browser do you use and on what platform? I am asking this because it may be a combination of browser version and platform that may have not been tested thoroughly and that does not honor the jQuery code that handles the Content tree and is supposed to show the tree collapsed by default on the initial index.html page load event.


Regards,
Sorin
phila
Posts: 3
Joined: Wed Jul 24, 2013 1:46 pm

Re: Web Help contents tree expanded by default

Post by phila »

Hi Sorin,

Yes, I meant that when the index.html main page is loaded, the tree is expanded by default. It was tested on both Firefox 22.0 and IE8. I sent over a screenshot via the link you provided.

Thanks for your help.
sorin wrote:Hi,

There is no tree on the Search tab of the Webhelp output so I assume you refer to the tree with the table of contents on the Content pane. Do you mean this tree is expanded by default when the index.html main page or the index_frames.html one is loaded up in the browser?

Can you post here or send us a screenshot with your browser window? In case it will not be obvious from your screenshot: What browser do you use and on what platform? I am asking this because it may be a combination of browser version and platform that may have not been tested thoroughly and that does not honor the jQuery code that handles the Content tree and is supposed to show the tree collapsed by default on the initial index.html page load event.


Regards,
Sorin
phila
Posts: 3
Joined: Wed Jul 24, 2013 1:46 pm

Re: Web Help contents tree expanded by default

Post by phila »

Image
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Web Help contents tree expanded by default

Post by sorin_ristache »

Hi,

When the Webhelp output is opened in the browser the topic corresponding to the first node is opened in the right side panel, in your case the node called CRM. This first node should not be expanded in the tree, and I am not sure why it is expanded in your case because on my Windows 7 computer in a test that I just did the first node is not expanded initially when index.html is opened in Firefox or IE. However this automatic expansion can be disabled. The JavaScript function responsible for the expansion is called load and is located in the file [Oxygen-15-install-dir]\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\skins\desktop\toc.js (because you are using the version of Webhelp output with internal frames, that is the main inpput file index.html). The call that selects and expands the first tree node in the right side panel on the page load event is in the function load() and is this:

Code: Select all

    if (!markSelectItem(hr)){
if (!markSelectItem(hrl)){
markSelectItem(hr,true);
}
}
So you can just comment out this code in the load() function to prevent the automatic expansion of the first tree node. Of course that will not stop the expansion on clicking a tree node, which is correct and expected behavior.


Regards,
Sorin
Post Reply