Updated i18n support
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113898 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
80984350d0
commit
9ef60bc3fe
|
@ -12,7 +12,7 @@ import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
||||||
import org.gcube.portlets.user.td.client.rstudio.RStudio;
|
import org.gcube.portlets.user.td.client.rstudio.RStudio;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateOpenDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateEditDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateShareDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateShareDialog;
|
||||||
import org.gcube.portlets.user.td.codelistmappingimportwidget.client.CodelistMappingImportWizardTD;
|
import org.gcube.portlets.user.td.codelistmappingimportwidget.client.CodelistMappingImportWizardTD;
|
||||||
import org.gcube.portlets.user.td.csvexportwidget.client.CSVExportWizardTD;
|
import org.gcube.portlets.user.td.csvexportwidget.client.CSVExportWizardTD;
|
||||||
|
@ -1638,7 +1638,7 @@ public class TabularDataController {
|
||||||
GWT.runAsync(new RunAsyncCallback() {
|
GWT.runAsync(new RunAsyncCallback() {
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.debug("Template Open call");
|
Log.debug("Template Open call");
|
||||||
TemplateOpenDialog tdDialog = new TemplateOpenDialog(eventBus);
|
TemplateEditDialog tdDialog = new TemplateEditDialog(eventBus);
|
||||||
tdDialog.show();
|
tdDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.NodeList;
|
import com.google.gwt.dom.client.NodeList;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
|
@ -37,7 +38,7 @@ public class RuleToolBar {
|
||||||
|
|
||||||
//Rules
|
//Rules
|
||||||
private TextButton ruleNewButton;
|
private TextButton ruleNewButton;
|
||||||
private TextButton ruleModifyButton;
|
private TextButton ruleEditButton;
|
||||||
private TextButton ruleDeleteButton;
|
private TextButton ruleDeleteButton;
|
||||||
private TextButton ruleApplyButton;
|
private TextButton ruleApplyButton;
|
||||||
private TextButton ruleShareButton;
|
private TextButton ruleShareButton;
|
||||||
|
@ -53,6 +54,8 @@ public class RuleToolBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void build() {
|
protected void build() {
|
||||||
|
RuleToolBarMessages msgs = GWT.create(RuleToolBarMessages.class);
|
||||||
|
|
||||||
toolBar = new ToolBar();
|
toolBar = new ToolBar();
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
@ -61,17 +64,17 @@ public class RuleToolBar {
|
||||||
ButtonGroup rulesGroup = new ButtonGroup();
|
ButtonGroup rulesGroup = new ButtonGroup();
|
||||||
rulesGroup.setId("Manage");
|
rulesGroup.setId("Manage");
|
||||||
rulesGroup.setStyleName("ribbon");
|
rulesGroup.setStyleName("ribbon");
|
||||||
rulesGroup.setHeadingText("Manage");
|
rulesGroup.setHeadingText(msgs.ruleGroupHeadingText());
|
||||||
//templateGroup.disable();
|
//templateGroup.disable();
|
||||||
toolBar.add(rulesGroup);
|
toolBar.add(rulesGroup);
|
||||||
|
|
||||||
FlexTable templateLayout = new FlexTable();
|
FlexTable templateLayout = new FlexTable();
|
||||||
rulesGroup.add(templateLayout);
|
rulesGroup.add(templateLayout);
|
||||||
|
|
||||||
ruleNewButton = new TextButton("New",
|
ruleNewButton = new TextButton(msgs.ruleNewButton(),
|
||||||
TabularDataResources.INSTANCE.templateEdit32());
|
TabularDataResources.INSTANCE.templateAdd32());
|
||||||
ruleNewButton.enable();
|
ruleNewButton.enable();
|
||||||
ruleNewButton.setToolTip("New");
|
ruleNewButton.setToolTip(msgs.ruleNewButtonToolTip());
|
||||||
ruleNewButton.setScale(ButtonScale.LARGE);
|
ruleNewButton.setScale(ButtonScale.LARGE);
|
||||||
ruleNewButton.setIconAlign(IconAlign.TOP);
|
ruleNewButton.setIconAlign(IconAlign.TOP);
|
||||||
ruleNewButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
ruleNewButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -86,14 +89,14 @@ public class RuleToolBar {
|
||||||
templateLayout.setWidget(0, 0, ruleNewButton);
|
templateLayout.setWidget(0, 0, ruleNewButton);
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
ruleModifyButton = new TextButton("Modify",
|
ruleEditButton = new TextButton(msgs.ruleEditButton(),
|
||||||
TabularDataResources.INSTANCE.templateAdd32());
|
TabularDataResources.INSTANCE.templateEdit32());
|
||||||
ruleModifyButton.enable();
|
ruleEditButton.enable();
|
||||||
ruleModifyButton.setToolTip("Modify");
|
ruleEditButton.setToolTip(msgs.ruleEditButtonToolTip());
|
||||||
ruleModifyButton.setScale(ButtonScale.LARGE);
|
ruleEditButton.setScale(ButtonScale.LARGE);
|
||||||
ruleModifyButton.setIconAlign(IconAlign.TOP);
|
ruleEditButton.setIconAlign(IconAlign.TOP);
|
||||||
ruleModifyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
ruleEditButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
ruleModifyButton.addSelectHandler(new SelectHandler() {
|
ruleEditButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
@ -101,14 +104,14 @@ public class RuleToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
templateLayout.setWidget(0, 1, ruleModifyButton);
|
templateLayout.setWidget(0, 1, ruleEditButton);
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
ruleDeleteButton = new TextButton("Delete",
|
ruleDeleteButton = new TextButton(msgs.ruleDeleteButton(),
|
||||||
TabularDataResources.INSTANCE.templateDelete32());
|
TabularDataResources.INSTANCE.templateDelete32());
|
||||||
ruleDeleteButton.enable();
|
ruleDeleteButton.enable();
|
||||||
ruleDeleteButton.setToolTip("Delete");
|
ruleDeleteButton.setToolTip(msgs.ruleDeleteButtonToolTip());
|
||||||
ruleDeleteButton.setScale(ButtonScale.LARGE);
|
ruleDeleteButton.setScale(ButtonScale.LARGE);
|
||||||
ruleDeleteButton.setIconAlign(IconAlign.TOP);
|
ruleDeleteButton.setIconAlign(IconAlign.TOP);
|
||||||
ruleDeleteButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
ruleDeleteButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -124,12 +127,12 @@ public class RuleToolBar {
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
ruleApplyButton = new TextButton("Apply",
|
ruleApplyButton = new TextButton(msgs.ruleApplyButton(),
|
||||||
TabularDataResources.INSTANCE.templateApply32());
|
TabularDataResources.INSTANCE.templateApply32());
|
||||||
ruleApplyButton.disable();
|
ruleApplyButton.disable();
|
||||||
ruleApplyButton.setScale(ButtonScale.LARGE);
|
ruleApplyButton.setScale(ButtonScale.LARGE);
|
||||||
ruleApplyButton.setIconAlign(IconAlign.TOP);
|
ruleApplyButton.setIconAlign(IconAlign.TOP);
|
||||||
ruleApplyButton.setToolTip("Apply Rule");
|
ruleApplyButton.setToolTip(msgs.ruleApplyButtonToolTip());
|
||||||
ruleApplyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
ruleApplyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
ruleApplyButton.addSelectHandler(new SelectHandler() {
|
ruleApplyButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -142,12 +145,12 @@ public class RuleToolBar {
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
|
||||||
ruleShareButton = new TextButton("Share",
|
ruleShareButton = new TextButton(msgs.ruleShareButton(),
|
||||||
TabularDataResources.INSTANCE.templateShare32());
|
TabularDataResources.INSTANCE.templateShare32());
|
||||||
ruleShareButton.enable();
|
ruleShareButton.enable();
|
||||||
ruleShareButton.setScale(ButtonScale.LARGE);
|
ruleShareButton.setScale(ButtonScale.LARGE);
|
||||||
ruleShareButton.setIconAlign(IconAlign.TOP);
|
ruleShareButton.setIconAlign(IconAlign.TOP);
|
||||||
ruleShareButton.setToolTip("Share Rule");
|
ruleShareButton.setToolTip(msgs.ruleShareButtonToolTip());
|
||||||
ruleShareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
ruleShareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
ruleShareButton.addSelectHandler(new SelectHandler() {
|
ruleShareButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -188,7 +191,7 @@ public class RuleToolBar {
|
||||||
try {
|
try {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
ruleModifyButton.enable();
|
ruleEditButton.enable();
|
||||||
ruleNewButton.enable();
|
ruleNewButton.enable();
|
||||||
ruleDeleteButton.enable();
|
ruleDeleteButton.enable();
|
||||||
ruleApplyButton.disable();
|
ruleApplyButton.disable();
|
||||||
|
@ -196,7 +199,7 @@ public class RuleToolBar {
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
ruleModifyButton.enable();
|
ruleEditButton.enable();
|
||||||
ruleNewButton.enable();
|
ruleNewButton.enable();
|
||||||
ruleDeleteButton.enable();
|
ruleDeleteButton.enable();
|
||||||
ruleApplyButton.disable();
|
ruleApplyButton.disable();
|
||||||
|
@ -205,14 +208,14 @@ public class RuleToolBar {
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
ruleModifyButton.enable();
|
ruleEditButton.enable();
|
||||||
ruleNewButton.enable();
|
ruleNewButton.enable();
|
||||||
ruleDeleteButton.enable();
|
ruleDeleteButton.enable();
|
||||||
ruleApplyButton.enable();
|
ruleApplyButton.enable();
|
||||||
ruleShareButton.enable();
|
ruleShareButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
ruleModifyButton.disable();
|
ruleEditButton.disable();
|
||||||
ruleNewButton.disable();
|
ruleNewButton.disable();
|
||||||
ruleDeleteButton.disable();
|
ruleDeleteButton.disable();
|
||||||
ruleApplyButton.disable();
|
ruleApplyButton.disable();
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface RuleToolBarMessages extends Messages {
|
||||||
|
|
||||||
|
@DefaultMessage("Manage")
|
||||||
|
String ruleGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("New")
|
||||||
|
String ruleNewButton();
|
||||||
|
|
||||||
|
@DefaultMessage("New")
|
||||||
|
String ruleNewButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Edit")
|
||||||
|
String ruleEditButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Edit")
|
||||||
|
String ruleEditButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String ruleDeleteButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String ruleDeleteButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply")
|
||||||
|
String ruleApplyButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply")
|
||||||
|
String ruleApplyButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Share")
|
||||||
|
String ruleShareButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Share")
|
||||||
|
String ruleShareButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.NodeList;
|
import com.google.gwt.dom.client.NodeList;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
|
@ -37,7 +38,7 @@ public class TemplateToolBar {
|
||||||
|
|
||||||
//Template
|
//Template
|
||||||
private TextButton templateNewButton;
|
private TextButton templateNewButton;
|
||||||
private TextButton templateOpenButton;
|
private TextButton templateEditButton;
|
||||||
private TextButton templateDeleteButton;
|
private TextButton templateDeleteButton;
|
||||||
private TextButton templateApplyButton;
|
private TextButton templateApplyButton;
|
||||||
private TextButton templateShareButton;
|
private TextButton templateShareButton;
|
||||||
|
@ -53,6 +54,9 @@ public class TemplateToolBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void build() {
|
protected void build() {
|
||||||
|
TemplateToolBarMessages msgs = GWT.create(TemplateToolBarMessages.class);
|
||||||
|
|
||||||
|
|
||||||
toolBar = new ToolBar();
|
toolBar = new ToolBar();
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
@ -61,17 +65,17 @@ public class TemplateToolBar {
|
||||||
ButtonGroup templateGroup = new ButtonGroup();
|
ButtonGroup templateGroup = new ButtonGroup();
|
||||||
templateGroup.setId("Manage");
|
templateGroup.setId("Manage");
|
||||||
templateGroup.setStyleName("ribbon");
|
templateGroup.setStyleName("ribbon");
|
||||||
templateGroup.setHeadingText("Manage");
|
templateGroup.setHeadingText(msgs.templateGroupHeadingText());
|
||||||
//templateGroup.disable();
|
//templateGroup.disable();
|
||||||
toolBar.add(templateGroup);
|
toolBar.add(templateGroup);
|
||||||
|
|
||||||
FlexTable templateLayout = new FlexTable();
|
FlexTable templateLayout = new FlexTable();
|
||||||
templateGroup.add(templateLayout);
|
templateGroup.add(templateLayout);
|
||||||
|
|
||||||
templateNewButton = new TextButton("New",
|
templateNewButton = new TextButton(msgs.templateNewButton(),
|
||||||
TabularDataResources.INSTANCE.templateEdit32());
|
TabularDataResources.INSTANCE.templateAdd32());
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateNewButton.setToolTip("New");
|
templateNewButton.setToolTip(msgs.templateNewButtonToolTip());
|
||||||
templateNewButton.setScale(ButtonScale.LARGE);
|
templateNewButton.setScale(ButtonScale.LARGE);
|
||||||
templateNewButton.setIconAlign(IconAlign.TOP);
|
templateNewButton.setIconAlign(IconAlign.TOP);
|
||||||
templateNewButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
templateNewButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -86,14 +90,14 @@ public class TemplateToolBar {
|
||||||
templateLayout.setWidget(0, 0, templateNewButton);
|
templateLayout.setWidget(0, 0, templateNewButton);
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
templateOpenButton = new TextButton("Open",
|
templateEditButton = new TextButton(msgs.templateEditButton(),
|
||||||
TabularDataResources.INSTANCE.templateAdd32());
|
TabularDataResources.INSTANCE.templateEdit32());
|
||||||
templateOpenButton.enable();
|
templateEditButton.enable();
|
||||||
templateOpenButton.setToolTip("Open");
|
templateEditButton.setToolTip(msgs.templateEditButtonToolTip());
|
||||||
templateOpenButton.setScale(ButtonScale.LARGE);
|
templateEditButton.setScale(ButtonScale.LARGE);
|
||||||
templateOpenButton.setIconAlign(IconAlign.TOP);
|
templateEditButton.setIconAlign(IconAlign.TOP);
|
||||||
templateOpenButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
templateEditButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
templateOpenButton.addSelectHandler(new SelectHandler() {
|
templateEditButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(
|
eventBus.fireEvent(new RibbonEvent(
|
||||||
|
@ -101,14 +105,14 @@ public class TemplateToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
templateLayout.setWidget(0, 1, templateOpenButton);
|
templateLayout.setWidget(0, 1, templateEditButton);
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
templateDeleteButton = new TextButton("Delete",
|
templateDeleteButton = new TextButton(msgs.templateDeleteButton(),
|
||||||
TabularDataResources.INSTANCE.templateDelete32());
|
TabularDataResources.INSTANCE.templateDelete32());
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
templateDeleteButton.setToolTip("Delete");
|
templateDeleteButton.setToolTip(msgs.templateDeleteButtonToolTip());
|
||||||
templateDeleteButton.setScale(ButtonScale.LARGE);
|
templateDeleteButton.setScale(ButtonScale.LARGE);
|
||||||
templateDeleteButton.setIconAlign(IconAlign.TOP);
|
templateDeleteButton.setIconAlign(IconAlign.TOP);
|
||||||
templateDeleteButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
templateDeleteButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -124,12 +128,12 @@ public class TemplateToolBar {
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
templateApplyButton = new TextButton("Apply",
|
templateApplyButton = new TextButton(msgs.templateApplyButton(),
|
||||||
TabularDataResources.INSTANCE.templateApply32());
|
TabularDataResources.INSTANCE.templateApply32());
|
||||||
templateApplyButton.disable();
|
templateApplyButton.disable();
|
||||||
templateApplyButton.setScale(ButtonScale.LARGE);
|
templateApplyButton.setScale(ButtonScale.LARGE);
|
||||||
templateApplyButton.setIconAlign(IconAlign.TOP);
|
templateApplyButton.setIconAlign(IconAlign.TOP);
|
||||||
templateApplyButton.setToolTip("Apply Template");
|
templateApplyButton.setToolTip(msgs.templateApplyButtonToolTip());
|
||||||
templateApplyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
templateApplyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
templateApplyButton.addSelectHandler(new SelectHandler() {
|
templateApplyButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -142,12 +146,12 @@ public class TemplateToolBar {
|
||||||
templateLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
templateLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
|
||||||
templateShareButton = new TextButton("Share",
|
templateShareButton = new TextButton(msgs.templateShareButton(),
|
||||||
TabularDataResources.INSTANCE.templateShare32());
|
TabularDataResources.INSTANCE.templateShare32());
|
||||||
templateShareButton.enable();
|
templateShareButton.enable();
|
||||||
templateShareButton.setScale(ButtonScale.LARGE);
|
templateShareButton.setScale(ButtonScale.LARGE);
|
||||||
templateShareButton.setIconAlign(IconAlign.TOP);
|
templateShareButton.setIconAlign(IconAlign.TOP);
|
||||||
templateShareButton.setToolTip("Share Template");
|
templateShareButton.setToolTip(msgs.templateShareButton());
|
||||||
templateShareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
templateShareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
templateShareButton.addSelectHandler(new SelectHandler() {
|
templateShareButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -188,7 +192,7 @@ public class TemplateToolBar {
|
||||||
try {
|
try {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
templateOpenButton.enable();
|
templateEditButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
templateApplyButton.disable();
|
templateApplyButton.disable();
|
||||||
|
@ -196,7 +200,7 @@ public class TemplateToolBar {
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
templateOpenButton.enable();
|
templateEditButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
templateApplyButton.disable();
|
templateApplyButton.disable();
|
||||||
|
@ -205,14 +209,14 @@ public class TemplateToolBar {
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
templateOpenButton.enable();
|
templateEditButton.enable();
|
||||||
templateNewButton.enable();
|
templateNewButton.enable();
|
||||||
templateDeleteButton.enable();
|
templateDeleteButton.enable();
|
||||||
templateApplyButton.enable();
|
templateApplyButton.enable();
|
||||||
templateShareButton.enable();
|
templateShareButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
templateOpenButton.disable();
|
templateEditButton.disable();
|
||||||
templateNewButton.disable();
|
templateNewButton.disable();
|
||||||
templateDeleteButton.disable();
|
templateDeleteButton.disable();
|
||||||
templateApplyButton.disable();
|
templateApplyButton.disable();
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TemplateToolBarMessages extends Messages {
|
||||||
|
|
||||||
|
@DefaultMessage("Manage")
|
||||||
|
String templateGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("New")
|
||||||
|
String templateNewButton();
|
||||||
|
|
||||||
|
@DefaultMessage("New")
|
||||||
|
String templateNewButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Edit")
|
||||||
|
String templateEditButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Edit")
|
||||||
|
String templateEditButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String templateDeleteButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String templateDeleteButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply")
|
||||||
|
String templateApplyButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply")
|
||||||
|
String templateApplyButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Share")
|
||||||
|
String templateShareButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Share")
|
||||||
|
String templateShareButtonToolTip();
|
||||||
|
|
||||||
|
}
|
|
@ -16,16 +16,16 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TemplateOpenDialog extends Window {
|
public class TemplateEditDialog extends Window {
|
||||||
private static final String WIDTH = "720px";
|
private static final String WIDTH = "720px";
|
||||||
private static final String HEIGHT = "530px";
|
private static final String HEIGHT = "530px";
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
public TemplateOpenDialog(EventBus eventBus) {
|
public TemplateEditDialog(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
initWindow();
|
initWindow();
|
||||||
|
|
||||||
TemplateOpenPanel templateOpenPanel = new TemplateOpenPanel(this,
|
TemplateEditPanel templateOpenPanel = new TemplateEditPanel(this,
|
||||||
eventBus);
|
eventBus);
|
||||||
add(templateOpenPanel);
|
add(templateOpenPanel);
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,11 @@ public class TemplateOpenDialog extends Window {
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
setBodyBorder(false);
|
setBodyBorder(false);
|
||||||
setResizable(false);
|
setResizable(false);
|
||||||
setHeadingText("Open Template");
|
setHeadingText("Edit Template");
|
||||||
setClosable(true);
|
setClosable(true);
|
||||||
setModal(true);
|
setModal(true);
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
getHeader().setIcon(TabularDataResources.INSTANCE.templateAdd());
|
getHeader().setIcon(TabularDataResources.INSTANCE.templateEdit());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,13 +58,13 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TemplateOpenPanel extends FramedPanel {
|
public class TemplateEditPanel extends FramedPanel {
|
||||||
private static final String WIDTH = "630px";
|
private static final String WIDTH = "630px";
|
||||||
private static final String HEIGHT = "520px";
|
private static final String HEIGHT = "520px";
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
private TemplateOpenDialog parent;
|
private TemplateEditDialog parent;
|
||||||
|
|
||||||
private TextButton btnOpen;
|
private TextButton btnEdit;
|
||||||
private TextButton btnClose;
|
private TextButton btnClose;
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,9 +72,9 @@ public class TemplateOpenPanel extends FramedPanel {
|
||||||
private Grid<TemplateData> grid;
|
private Grid<TemplateData> grid;
|
||||||
private ExtendedListStore<TemplateData> store;
|
private ExtendedListStore<TemplateData> store;
|
||||||
|
|
||||||
public TemplateOpenPanel(TemplateOpenDialog parent, EventBus eventBus) {
|
public TemplateEditPanel(TemplateEditDialog parent, EventBus eventBus) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
Log.debug("TemplateOpenPanel");
|
Log.debug("TemplateEditPanel");
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
|
@ -144,7 +144,7 @@ public class TemplateOpenPanel extends FramedPanel {
|
||||||
String searchTerm = searchField.getCurrentValue();
|
String searchTerm = searchField.getCurrentValue();
|
||||||
if (searchTerm == null)
|
if (searchTerm == null)
|
||||||
return true;
|
return true;
|
||||||
return TemplateOpenPanel.this.select(item, searchTerm);
|
return TemplateEditPanel.this.select(item, searchTerm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -204,14 +204,14 @@ public class TemplateOpenPanel extends FramedPanel {
|
||||||
toolBar.addStyleName(ThemeStyles.get().style().borderTop());
|
toolBar.addStyleName(ThemeStyles.get().style().borderTop());
|
||||||
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
|
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
|
||||||
|
|
||||||
btnOpen = new TextButton("Open");
|
btnEdit = new TextButton("Edit");
|
||||||
btnOpen.setIcon(TabularDataResources.INSTANCE.templateAdd());
|
btnEdit.setIcon(TabularDataResources.INSTANCE.templateEdit());
|
||||||
btnOpen.setIconAlign(IconAlign.RIGHT);
|
btnEdit.setIconAlign(IconAlign.RIGHT);
|
||||||
btnOpen.setTitle("Open Template");
|
btnEdit.setTitle("Edit");
|
||||||
btnOpen.addSelectHandler(new SelectHandler() {
|
btnEdit.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
Log.debug("Pressed Open");
|
Log.debug("Pressed Edit");
|
||||||
open();
|
open();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ public class TemplateOpenPanel extends FramedPanel {
|
||||||
flowButton.setPack(BoxLayoutPack.CENTER);
|
flowButton.setPack(BoxLayoutPack.CENTER);
|
||||||
|
|
||||||
BoxLayoutData boxLayoutData = new BoxLayoutData(new Margins(2, 4, 2, 4));
|
BoxLayoutData boxLayoutData = new BoxLayoutData(new Margins(2, 4, 2, 4));
|
||||||
flowButton.add(btnOpen, boxLayoutData);
|
flowButton.add(btnEdit, boxLayoutData);
|
||||||
flowButton.add(btnClose, boxLayoutData);
|
flowButton.add(btnClose, boxLayoutData);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
fileGroupHeadingText = Tabular Resource
|
fileGroupHeadingText = Tabular Resource
|
||||||
openButton = Abierto
|
openButton = Abre
|
||||||
openButtonToolTip = Abierto Tabular Resource
|
openButtonToolTip = Abre Tabular Resource
|
||||||
closeButton = Cerca de todo
|
closeButton = Cerca de todo
|
||||||
closeButtonToolTip = Cerrar todas las Tabular Resources
|
closeButtonToolTip = Cerrar todas las Tabular Resources
|
||||||
cloneButton = Clon
|
cloneButton = Clon
|
||||||
|
|
|
@ -3,8 +3,8 @@ replaceButton = Reemplazar
|
||||||
replaceButtonToolTip = Reemplace las líneas
|
replaceButtonToolTip = Reemplace las líneas
|
||||||
deleteButton = Eliminar
|
deleteButton = Eliminar
|
||||||
deleteButtonToolTip = Eliminar filas
|
deleteButtonToolTip = Eliminar filas
|
||||||
addButton = Añadir
|
addRowButton = Añadir
|
||||||
addButtonToolTip = Añadir fila
|
addRowButtonToolTip = Añadir fila
|
||||||
filterButton = Filtrar
|
filterButton = Filtrar
|
||||||
filterButtonToolTip = Filtrar líneas
|
filterButtonToolTip = Filtrar líneas
|
||||||
tableGroupHeadingText = Mesa
|
tableGroupHeadingText = Mesa
|
||||||
|
|
|
@ -3,8 +3,8 @@ replaceButton = Rimpiazza
|
||||||
replaceButtonToolTip = Rimpiazza righe
|
replaceButtonToolTip = Rimpiazza righe
|
||||||
deleteButton = Elimina
|
deleteButton = Elimina
|
||||||
deleteButtonToolTip = Elimina righe
|
deleteButtonToolTip = Elimina righe
|
||||||
addButton = Aggiungi
|
addRowButton = Aggiungi
|
||||||
addButtonToolTip = Aggiungi riga
|
addRowButtonToolTip = Aggiungi riga
|
||||||
filterButton = Filtra
|
filterButton = Filtra
|
||||||
filterButtonToolTip = Filtra righe
|
filterButtonToolTip = Filtra righe
|
||||||
tableGroupHeadingText = Tabella
|
tableGroupHeadingText = Tabella
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
ruleGroupHeadingText = Manage
|
||||||
|
ruleNewButton = New
|
||||||
|
ruleNewButtonToolTip = New
|
||||||
|
ruleEditButton = Edit
|
||||||
|
ruleEditButtonToolTip = Edit
|
||||||
|
ruleDeleteButton = Delete
|
||||||
|
ruleDeleteButtonToolTip = Delete
|
||||||
|
ruleApplyButton = Apply
|
||||||
|
ruleApplyButtonToolTip = Apply
|
||||||
|
ruleShareButton = Share
|
||||||
|
ruleShareButtonToolTip = Share
|
|
@ -0,0 +1,11 @@
|
||||||
|
ruleGroupHeadingText = Gestionar
|
||||||
|
ruleNewButton = Nuevo
|
||||||
|
ruleNewButtonToolTip = Nuevo
|
||||||
|
ruleEditButton = Editar
|
||||||
|
ruleEditButtonToolTip = Editar
|
||||||
|
ruleDeleteButton = Borrar
|
||||||
|
ruleDeleteButtonToolTip = Borrar
|
||||||
|
ruleApplyButton = Aplicar
|
||||||
|
ruleApplyButtonToolTip = Aplicar
|
||||||
|
ruleShareButton = Cuota
|
||||||
|
ruleShareButtonToolTip = Cuota
|
|
@ -0,0 +1,11 @@
|
||||||
|
ruleGroupHeadingText = Gestisci
|
||||||
|
ruleNewButton = Nuovo
|
||||||
|
ruleNewButtonToolTip = Nuovo
|
||||||
|
ruleEditButton = Modifica
|
||||||
|
ruleEditButtonToolTip = Modifica
|
||||||
|
ruleDeleteButton = Elimina
|
||||||
|
ruleDeleteButtonToolTip = Elimina
|
||||||
|
ruleApplyButton = Applica
|
||||||
|
ruleApplyButtonToolTip = Applica
|
||||||
|
ruleShareButton = Condividi
|
||||||
|
ruleShareButtonToolTip = Condividi
|
|
@ -0,0 +1,11 @@
|
||||||
|
templateGroupHeadingText = Manage
|
||||||
|
templateNewButton = New
|
||||||
|
templateNewButtonToolTip = New
|
||||||
|
templateEditButton = Edit
|
||||||
|
templateEditButtonToolTip = Edit
|
||||||
|
templateDeleteButton = Delete
|
||||||
|
templateDeleteButtonToolTip = Delete
|
||||||
|
templateApplyButton = Apply
|
||||||
|
templateApplyButtonToolTip = Apply
|
||||||
|
templateShareButton = Share
|
||||||
|
templateShareButtonToolTip = Share
|
|
@ -0,0 +1,11 @@
|
||||||
|
templateGroupHeadingText = Gestionar
|
||||||
|
templateNewButton = Nuevo
|
||||||
|
templateNewButtonToolTip = Nuevo
|
||||||
|
templateEditButton = Editar
|
||||||
|
templateEditButtonToolTip = Editar
|
||||||
|
templateDeleteButton = Borrar
|
||||||
|
templateDeleteButtonToolTip = Borrar
|
||||||
|
templateApplyButton = Aplicar
|
||||||
|
templateApplyButtonToolTip = Aplicar
|
||||||
|
templateShareButton = Cuota
|
||||||
|
templateShareButtonToolTip = Cuota
|
|
@ -0,0 +1,11 @@
|
||||||
|
templateGroupHeadingText = Gestisci
|
||||||
|
templateNewButton = Nuovo
|
||||||
|
templateNewButtonToolTip = Nuovo
|
||||||
|
templateEditButton = Modifica
|
||||||
|
templateEditButtonToolTip = Modifica
|
||||||
|
templateDeleteButton = Elimina
|
||||||
|
templateDeleteButtonToolTip = Elimina
|
||||||
|
templateApplyButton = Applica
|
||||||
|
templateApplyButtonToolTip = Applica
|
||||||
|
templateShareButton = Condividi
|
||||||
|
templateShareButtonToolTip = Condividi
|
Loading…
Reference in New Issue