Skip to content

Commit

Permalink
Added close button to license popup (#2975)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjepard authored Feb 7, 2024
1 parent 1592c97 commit f376b43
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,35 @@ public void onClick(ClickEvent event) {

public static void showLicenseModal(String title, HTML license) {
final DialogBox dialogBox = new ClosableDialog(true, true);

VerticalPanel panel = new VerticalPanel();

ScrollPanel layout = new ScrollPanel();
layout.setSize("70vw", "80vh");

FlowPanel footer = new FlowPanel();

Button closeButton = new Button(messages.closeButton());
closeButton.addStyleName("btn btn-link");

layout.setSize("70vw", "80vh");
layout.addStyleName("wui-dialog-layout");
layout.setWidget(license);

dialogBox.setWidget(layout);
footer.add(closeButton);

closeButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent clickEvent) {
dialogBox.hide();
}
});

panel.add(layout);
panel.add(footer);

dialogBox.setWidget(panel);
footer.addStyleName("wui-dialog-license-layout-footer");
dialogBox.setText(title);
dialogBox.addStyleName("wui-dialog-information");
dialogBox.setGlassEnabled(true);
Expand Down Expand Up @@ -188,7 +211,6 @@ public static void showInformationDialog(String title, final String message, Str
boolean canCopyMessage, final AsyncCallback<Void> callback) {
final DialogBox dialogBox = new DialogBox(false, true);
dialogBox.setText(title);

FlowPanel layout = new FlowPanel();
HTML messageLabel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7889,3 +7889,9 @@ span.code {
}



.wui-dialog-license-layout-footer {
text-align: right;
margin-top: 10px;
margin-bottom: 5px;
}

0 comments on commit f376b43

Please sign in to comment.