import gr.ebs.gss.client.rest.RestException;\r
import gr.ebs.gss.client.rest.resource.FolderResource;\r
import gr.ebs.gss.client.rest.resource.RestResource;\r
+import gr.ebs.gss.client.rest.resource.RestResourceWrapper;\r
\r
import com.google.gwt.core.client.GWT;\r
import com.google.gwt.dom.client.NativeEvent;\r
import com.google.gwt.user.client.ui.HTML;\r
import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
import com.google.gwt.user.client.ui.HorizontalPanel;\r
-import com.google.gwt.user.client.ui.TreeItem;\r
import com.google.gwt.user.client.ui.VerticalPanel;\r
\r
/**\r
// Set the dialog's caption.\r
setText("Confirmation");\r
setAnimationEnabled(true);\r
- FolderResource folder = (FolderResource) GSS.get().getCurrentSelection();\r
+ FolderResource folder = ((RestResourceWrapper) GSS.get().getTreeView().getSelection()).getResource();\r
// Create a VerticalPanel to contain the HTML label and the buttons.\r
VerticalPanel outer = new VerticalPanel();\r
HorizontalPanel buttons = new HorizontalPanel();\r
hide();\r
}\r
});\r
+ ok.getElement().setId("confirmation.ok");\r
buttons.add(ok);\r
buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
// Create the 'Cancel' button, along with a listener that hides the\r
hide();\r
}\r
});\r
+ cancel.getElement().setId("confirmation.cancel");\r
buttons.add(cancel);\r
buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
buttons.setSpacing(8);\r
GSS.get().displayError("No folder was selected");\r
return;\r
}\r
- if(!(folder instanceof FolderResource))\r
+ if(!(folder instanceof RestResourceWrapper))\r
return;\r
\r
DeleteCommand df = new DeleteCommand(folder.getUri()){\r
\r
@Override\r
public void onComplete() {\r
- /*TODO: CELLTREE\r
- TreeItem curFolder = GSS.get().getFolders().getCurrent();\r
- if(curFolder.getParentItem() != null){\r
- GSS.get().getFolders().select(curFolder.getParentItem());\r
- GSS.get().getFolders().updateFolder((DnDTreeItem) curFolder.getParentItem());\r
- }*/\r
+ FolderResource fres = ((RestResourceWrapper) GSS.get().getTreeView().getSelection()).getResource();\r
+ GSS.get().getTreeView().updateNodeChildrenForRemove(fres.getParentURI());\r
+ GSS.get().getTreeView().clearSelection();\r
GSS.get().showFileList(true);\r
+ \r
GSS.get().getStatusPanel().updateStats();\r
}\r
\r