dnnsoftware / Dnn.AdminExperience

DNN (formerly DotNetNuke) Combined Admin Experience
MIT License
17 stars 39 forks source link

Persona Bar > Manage > Pages > Expand/Collapse All Fails After Moving The Only Child Item Away #1122

Closed kkadir closed 5 years ago

kkadir commented 5 years ago

Description of bug

"Expand/Collapse All" fails after moving the only child item away from a parent node.

Steps to reproduce

List the steps to reproduce the behavior:

  1. Log in as Super/Host user to Platform.
  2. Navigate to Persona Bar > Manage > Pages.
  3. Click on the Add Multiple Pages button.
  4. Input 1 Parent page and child page.
  5. Click the "Add New Page(s)" button.
  6. Observe that the new page(s) is/are added to the "Pages List" tree-view.
  7. Expand the newly added page from the "Pages List" tree-view.
  8. Drag the child page under any other page.
  9. Click on the "Collapse All" link on top of the "Pages List" tree-view.

Current result

  1. All items in the "Pages List" tree-view are collapsed
  2. The "Collapse All" link is not changed as "Expand All"
  3. Keeping clicking on the unchanged "Collapse All" link does not have any effect.

Expected result

  1. All items in the "Pages List" tree-view are collapsed
  2. The "Collapse All" is changed as "Expand All"
  3. Keeping clicking on the "Collapse All" or "Expand All" link is collapsing or expanding all "Pages List" tree-view items respectively.

Screenshots

Issue Reproduction Video

Error log

N/A

Additional context

The issue arises when the only child item is dragged away from any parent item. For instance, assume that we have a page list structure like the following;

Item-01
Item-02
    > Item-02-01
    > Item-02-02
Item-03
    > Item-03-01

When Item-02-01 is dragged and dropped under Item-01, there won't be any issues as Item-02 will still have Item-02-02 as a child. But when Item-03-01 is dragged and dropped to anywhere, the issue will be observed as the Item-03 parent item is now without a child item.

Affected version

Affected browser

valadas commented 5 years ago

Merged