-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexMenu JS Treenew isn't being used to navigation #81
Comments
I don't think It is possible to use next/previous button with Treenew because it only retrieves child nodes when the node is opened. When you are on "2. 3CX" namespace, the child node doesn't exist yet. It gets the child node when you open the namespace by clicking a triangle icon. So unless you open the namespace, this theme can't know if there is a child. If you can expand all the menu items like this "{{indexmenu>..|js treenew nsort}}" it'll work. |
Sorry, I was wrong that expanding all the children at start could solve the problem. As you said, since IndexMenu uses AJAX, I need to know when it finishes creating the index. I believe the problem could be solved if IndexMenu triggers a Javascript event when it finishes. Then this theme re-reads the index when the event is fired in the event-hander. |
I added the following code to
|
Hi, thanks for your research. That helped me! Be noted, that it won't follow pages unless the folder is opened like I said before. |
I commited the PR #82 to add a missing comma that throws an error on JS.php minify. |
For the first issue, I'm sorry my last fix was sloppy. I refactored and fixed the script. Could you try it? |
Hello @my17560,
|
Ok, I understand the situation. The reason the TOC is not embedded is that your current ID on URL "3cx:phone" is different from data-wiki-id "3cx:phone:" (notice the last colon). I want to re-create the situation on my PC. What's the simplest directory structure that can confirm your situation? I'm not familiar with the indexmenu and I can't create it on my own. like this?
|
Here is it:
|
Hello, |
Thanks for you demo pages. I fixed the theme and committed. Could you try? |
Thank you for testing! I'll fix the CSS also. |
I believe you're looking for
|
Hello, I updated the CSS. But be careful I bet it'll break your styles. I changed only sidebar.css, so please take a backup before updating. |
I created the PR to fix a regression on template in #84. |
I'm not sure if it's fixable, but I can't scroll to read full text as seen in: |
There also seems another regression introduced by your fixes. It seems that the dropdown button for namespaces that contains child items isn't shown. I created the PR #86 that fixes this issue. |
I noticed a strange issue when editing directly the "Plano de rede" section from the file below and clicking on [Preview] button. It seems that the |
Hi, thank you for pull request. I merged them and committed the new style. Could you try? As for the horizontal scroll, I don't have a plan to add scrollbars to the sidebar, but you can add the below style to show the scrollbar in userall.css.
|
It seems great, no issues to report so far. Closing this issue. |
IndexMenu now uses Fancytree and the legacy tree (#78) will be deprecated into the future. I added a commit to the IndexMenu code that was already commited (samuelet/indexmenu#292) that adds the "data-wiki-id" attr to IndexMenu Fancytree (Treenew), but it isn't enable navigation (Next/Prev buttons) on this template.
I believe it happens because now IndexMenu uses AJAX to load the sidebar and it isn't completed loaded when the page is loaded and the "Next/Prev" buttons are gathered by the template. Maybe if the template detects the presence of the
.indexmenu_js2
it could wait it fully load (.fancytree-plain
) before attempt to gather the "Next/Prev" button, or we can discuss with IndexMenu devs if we could trigger custom events after Fancytree is fully loaded.The text was updated successfully, but these errors were encountered: