Allow to control target of web links
Plugins can now control the target window in which a web link should be opened. This is an incompatible change and plugins implementing web links must be adapted. Change-Id: I5aec40ce425251b10fcb912131d547982d27cd55 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -399,6 +399,9 @@ public class ProjectBranchesScreen extends ProjectScreen {
|
||||
for (WebLinkInfo weblink : Natives.asList(k.web_links())) {
|
||||
Anchor a = new Anchor();
|
||||
a.setHref(weblink.url());
|
||||
if (weblink.target() != null && !weblink.target().isEmpty()) {
|
||||
a.setTarget(weblink.target());
|
||||
}
|
||||
if (weblink.imageUrl() != null && !weblink.imageUrl().isEmpty()) {
|
||||
Image img = new Image();
|
||||
img.setAltText(weblink.name());
|
||||
|
||||
@@ -240,6 +240,9 @@ public class ProjectListScreen extends Screen implements FilteredUserInterface {
|
||||
for (WebLinkInfo weblink : webLinks) {
|
||||
Anchor a = new Anchor();
|
||||
a.setHref(weblink.url());
|
||||
if (weblink.target() != null && !weblink.target().isEmpty()) {
|
||||
a.setTarget(weblink.target());
|
||||
}
|
||||
if (weblink.imageUrl() != null && !weblink.imageUrl().isEmpty()) {
|
||||
Image img = new Image();
|
||||
img.setAltText(weblink.name());
|
||||
|
||||
Reference in New Issue
Block a user