|
|
|
@ -118,6 +118,9 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
@UiField
|
|
|
|
|
Button privateLongLinkCopyButton;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
Button publicLinkCopyButton;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
Button publicLongLinkCopyButton;
|
|
|
|
|
|
|
|
|
@ -189,6 +192,7 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
|
|
|
|
|
textPrivateLink.setId(Random.nextInt()+Random.nextInt()+"");
|
|
|
|
|
textPrivateLongLink.setId(Random.nextInt()+Random.nextInt()+"");
|
|
|
|
|
textPublicLink.setId(Random.nextInt()+Random.nextInt()+"");
|
|
|
|
|
textPublicLongLink.setId(Random.nextInt()+Random.nextInt()+"");
|
|
|
|
|
|
|
|
|
|
modalBox.add(this);
|
|
|
|
@ -248,6 +252,7 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
textPublicLongLink.setText("Not available");
|
|
|
|
|
showPublicLongLinkButton.setText("Not available");
|
|
|
|
|
showPublicLongLinkButton.addStyleName("href-disabled");
|
|
|
|
|
publicLongLinkCopyButton.setEnabled(false);
|
|
|
|
|
// showPublicLongLinkButton.setVisible(false);
|
|
|
|
|
disableTextBox(textPublicLongLink);
|
|
|
|
|
}
|
|
|
|
@ -313,6 +318,34 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
publicLinkCopyButton.addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
final Element elem = event.getRelativeElement();
|
|
|
|
|
Tooltip.changeVisibility(elem, VisibilityChange.TOGGLE.get());
|
|
|
|
|
Timer timer = new Timer() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
Tooltip.changeVisibility(elem, VisibilityChange.HIDE.get());
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
timer.schedule(1000);
|
|
|
|
|
copyToClipboard(textPublicLink.getId());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
publicLinkCopyButton.addMouseOverHandler(new MouseOverHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onMouseOver(MouseOverEvent event) {
|
|
|
|
|
final Element elem = event.getRelativeElement();
|
|
|
|
|
elem.setTitle("Copy");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
publicLongLinkCopyButton.addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -678,6 +711,7 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
// showPublicLongLinkButton.addStyleName("href-disabled");
|
|
|
|
|
showPublicLongLinkButton.setVisible(false);
|
|
|
|
|
textPublicLink.setText("You are not authorized");
|
|
|
|
|
publicLinkCopyButton.setEnabled(false);
|
|
|
|
|
disableTextBox(textPublicLink);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|