Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@93503 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-25 10:16:58 +00:00
parent aad6bd8da6
commit 37387080cc
7 changed files with 42 additions and 3 deletions

View File

@ -18,6 +18,7 @@ import org.gcube.portlets.user.td.sharewidget.client.TRShare;
import org.gcube.portlets.user.td.tablewidget.client.CloneTabularResource;
import org.gcube.portlets.user.td.tablewidget.client.rows.DeleteRows;
import org.gcube.portlets.user.td.tablewidget.client.template.TemplateApplyDialog;
import org.gcube.portlets.user.td.tablewidget.client.template.TemplateDeleteDialog;
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
@ -327,6 +328,9 @@ public class TabularDataController {
case TEMPLATENEW:
openTemplateNew();
break;
case TEMPLATEDELETE:
openTemplateDelete();
break;
case SHARE:
openShareWindow();
break;
@ -665,6 +669,12 @@ public class TabularDataController {
tdTemplateController.getWindowTemplatePanel().show();
}
protected void openTemplateDelete() {
TemplateDeleteDialog tdDialog = new TemplateDeleteDialog(eventBus);
tdDialog.show();
}
protected void openTemplateOpen() {
Log.debug("Template Open call");

View File

@ -283,6 +283,12 @@ public interface TabularDataResources extends ClientBundle {
@Source("template-edit.png")
ImageResource templateEdit();
@Source("template-delete.png")
ImageResource templateDelete();
@Source("template-delete_32.png")
ImageResource templateDelete32();
@Source("timeline_32.png")
ImageResource timeline32();

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -52,8 +52,10 @@ public class FileToolBar {
//Template
//protected TextButton templateOpenButton;
private TextButton templateNewButton;
protected TextButton templateNewButton;
protected TextButton templateDeleteButton;
//Share
protected TextButton shareButton;
protected TextButton timelineButton;
@ -294,8 +296,6 @@ public class FileToolBar {
FlexTable templateLayout = new FlexTable();
templateGroup.add(templateLayout);
templateNewButton = new TextButton("New",
TabularDataResources.INSTANCE.templateEdit32());
templateNewButton.enable();
@ -314,6 +314,25 @@ public class FileToolBar {
templateLayout.setWidget(0, 0, templateNewButton);
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
templateDeleteButton = new TextButton("Delete",
TabularDataResources.INSTANCE.templateDelete32());
templateDeleteButton.enable();
templateDeleteButton.setToolTip("Delete");
templateDeleteButton.setScale(ButtonScale.LARGE);
templateDeleteButton.setIconAlign(IconAlign.TOP);
templateDeleteButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
templateDeleteButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
eventBus.fireEvent(new RibbonEvent(
RibbonType.TEMPLATEDELETE));
}
});
templateLayout.setWidget(0, 1, templateDeleteButton);
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
/*
templateOpenButton = new TextButton("Open",
TabularDataResources.INSTANCE.templateAdd32());
@ -518,6 +537,7 @@ public class FileToolBar {
exportSDMXButton.disable();
//templateOpenButton.enable();
templateNewButton.enable();
templateDeleteButton.enable();
timelineButton.disable();
break;
case TR_CLOSE:
@ -535,6 +555,7 @@ public class FileToolBar {
exportSDMXButton.disable();
//templateOpenButton.enable();
templateNewButton.enable();
templateDeleteButton.enable();
timelineButton.disable();
break;
case TR_OPEN:
@ -557,6 +578,7 @@ public class FileToolBar {
exportJSONButton.disable();
//templateOpenButton.enable();
templateNewButton.enable();
templateDeleteButton.enable();
timelineButton.enable();
break;
case WIZARD_OPEN:
@ -574,6 +596,7 @@ public class FileToolBar {
exportSDMXButton.disable();
//templateOpenButton.disable();
templateNewButton.disable();
templateDeleteButton.disable();
timelineButton.disable();
break;
default:

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB