Repository navigation
Allow opening Persona Bar items in a new browser tab - #7583
Open
idumlupinar wants to merge 5 commits into
Open
idumlupinar wants to merge 5 commits into
idumlupinar wants to merge 5 commits into
Conversation
Added requested panel handling to the PersonaBarContainer class.
Correct HTML character encoding for proper rendering.
… new tabs clicks: a plain click still opens the panel in place. Ctrl, Cmd and Shift clicks are left to the browser, so it opens a new tab or window. page load: if the server sent a requested panel, it opens that panel and then removes the parameter from the address bar. hidden Persona Bar: when the Persona Bar is disabled (not visible), the links do nothing, as before.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7581
Summary
Persona Bar menu items could only be opened in place. They were
<li>elements with a click handler, and the Persona Bar runs in an iframe that never changes the page URL, so middle-click, Ctrl/Cmd-click and "Open link in new tab" did nothing useful. This PR makes them real links, so admins can, for example, keep Pages open in one tab and Recycle Bin in another.Client (
Dnn.PersonaBar.UI)<a>whosehrefis the current page with?personabar=<identifier>(e.g./?personabar=Dnn.Recyclebin). Items that already have aLink(e.g. Site Assets) keep pointing to it.history.replaceState.config.visibleis false), the links are inert, as the items were before.Server (
PersonaBarContainer)personabarquery value is matched (case-insensitively) against the current user's menu, which is already filtered by permissions andFilterMenu. Only panel items count: root menus such as Content/Manage and items with aLinkare excluded.requestedPanelin the Persona Bar settings. Unknown or unauthorized values are ignored, and raw URL text never reaches the client or a jQuery selector.Security / multi-portal / multi-language
Note: the existing "last opened panel" user setting is still stored per user on the server, so a plain reload restores whichever panel was opened last in any tab. That behaviour is unchanged.
Release Note
Persona Bar menu items can now be opened in a new browser tab (middle-click, Ctrl/Cmd-click or "Open link in new tab"), for example to work in Pages and Recycle Bin side by side.
Testing Steps
?personabar=is removed from the address bar./?personabar=Bogusand/?personabar=Content: no panel opens and there are no script errors./?personabar=Dnn.Servers: nothing opens.