diff --git a/ShareWidget.launch b/ShareWidget.launch deleted file mode 100644 index c09958b..0000000 --- a/ShareWidget.launch +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 0e2c582..892c285 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,13 @@ 2.2.5 provided - + + + + org.gcube.dvos + usermanagement-core + + org.gcube.portlets.widgets @@ -122,9 +128,9 @@ [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) provided - - - + + + org.gcube.portlets.user diff --git a/src/main/java/org/gcube/portlets/user/td/sharewidget/client/ShareWidgetEntry.java b/src/main/java/org/gcube/portlets/user/td/sharewidget/client/ShareWidgetEntry.java index 9b4452c..58e7ef9 100644 --- a/src/main/java/org/gcube/portlets/user/td/sharewidget/client/ShareWidgetEntry.java +++ b/src/main/java/org/gcube/portlets/user/td/sharewidget/client/ShareWidgetEntry.java @@ -9,7 +9,7 @@ public class ShareWidgetEntry implements EntryPoint { public void onModuleLoad() { - + TRShare trShare=new TRShare(); Log.info("Hello!"); } } diff --git a/src/main/java/org/gcube/portlets/user/td/sharewidget/client/TRShare.java b/src/main/java/org/gcube/portlets/user/td/sharewidget/client/TRShare.java index 6693640..acde7a8 100644 --- a/src/main/java/org/gcube/portlets/user/td/sharewidget/client/TRShare.java +++ b/src/main/java/org/gcube/portlets/user/td/sharewidget/client/TRShare.java @@ -1,9 +1,20 @@ package org.gcube.portlets.user.td.sharewidget.client; +import org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSmartSharingController; +import org.gcube.portlets.widgets.workspacesharingwidget.client.view.sharing.SmartShare; +import org.gcube.portlets.widgets.workspacesharingwidget.shared.CredentialModel; +import org.gcube.portlets.widgets.workspacesharingwidget.shared.FileModel; +import org.gcube.portlets.widgets.workspacesharingwidget.shared.InfoContactModel; + +import com.extjs.gxt.ui.client.event.BaseEvent; +import com.extjs.gxt.ui.client.event.Events; +import com.extjs.gxt.ui.client.event.Listener; +import com.extjs.gxt.ui.client.widget.Dialog; + public class TRShare { public TRShare() { - //FileModel file = new FileModel("id", "filename", false); + FileModel file = new FileModel("id", "filename", false); /** * This controller instance the smart sharing dialog @@ -13,18 +24,13 @@ public class TRShare { * dialog * @param listAlreadySharedContact */ -/* + WorkspaceSmartSharingController controller = new WorkspaceSmartSharingController( file, null); - final Dialog sharingWindow = controller.getSharingDialog(); + final SmartShare sharingWindow = controller.getSharingDialog(); - Button openSharingWindow = new Button("Show Sharing Window", - new ClickHandler() { - public void onClick(ClickEvent event) { - sharingWindow.show(); - } - }); + sharingWindow.show(); sharingWindow.getButtonById(Dialog.OK).addListener(Events.Select, new Listener() { @@ -32,7 +38,7 @@ public class TRShare { @Override public void handleEvent(BaseEvent be) { - if (smartShare.isValidForm(true)) { + if (sharingWindow.isValidForm(true)) { // THAT'S OK sharingWindow.getSharedListUsers(); // @return the @@ -61,7 +67,7 @@ public class TRShare { } }); - */ + } } diff --git a/src/main/resources/org/gcube/portlets/user/td/sharewidget/ShareWidget.gwt.xml b/src/main/resources/org/gcube/portlets/user/td/sharewidget/ShareWidget.gwt.xml index 93608fd..2777d2c 100644 --- a/src/main/resources/org/gcube/portlets/user/td/sharewidget/ShareWidget.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/td/sharewidget/ShareWidget.gwt.xml @@ -22,7 +22,7 @@ - + diff --git a/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml b/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml index b87ca47..ac20f89 100644 --- a/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml +++ b/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml @@ -10,4 +10,5 @@ + \ No newline at end of file