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:
Francesco Mangiacrapa 2015-07-03 10:37:36 +00:00
parent 055305905f
commit 8283c85621
1 changed files with 6 additions and 6 deletions

View File

@ -50,7 +50,7 @@ public class DialogPublicLink extends Dialog {
txtCompleteURL.setStyleAttribute("margin-top", "1px");
txtCompleteURL.setWidth(widht-20);
txtCompleteURL.setReadOnly(true);
txtCompleteURL.mask("Getting Link...");
// txtCompleteURL.mask("Getting Link...");
vp1.add(new Label("Link"));
vp1.add(txtCompleteURL);
@ -59,17 +59,18 @@ public class DialogPublicLink extends Dialog {
txtShortURL = new TextField<String>();
txtShortURL.setStyleAttribute("margin-top", "1px");
txtShortURL.setWidth(widht-20);
txtShortURL.mask("Getting Link...");
// txtShortURL.mask("Getting Link...");
vp2.add(new Label("Short Link"));
vp2.add(txtShortURL);
vp.mask("Getting Link...");
if(itemId!=null && !itemId.isEmpty()){
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFolderItemId(itemId, true, new AsyncCallback<PublicLink>() {
@Override
public void onSuccess(PublicLink publicLink) {
txtCompleteURL.unmask();
txtShortURL.unmask();
vp.unmask();
txtCompleteURL.setValue(publicLink.getCompleteURL());
txtShortURL.setValue(publicLink.getShortURL());
selectTxt();
@ -77,8 +78,7 @@ public class DialogPublicLink extends Dialog {
@Override
public void onFailure(Throwable caught) {
txtCompleteURL.unmask();
txtShortURL.unmask();
vp.unmask();
new MessageBoxAlert("Error", caught.getMessage(), null);
}
});