Skip to content

Commit

Permalink
fix: [#727] Open external link in new browser page (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
ursjoss authored Oct 25, 2024
1 parent 6be8c91 commit dbb2584
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,18 @@ NOTE: References to user stories are in the form Iteration/Story-Number.
.Added

.Changed
- bumped jooq-gradle-plugin

////
.Deprecated
.Removed
////

.Fixed
- {url-issues}727[#727] Open Help/Changelog in new browser window

////
.Security
////

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import ch.difty.scipamato.common.config.ApplicationProperties
import ch.difty.scipamato.common.web.AbstractPage
import ch.difty.scipamato.common.web.ScipamatoWebSessionFacade
import ch.difty.scipamato.common.web.component.SerializableConsumer
import de.agilecoders.wicket.core.markup.html.bootstrap.button.BootstrapExternalLink
import de.agilecoders.wicket.core.markup.html.bootstrap.button.dropdown.MenuBookmarkablePageLink
import de.agilecoders.wicket.core.markup.html.bootstrap.image.IconType
import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.Navbar
Expand All @@ -15,6 +14,7 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarExternalLin
import org.apache.wicket.Component
import org.apache.wicket.Page
import org.apache.wicket.markup.html.link.AbstractLink
import org.apache.wicket.markup.html.link.PopupSettings
import org.apache.wicket.model.Model
import org.apache.wicket.model.StringResourceModel
import org.apache.wicket.request.mapper.parameter.PageParameters
Expand Down Expand Up @@ -49,7 +49,10 @@ abstract class AbstractMenuBuilder protected constructor(
) {
NavbarExternalLink(Model.of(url)).apply {
setLabel(Model.of(label))
setTarget(BootstrapExternalLink.Target.blank)
val popupSettings = PopupSettings(PopupSettings.RESIZABLE or PopupSettings.SCROLLBARS).apply {
setTarget("_blank")
}
setPopupSettings(popupSettings)
iconType?.let { setIconType(it) }
}.also { navbar.addComponents(NavbarComponents.transform(position, it)) }
}
Expand Down

0 comments on commit dbb2584

Please sign in to comment.