Skip to content
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

Nested LI's not showing correctly in CMS #5

Closed
blueskies79 opened this issue Dec 4, 2017 · 1 comment
Closed

Nested LI's not showing correctly in CMS #5

blueskies79 opened this issue Dec 4, 2017 · 1 comment

Comments

@blueskies79
Copy link

blueskies79 commented Dec 4, 2017

Hi! I am a huge fan of your module, cleans up our sitetrees very nicely, thank you for sharing!

I discovered a bug with nested sitetree items. The case I had was a root-level item, with subitems, and subsubitems. Whenever the root-level item was expanded (by clicking the little arrow and /admin/pages/getsubtree?ID=...&ajax=1 was called), the interface moved all subitem and subsubitems up one level in the interface. They weren't actually reparented (the database still showed them to be subitems of the correct parent), but the tree moved them up. I traced the origin of the bug back to a closing that apparently is not needed. So my solution was to change the LeftAndMain_TreeNode.ss to the following (basically I just removed the at the end ;-) ):

<li id="record-$ID" data-id="$ID" data-pagetype="$ClassName" class="$Classes"><ins class="jstree-icon">&nbsp;</ins>
    <a href="$Link" title="$Title.ATT"><ins class="jstree-icon">&nbsp;</ins>
        <span class="text">$TreeTitle</span>
        <% if $SiteTreeLabels %>
            <% loop $SiteTreeLabels %>
                <span class="sitetree-label" style="background-color: $Color">TT $Title</span>
            <% end_loop %>
        <% end_if %>
    </a>

This is in line with /framework/admin/template/Includes/LeftAndMain_TreeNode.ss (which also has no ending ). Could you incorporate this fix with the next version?

@JZubero
Copy link
Owner

JZubero commented Dec 4, 2017

@blueskies79 I'm glad you could use the module! Thanks for reporting the issue and providing the fix - great bug tracing ;) Patch is coming up!

@JZubero JZubero closed this as completed in 9d1feb5 Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants