enhancement: copy with multi-selection is implemented
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@90436 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d5dc2d4d30
commit
215a64a024
|
@ -5,6 +5,9 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="workspace-tree-widget-6.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree/WorkspaceTree">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="workspace"/>
|
||||
</wb-module>
|
||||
|
|
13
pom.xml
13
pom.xml
|
@ -164,21 +164,28 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace-tree-widget</artifactId>
|
||||
<version>[6.0.0-SNAPSHOT, 7.0.0-SNAPSHOT)</version>
|
||||
<!-- <scope>provided</scope> -->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- WSLT dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>workspace-light-tree</artifactId>
|
||||
<!-- <scope>provided</scope> -->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>fileupload-progress-bar</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>wsmail-widget</artifactId>
|
||||
<version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<!-- <scope>provided</scope> -->
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -212,6 +212,7 @@ public class AppController implements SubscriberInterface {
|
|||
//PASTE EVENT
|
||||
eventBus.addHandler(PasteItemEvent.TYPE, new PasteItemEventHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onCopyAndPaste(PasteItemEvent pasteItemEvent) {
|
||||
|
||||
|
@ -227,9 +228,11 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
}
|
||||
|
||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.VALIDATINGOPERATION,ConstantsExplorer.LOADINGSTYLE);
|
||||
|
||||
if(folderDestinationId!=null){
|
||||
// Info.display("Info", "pasting...");
|
||||
AppControllerExplorer.getEventBus().fireEvent(new PasteItemEvent(pasteItemEvent.getItemId(), folderDestinationId));
|
||||
AppControllerExplorer.getEventBus().fireEvent(new PasteItemEvent(pasteItemEvent.getIds(), folderDestinationId));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1433,6 +1436,8 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
resetSmartFolderSelected();
|
||||
|
||||
GWT.log("refreshFolder method, forceRefresh is :" +forceRefresh);
|
||||
|
||||
if(folderTarget!=null){
|
||||
|
||||
if(forceRefresh){
|
||||
|
@ -1440,7 +1445,7 @@ public class AppController implements SubscriberInterface {
|
|||
//FORCED REFRESH FOLDER
|
||||
FileGridModel folder = wsPortlet.getGridGroupContainer().getFileGridModelByIdentifier(folderTarget.getIdentifier());
|
||||
|
||||
GWT.log("force refresh folder :" +folder);
|
||||
GWT.log("force refresh, folder :" +folder);
|
||||
|
||||
updateStoreByRpc(folderTarget);
|
||||
|
||||
|
@ -1547,8 +1552,8 @@ public class AppController implements SubscriberInterface {
|
|||
*/
|
||||
@Override
|
||||
public void pasteEventIsCompleted() {
|
||||
|
||||
Info.display("Info", "paste submitting...");
|
||||
wsPortlet.getGridGroupContainer().unmask();
|
||||
// Info.display("Info", "paste submitting...");
|
||||
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activePasteButton(false);
|
||||
|
||||
}
|
||||
|
|
|
@ -308,13 +308,19 @@ public class GxtToolBarItemFunctionality {
|
|||
|
||||
btnCopyItem.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
|
||||
if(fileGridModel.getIdentifier()!=null){
|
||||
CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
|
||||
List<String> listTarget = gridGroupViewContainer.getIdsSelectedItems();
|
||||
if(listTarget!=null && listTarget.size()>0){
|
||||
CopyAndPaste.copy(listTarget);
|
||||
btnPasteItem.setEnabled(true);
|
||||
}
|
||||
|
||||
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||
//
|
||||
// if(fileGridModel.getIdentifier()!=null){
|
||||
// CopyAndPaste.copy(fileGridModel.getIdentifier());
|
||||
// btnPasteItem.setEnabled(true);
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -330,8 +336,8 @@ public class GxtToolBarItemFunctionality {
|
|||
if(parentTarget!=null)
|
||||
parentId=parentTarget.getIdentifier();
|
||||
|
||||
AppController.getEventBus().fireEvent(new PasteItemEvent(CopyAndPaste.getCopiedfileModelId(), parentId));
|
||||
CopyAndPaste.setCopiedfileModelId(null);
|
||||
AppController.getEventBus().fireEvent(new PasteItemEvent(CopyAndPaste.getCopiedIdsFilesModel(), parentId));
|
||||
CopyAndPaste.setCopiedIdsFileModels(null);
|
||||
btnPasteItem.setEnabled(false);
|
||||
|
||||
}
|
||||
|
@ -646,13 +652,15 @@ public class GxtToolBarItemFunctionality {
|
|||
}
|
||||
|
||||
public void activeButtonForMultiSelection(boolean active){
|
||||
this.btnRemoveItem.setEnabled(active);
|
||||
this.btnRenameItem.setEnabled(!active);
|
||||
this.btnDownloadFile.setEnabled(!active);
|
||||
this.btnOpen.setEnabled(!active);
|
||||
this.btnCopyItem.setEnabled(!active);
|
||||
this.btnGetSharedLink.setEnabled(!active);
|
||||
this.btnPublicLink.setEnabled(!active);
|
||||
|
||||
//ONLY ENABLED
|
||||
this.btnRemoveItem.setEnabled(active);
|
||||
this.btnCopyItem.setEnabled(active);
|
||||
}
|
||||
|
||||
public ToolBar getToolBar() {
|
||||
|
|
Loading…
Reference in New Issue