updated pom at version 6.6.0

starting trash implementation


git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@90085 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-01-14 13:40:25 +00:00
parent 1cc475e1ae
commit 8792cf74e3
8 changed files with 96 additions and 20 deletions

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace</artifactId>
<packaging>war</packaging>
<version>6.5.1-SNAPSHOT</version>
<version>6.6.0-SNAPSHOT</version>
<name>gCube Workspace Portlet</name>
<description>
gcube Workspace Portlet is a portlet for users workspace management

View File

@ -70,6 +70,9 @@ import org.gcube.portlets.user.workspace.client.event.SearchTextEvent;
import org.gcube.portlets.user.workspace.client.event.SearchTextEventHandler;
import org.gcube.portlets.user.workspace.client.event.SendMessageEvent;
import org.gcube.portlets.user.workspace.client.event.SendMessageEventHandler;
import org.gcube.portlets.user.workspace.client.event.TrashEvent;
import org.gcube.portlets.user.workspace.client.event.TrashEvent.TRASHOPERATION;
import org.gcube.portlets.user.workspace.client.event.TrashEventHandler;
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEvent;
import org.gcube.portlets.user.workspace.client.event.WebDavUrlEventHandler;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
@ -81,6 +84,7 @@ import org.gcube.portlets.user.workspace.client.model.ScopeModel;
import org.gcube.portlets.user.workspace.client.view.WorskpacePortlet;
import org.gcube.portlets.user.workspace.client.view.panels.GxtBorderLayoutPanel;
import org.gcube.portlets.user.workspace.client.view.panels.GxtItemsPanel;
import org.gcube.portlets.user.workspace.client.view.trash.WindowTrash;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfo;
import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
@ -116,6 +120,7 @@ public class AppController implements SubscriberInterface {
private String selectedSmartFolderId;
private String selectedSmartFolderCategory;
public AppController(AppControllerExplorer appControllerExplorer) {
this.appContrExplorer = appControllerExplorer;
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
@ -140,7 +145,8 @@ public class AppController implements SubscriberInterface {
EventsTypeEnum.FILE_DOWNLAD_EVENT,
EventsTypeEnum.SESSION_EXPIRED,
EventsTypeEnum.PASTED_EVENT,
EventsTypeEnum.COPY_EVENT
EventsTypeEnum.COPY_EVENT,
EventsTypeEnum.TRASH_EVENT
});
bind();
}
@ -153,6 +159,34 @@ public class AppController implements SubscriberInterface {
private void bind() {
eventBus.addHandler(TrashEvent.TYPE, new TrashEventHandler() {
@Override
public void onTrashEvent(TrashEvent trashEvent) {
switch (trashEvent.getTrashOperation()) {
case SHOW:
WindowTrash.getInstance().show();
break;
case MOVETO:
break;
case RESTOREFROM:
break;
default:
break;
}
}
});
//********EVENTS TO NOTIFY SUBSCRIBERS
eventBus.addHandler(ActiveGroupingView.TYPE, new ActiveGroupingViewHandler() {
@ -217,6 +251,8 @@ public class AppController implements SubscriberInterface {
}
});
eventBus.addHandler(AccountingHistoryEvent.TYPE, new AccountingHistoryEventHandler() {
@Override
@ -1439,4 +1475,14 @@ public class AppController implements SubscriberInterface {
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#trashEvent(org.gcube.portlets.user.workspace.client.event.TrashEvent.TRASHOPERATION, org.gcube.portlets.user.workspace.client.model.FileModel)
*/
@Override
public void trashEvent(TRASHOPERATION trashOperation, FileModel targetFileModel) {
}
}

View File

@ -6,7 +6,7 @@ import org.gcube.portlets.user.workspace.client.view.panels.GxtBorderLayoutPanel
import org.gcube.portlets.user.workspace.client.view.panels.GxtCardLayoutResultPanel;
import org.gcube.portlets.user.workspace.client.view.panels.GxtSeachAndFilterPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtPathPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemAccounting;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBottomToolBarItem;
/**
@ -19,7 +19,7 @@ public class WorskpacePortlet {
private GxtBasicTabPanel basicTabContainer = null;
// private GxtToolBarFunctionsPanel toolbarPanelContainer = null;
private ExplorerPanel explorerPanel = null;
private GxtToolBarItemAccounting toolBarItemDetails;
private GxtBottomToolBarItem toolBarItemDetails;
private GxtListView listViewContainer;
private GxtPathPanel toolBarPathPanel;
private GxtGridFilterGroupPanel gridFilterGroupContainer;
@ -35,7 +35,7 @@ public class WorskpacePortlet {
this.gridFilterGroupContainer = new GxtGridFilterGroupPanel(activeGroup);
this.listViewContainer = new GxtListView();
this.toolBarItemDetails = new GxtToolBarItemAccounting();
this.toolBarItemDetails = new GxtBottomToolBarItem();
this.gxtCardLayoutResultPanel = new GxtCardLayoutResultPanel(gridFilterGroupContainer, listViewContainer, toolBarItemDetails);
@ -57,7 +57,7 @@ public class WorskpacePortlet {
return basicTabContainer;
}
public GxtToolBarItemAccounting getDetailsContainer() {
public GxtBottomToolBarItem getDetailsContainer() {
return toolBarItemDetails;
}
@ -85,7 +85,7 @@ public class WorskpacePortlet {
return gxtCardLayoutResultPanel;
}
public GxtToolBarItemAccounting getToolBarItemDetails() {
public GxtBottomToolBarItem getToolBarItemDetails() {
return toolBarItemDetails;
}
}

View File

@ -20,6 +20,8 @@ import org.gcube.portlets.user.workspace.client.model.GroupingStoreModel;
import com.extjs.gxt.ui.client.Style.SelectionMode;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.dnd.GridDragSource;
import com.extjs.gxt.ui.client.dnd.GridDropTarget;
import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.GridEvent;
@ -242,6 +244,12 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
}
});
new GridDragSource(grid);
cp.add(grid);
add(cp);
}

View File

@ -2,7 +2,7 @@ package org.gcube.portlets.user.workspace.client.view.panels;
import org.gcube.portlets.user.workspace.client.ConstantsPortlet;
import org.gcube.portlets.user.workspace.client.view.ExplorerPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemAccounting;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBottomToolBarItem;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.Style.Scroll;
@ -26,7 +26,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
private ContentPanel center = new ContentPanel();
private ContentPanel east = new ContentPanel();
private ContentPanel south = new ContentPanel();
private GxtToolBarItemAccounting toolBarItemDetails = null;
private GxtBottomToolBarItem toolBarItemDetails = null;
private ExplorerPanel expPanel = null; //TODO change position
private GxtSeachAndFilterPanel searchAndFilterContainer;
private GxtCardLayoutResultPanel gxtCardLayoutResultPanel;
@ -36,7 +36,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
GxtSeachAndFilterPanel searchAndFilterContainer2,
ExplorerPanel explorerPanel,
GxtCardLayoutResultPanel gxtCardLayoutResultPanel,
GxtToolBarItemAccounting detailsContainer2) {
GxtBottomToolBarItem detailsContainer2) {
this.searchAndFilterContainer = searchAndFilterContainer2;
this.expPanel = explorerPanel;

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.workspace.client.view.panels;
import org.gcube.portlets.user.workspace.client.ConstantsPortlet.ViewSwitchTypeInResult;
import org.gcube.portlets.user.workspace.client.view.GxtListView;
import org.gcube.portlets.user.workspace.client.view.grids.GxtGridFilterGroupPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemAccounting;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBottomToolBarItem;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemFunctionality;
import com.extjs.gxt.ui.client.widget.ContentPanel;
@ -24,12 +24,12 @@ public class GxtCardLayoutResultPanel extends LayoutContainer{
private GxtGridFilterGroupPanel gridGroupViewContainer;
private ContentPanel activePanel = null;
private GxtToolBarItemFunctionality toolBarItemFunct;
private GxtToolBarItemAccounting toolBarItemDetails;
private GxtBottomToolBarItem toolBarItemDetails;
public GxtCardLayoutResultPanel(
GxtGridFilterGroupPanel gridFilterGroupContainer,
GxtListView listViewContainer,
GxtToolBarItemAccounting toolBarItemDetails) {
GxtBottomToolBarItem toolBarItemDetails) {
this.iconsViewContainer = listViewContainer;
this.gridGroupViewContainer = gridFilterGroupContainer;
this.toolBarItemDetails = toolBarItemDetails;
@ -94,7 +94,7 @@ public class GxtCardLayoutResultPanel extends LayoutContainer{
return activePanel;
}
public GxtToolBarItemAccounting getToolBarItemDetails() {
public GxtBottomToolBarItem getToolBarItemDetails() {
return toolBarItemDetails;
}

View File

@ -2,7 +2,7 @@ package org.gcube.portlets.user.workspace.client.view.panels;
import org.gcube.portlets.user.workspace.client.view.GxtListView;
import org.gcube.portlets.user.workspace.client.view.grids.GxtGridFilterGroupPanel;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemAccounting;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtBottomToolBarItem;
import org.gcube.portlets.user.workspace.client.view.toolbars.GxtToolBarItemFunctionality;
import com.extjs.gxt.ui.client.widget.ContentPanel;
@ -16,10 +16,10 @@ public class GxtItemsPanel extends ContentPanel{
private GxtToolBarItemFunctionality toolBarItemFunct;
private GxtListView iconsViewContainer;
private GxtGridFilterGroupPanel gridGroupViewContainer;
private GxtToolBarItemAccounting toolBarItemDetails;
private GxtBottomToolBarItem toolBarItemDetails;
public GxtItemsPanel(GxtListView iconsViewContainer, GxtGridFilterGroupPanel gridGroupViewContainer, GxtToolBarItemFunctionality toolBarItem, GxtToolBarItemAccounting toolBarItemDetails) {
public GxtItemsPanel(GxtListView iconsViewContainer, GxtGridFilterGroupPanel gridGroupViewContainer, GxtToolBarItemFunctionality toolBarItem, GxtBottomToolBarItem toolBarItemDetails) {
this.iconsViewContainer = iconsViewContainer;
this.gridGroupViewContainer = gridGroupViewContainer;
this.toolBarItemFunct = toolBarItem;
@ -53,7 +53,7 @@ public class GxtItemsPanel extends ContentPanel{
}
public GxtToolBarItemAccounting getToolBarItemDetails() {
public GxtBottomToolBarItem getToolBarItemDetails() {
return toolBarItemDetails;
}

View File

@ -4,6 +4,8 @@ import org.gcube.portlets.user.workspace.client.AppController;
import org.gcube.portlets.user.workspace.client.event.AccountingHistoryEvent;
import org.gcube.portlets.user.workspace.client.event.AccountingReadersEvent;
import org.gcube.portlets.user.workspace.client.event.GetInfoEvent;
import org.gcube.portlets.user.workspace.client.event.TrashEvent;
import org.gcube.portlets.user.workspace.client.event.TrashEvent.TRASHOPERATION;
import org.gcube.portlets.user.workspace.client.resources.Resources;
import com.extjs.gxt.ui.client.event.ButtonEvent;
@ -11,6 +13,7 @@ import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.Text;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.toolbar.FillToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
@ -18,7 +21,7 @@ import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class GxtToolBarItemAccounting extends ToolBar{
public class GxtBottomToolBarItem extends ToolBar{
/**
*
@ -40,8 +43,9 @@ public class GxtToolBarItemAccounting extends ToolBar{
private Button btnGetInfo;
private Button bHistory;
private Button bRead;
private Button btnGetTrash;
public GxtToolBarItemAccounting(){
public GxtBottomToolBarItem(){
super();
initToolbar();
}
@ -94,7 +98,25 @@ public class GxtToolBarItemAccounting extends ToolBar{
// add(new SeparatorToolItem());
// add(bRead);
btnGetTrash = new Button("Trash");
btnGetTrash.setIcon(Resources.getTrash());
btnGetTrash.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
AppController.getEventBus().fireEvent(new TrashEvent(TRASHOPERATION.SHOW, null));
}
});
add(new FillToolItem());
add(btnGetTrash);
enableButtons(false);
}
public void resetDetails(){