331: WS: Get Public Link enhancements
Task-Url: https://support.d4science.org/issues/331 Updated mask git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@115825 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
055305905f
commit
8283c85621
|
@ -50,7 +50,7 @@ public class DialogPublicLink extends Dialog {
|
||||||
txtCompleteURL.setStyleAttribute("margin-top", "1px");
|
txtCompleteURL.setStyleAttribute("margin-top", "1px");
|
||||||
txtCompleteURL.setWidth(widht-20);
|
txtCompleteURL.setWidth(widht-20);
|
||||||
txtCompleteURL.setReadOnly(true);
|
txtCompleteURL.setReadOnly(true);
|
||||||
txtCompleteURL.mask("Getting Link...");
|
// txtCompleteURL.mask("Getting Link...");
|
||||||
vp1.add(new Label("Link"));
|
vp1.add(new Label("Link"));
|
||||||
vp1.add(txtCompleteURL);
|
vp1.add(txtCompleteURL);
|
||||||
|
|
||||||
|
@ -59,17 +59,18 @@ public class DialogPublicLink extends Dialog {
|
||||||
txtShortURL = new TextField<String>();
|
txtShortURL = new TextField<String>();
|
||||||
txtShortURL.setStyleAttribute("margin-top", "1px");
|
txtShortURL.setStyleAttribute("margin-top", "1px");
|
||||||
txtShortURL.setWidth(widht-20);
|
txtShortURL.setWidth(widht-20);
|
||||||
txtShortURL.mask("Getting Link...");
|
// txtShortURL.mask("Getting Link...");
|
||||||
vp2.add(new Label("Short Link"));
|
vp2.add(new Label("Short Link"));
|
||||||
vp2.add(txtShortURL);
|
vp2.add(txtShortURL);
|
||||||
|
|
||||||
|
vp.mask("Getting Link...");
|
||||||
|
|
||||||
if(itemId!=null && !itemId.isEmpty()){
|
if(itemId!=null && !itemId.isEmpty()){
|
||||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFolderItemId(itemId, true, new AsyncCallback<PublicLink>() {
|
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFolderItemId(itemId, true, new AsyncCallback<PublicLink>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PublicLink publicLink) {
|
public void onSuccess(PublicLink publicLink) {
|
||||||
txtCompleteURL.unmask();
|
vp.unmask();
|
||||||
txtShortURL.unmask();
|
|
||||||
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
txtCompleteURL.setValue(publicLink.getCompleteURL());
|
||||||
txtShortURL.setValue(publicLink.getShortURL());
|
txtShortURL.setValue(publicLink.getShortURL());
|
||||||
selectTxt();
|
selectTxt();
|
||||||
|
@ -77,8 +78,7 @@ public class DialogPublicLink extends Dialog {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
txtCompleteURL.unmask();
|
vp.unmask();
|
||||||
txtShortURL.unmask();
|
|
||||||
new MessageBoxAlert("Error", caught.getMessage(), null);
|
new MessageBoxAlert("Error", caught.getMessage(), null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue