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

feat(edit-page-v2): Enable Navigation Sorting feature #28208

Merged
merged 20 commits into from
Apr 16, 2024

Conversation

zJaaal
Copy link
Contributor

@zJaaal zJaaal commented Apr 11, 2024

Proposed Changes

  • Create new JSP Macro newOrderMenu() to work with the new editor.
  • Connect the Navigation Reorder Dialog with the new editor

Additional Info

We need to replace the piece of code we add to add this button in the VTLs files with the new macro.

Ex: In the current starter, we add this button in this file application/themes/travel/header.vtl

Current Code to add the button

  ## ADDS ICON IN EDIT MODE TO REORDER SIDE NAVIGATION ##
            #if ($EDIT_MODE && $PUBLISH_HTMLPAGE_PERMISSION)
                #set($_formId="dot_form_menu_$date.date.time")
                <form class="dotcms__navbar-form" action="${directorURL}" method="post" name="${_formId}" id="${_formId}">
                    <input type="hidden" name="cmd" value="orderMenu" />
                    <input type="hidden" name="hostId" value="${host.identifier}" />
                    <input type="hidden" name="referer" value="${VTLSERVLET_URI}" />
                    <input type="hidden" name="pagePath" value="${VTLSERVLET_URI}" />
                    <input type="hidden" name="startLevel" value="1" />
                    <input type="hidden" name="depth" value="2" />
                    <a href="javascript:document.getElementById('${_formId}').submit();" class="reorder-menu-link" data-original-title="Reorder Menu">
                        <i class="arrow-up"></i> 
                        <i class="arrow-down"></i> 
                    </a>
                </form>
            #end

Should be updated to

            ## ADDS ICON IN EDIT MODE TO REORDER SIDE NAVIGATION ##
            #if ($EDIT_MODE && $PUBLISH_HTMLPAGE_PERMISSION)
              #set($_formId="dot_form_menu_$date.date.time")
              #newOrderMenu()
            #end

Screenshots

Screen.Recording.2024-04-11.at.4.47.19.PM-1.mov

@zJaaal
Copy link
Contributor Author

zJaaal commented Apr 11, 2024

Code is ready but I'm writting test cases. Leaving in draft meanwhile.

@zJaaal zJaaal marked this pull request as ready for review April 12, 2024 13:20
Copy link
Member

@fmontes fmontes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to create a task to update the starter.

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>
@fmontes fmontes enabled auto-merge April 16, 2024 13:52
@fmontes fmontes changed the title chore(edit-page-v2): Enable Navigation Sorting feature feat(edit-page-v2): Enable Navigation Sorting feature Apr 16, 2024
@fmontes fmontes added this pull request to the merge queue Apr 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 16, 2024
@zJaaal zJaaal added this pull request to the merge queue Apr 16, 2024
Merged via the queue into master with commit e8eba24 Apr 16, 2024
25 checks passed
@zJaaal zJaaal deleted the 28040-edit-page-v2-enable-navigation-sorting-feature branch April 16, 2024 19:33
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

Successfully merging this pull request may close these issues.

Edit Page V2: Enable Navigation Sorting Feature
4 participants