|
|
|
@ -4,16 +4,14 @@ package org.gcube.portlets.user.geoportaldataviewer.client.ui.dialogs;
|
|
|
|
|
import org.gcube.application.geoportalcommon.shared.GeoNaItemRef;
|
|
|
|
|
import org.gcube.application.geoportalcommon.shared.PublicLink;
|
|
|
|
|
import org.gcube.portlets.user.geoportaldataviewer.client.GeoportalDataViewerServiceAsync;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.Alert;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.Button;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.FieldSet;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.FormGroup;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.Modal;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.ModalFooter;
|
|
|
|
|
import org.gwtbootstrap3.client.ui.TextBox;
|
|
|
|
|
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.Alert;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.Button;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.ControlGroup;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.Fieldset;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.Modal;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.ModalFooter;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.TextBox;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.Tooltip;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.constants.VisibilityChange;
|
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
|
import com.google.gwt.dom.client.Element;
|
|
|
|
|
import com.google.gwt.event.dom.client.ClickEvent;
|
|
|
|
@ -23,7 +21,6 @@ import com.google.gwt.event.dom.client.MouseOverHandler;
|
|
|
|
|
import com.google.gwt.uibinder.client.UiBinder;
|
|
|
|
|
import com.google.gwt.uibinder.client.UiField;
|
|
|
|
|
import com.google.gwt.user.client.Random;
|
|
|
|
|
import com.google.gwt.user.client.Timer;
|
|
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
|
|
|
|
import com.google.gwt.user.client.ui.Composite;
|
|
|
|
|
import com.google.gwt.user.client.ui.Label;
|
|
|
|
@ -44,13 +41,13 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
private Modal modalBox = new Modal();
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
ControlGroup cgPublicLink;
|
|
|
|
|
FormGroup cgPublicLink;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
ControlGroup cgPrivateLongLink;
|
|
|
|
|
FormGroup cgPrivateLongLink;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
ControlGroup cgPublicLongLink;
|
|
|
|
|
FormGroup cgPublicLongLink;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
TextBox textPublicLink;
|
|
|
|
@ -74,10 +71,10 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
// Well alertFilePublicLink;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
Fieldset fieldSetPrivate;
|
|
|
|
|
FieldSet fieldSetPrivate;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
Fieldset fieldSetPublic;
|
|
|
|
|
FieldSet fieldSetPublic;
|
|
|
|
|
|
|
|
|
|
@UiField
|
|
|
|
|
VerticalPanel fieldPrivateSharing;
|
|
|
|
@ -148,7 +145,7 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
|
|
|
|
|
this.geonItemRef = item;
|
|
|
|
|
this.fileVersion = version;
|
|
|
|
|
this.actionAlert.setAnimation(true);
|
|
|
|
|
//this.actionAlert.setAnimation(true);
|
|
|
|
|
|
|
|
|
|
//cgRemovePublicLink.setVisible(false);
|
|
|
|
|
// fieldSetPrivate.setVisible(false);
|
|
|
|
@ -246,18 +243,19 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
|
|
|
|
|
final Element elem = event.getRelativeElement();
|
|
|
|
|
elem.setTitle("Copied to clipboard");
|
|
|
|
|
Tooltip.changeVisibility(elem, VisibilityChange.TOGGLE.get());
|
|
|
|
|
Timer timer = new Timer() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
Tooltip.changeVisibility(elem, VisibilityChange.HIDE.get());
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
timer.schedule(1000);
|
|
|
|
|
//TODO
|
|
|
|
|
// final Element elem = event.getRelativeElement();
|
|
|
|
|
// elem.setTitle("Copied to clipboard");
|
|
|
|
|
// Tooltip.changeVisibility(elem, VisibilityChange.TOGGLE.get());
|
|
|
|
|
// Timer timer = new Timer() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void run() {
|
|
|
|
|
// Tooltip.changeVisibility(elem, VisibilityChange.HIDE.get());
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
//
|
|
|
|
|
// timer.schedule(1000);
|
|
|
|
|
copyToClipboard(textPrivateLink.getId());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -276,17 +274,19 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
//TODO
|
|
|
|
|
// 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(textPrivateLongLink.getId());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -304,17 +304,19 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
//TODO
|
|
|
|
|
// 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());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -332,17 +334,19 @@ public class DialogShareableLink extends Composite {
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
//TODO
|
|
|
|
|
// 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(textPublicLongLink.getId());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|