Updated pom at 6.9.0

Locked rename operation

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@117584 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-07-31 09:23:46 +00:00
parent a7141cfde9
commit 1607946a42
3 changed files with 8 additions and 46 deletions

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-tree-widget</artifactId> <artifactId>workspace-tree-widget</artifactId>
<version>6.8.0-SNAPSHOT</version> <version>6.9.0-SNAPSHOT</version>
<name>gCube Workspace Tree Widget</name> <name>gCube Workspace Tree Widget</name>
<description> <description>
gCube Workspace Tree Widget. gCube Workspace Tree Widget.

View File

@ -1090,9 +1090,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
explorerPanel.getAsycTreePanel().removeAllAndRecoveryRoot(); explorerPanel.getAsycTreePanel().removeAllAndRecoveryRoot();
} }
} }
// markItemInTreeAsRead(fileDownloadEvent.getItemIdentifier(), true);
notifySubscriber(fileDownloadEvent); notifySubscriber(fileDownloadEvent);
} }
@ -1120,14 +1117,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
} }
else else
fileUploader = new FileUploader(eventBus, folder, ConstantsExplorer.FILE); fileUploader = new FileUploader(eventBus, folder, ConstantsExplorer.FILE);
// new DialogUpload(ConstantsExplorer.FILEUPLOADHEADER, folder.getName(), folder, ConstantsExplorer.FILE);
// if(fileUploadEvent.getUploadTypeToString().equals(UploadType.ARCHIVE.toString()))
// new DialogUpload(ConstantsExplorer.ARCHIVEUPLOADHEADER, folder.getName(), folder, ConstantsExplorer.ARCHIVE);
// else
// new DialogUpload(ConstantsExplorer.FILEUPLOADHEADER, folder.getName(), folder, ConstantsExplorer.FILE);
} }
}); });
@ -1142,11 +1131,8 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
try { try {
String normalizedFileName = fileName; String normalizedFileName = fileName;
// com.google.gwt.user.client.Window.alert("fileUploadField.getValue() "+fileUploadField.getValue());
if (normalizedFileName.contains("\\")) { if (normalizedFileName.contains("\\")) {
normalizedFileName = normalizedFileName.substring(normalizedFileName.lastIndexOf("\\")+1); //remove C:\fakepath\ if exists normalizedFileName = normalizedFileName.substring(normalizedFileName.lastIndexOf("\\")+1); //remove C:\fakepath\ if exists
// com.google.gwt.user.client.Window.alert("normalizedFileName= "+normalizedFileName);
} }
final String label = normalizedFileName; final String label = normalizedFileName;
@ -1159,22 +1145,16 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
public void onSuccess(final String itemId) { public void onSuccess(final String itemId) {
if(itemId!=null){ if(itemId!=null){
boolean result = Window.confirm(label + " exists in folder "+fileUploader.getFolderParent().getName() + ". Overwrite?"); boolean result = Window.confirm(label + " exists in folder "+fileUploader.getFolderParent().getName() + ". Overwrite?");
if(result){ if(result){
fileUploader.overwrite(); fileUploader.overwrite();
fileUploader.submitForm(); fileUploader.submitForm();
} }
}else }else
fileUploader.submitForm(); //ITEM does NOT EXIST SO SUBMIT FORM; fileUploader.submitForm(); //ITEM does NOT EXIST SO SUBMIT FORM;
} }
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Info.display("Error", "Sorry an error occurred on the server "+caught.getLocalizedMessage() + ". Please try again later"); Info.display("Error", "Sorry an error occurred on the server "+caught.getLocalizedMessage() + ". Please try again later");
@ -1315,13 +1295,8 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override @Override
public void onSuccess(SmartFolderModel smart) { public void onSuccess(SmartFolderModel smart) {
// System.out.println("In client: " + smart.getIdentifier());
explorerPanel.getShortuctsPanel().loadSmartFolder(smart); explorerPanel.getShortuctsPanel().loadSmartFolder(smart);
} }
}); });
} }
@ -1366,14 +1341,13 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
final String newName = dgt.getTxtValue(); final String newName = dgt.getTxtValue();
if(dgt.isValidForm()){ if(dgt.isValidForm()){
dgt.mask("Renaming...");
rpcWorkspaceService.renameItem(target.getIdentifier(), newName, target.getName(), new AsyncCallback<Boolean>(){ rpcWorkspaceService.renameItem(target.getIdentifier(), newName, target.getName(), new AsyncCallback<Boolean>(){
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
dgt.unmask();
explorerPanel.getAsycTreePanel().unmask(); dgt.hide();
if(caught instanceof SessionExpiredException){ if(caught instanceof SessionExpiredException){
GWT.log("Session expired"); GWT.log("Session expired");
eventBus.fireEvent(new SessionExpiredEvent()); eventBus.fireEvent(new SessionExpiredEvent());
@ -1387,13 +1361,12 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override @Override
public void onSuccess(Boolean result) { public void onSuccess(Boolean result) {
dgt.unmask();
dgt.hide();
explorerPanel.getAsycTreePanel().renameItem(target.getIdentifier(), newName, null); explorerPanel.getAsycTreePanel().renameItem(target.getIdentifier(), newName, null);
event.setNewName(newName); event.setNewName(newName);
// event.setExtension(extension);
notifySubscriber(event); notifySubscriber(event);
} }
}); });
} }
} }
@ -1636,8 +1609,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override @Override
public void onClickPreview(ImagePreviewEvent imagePreviewEvent) { public void onClickPreview(ImagePreviewEvent imagePreviewEvent) {
// System.out.println("x e y " + imagePreviewEvent.getClientX() + " e " + imagePreviewEvent.getClientY());
if(imagePreviewEvent.getClientX() > 0 && imagePreviewEvent.getClientY() > 0) if(imagePreviewEvent.getClientX() > 0 && imagePreviewEvent.getClientY() > 0)
doClickPreview(imagePreviewEvent, imagePreviewEvent.getClientX(), imagePreviewEvent.getClientY() ); doClickPreview(imagePreviewEvent, imagePreviewEvent.getClientX(), imagePreviewEvent.getClientY() );
else else
@ -1807,10 +1778,6 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
private void doClickOpenReportTemplate(OpenReportsEvent openReportTemplateEvent) { private void doClickOpenReportTemplate(OpenReportsEvent openReportTemplateEvent) {
// System.out.println("IDTEMPLATE " + ConstantsExplorer.IDTEMPLATE);
// System.out.println("id " +openReportTemplateEvent.getSourceFileModel().getIdentifier());
// System.out.println("name " +openReportTemplateEvent.getSourceFileModel().getName());
rpcWorkspaceService.getURLFromApplicationProfile(openReportTemplateEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<String>() { rpcWorkspaceService.getURLFromApplicationProfile(openReportTemplateEvent.getSourceFileModel().getIdentifier(), new AsyncCallback<String>() {
@Override @Override

View File

@ -61,9 +61,8 @@ public class DialogText extends Dialog {
@Override @Override
public void componentSelected(ButtonEvent ce) { public void componentSelected(ButtonEvent ce) {
// if (isValidForm()) COMMENTED TO PREVENT BACK END EXCEPTION
if (isValidForm()) // hide();
hide();
} }
}); });
@ -72,16 +71,12 @@ public class DialogText extends Dialog {
@Override @Override
public void componentSelected(ButtonEvent ce) { public void componentSelected(ButtonEvent ce) {
hide(); hide();
} }
}); });
setFocusWidget(txt); setFocusWidget(txt);
add(txt); add(txt);
this.show(); this.show();
} }