Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@96435 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-06-03 15:15:45 +00:00
parent 6ff7906c68
commit a8de781f3a
6 changed files with 43 additions and 41 deletions

View File

@ -4,9 +4,6 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="tabular-data-expression-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-expression-widget/tabular-data-expression-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-widgetx-tdx-source-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widgetx-tdx-source/tabular-data-widgetx-tdx-source">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -19,45 +16,21 @@
<dependent-module archiveName="tabular-data-widget-common-event-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-gwt-service-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-gwt-service/tabular-data-gwt-service">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-wizard-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-wizard-widget/tabular-data-wizard-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-csv-import-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-csv-import-widget/tabular-data-csv-import-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-sdmx-import-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-sdmx-import-widget/tabular-data-sdmx-import-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-open-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-open-widget/tabular-data-open-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-csv-export-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-csv-export-widget/tabular-data-csv-export-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-sdmx-export-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-sdmx-export-widget/tabular-data-sdmx-export-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-table-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-table-widget/tabular-data-table-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-information-widget-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-information-widget/tabular-data-information-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-metadata-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-metadata-widget/tabular-data-metadata-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-column-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-column-widget/tabular-data-column-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-toolbox-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-extractcodelist-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-extractcodelist-widget/tabular-data-extractcodelist-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="tabular-data-portlet"/>
<property name="java-output-path" value="/tabular-data-portlet/target/tabular-data-portlet-2.0.0-SNAPSHOT/WEB-INF/classes"/>
</wb-module>

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.event.RibbonEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.UIStateEvent;
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.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.dom.client.Element;
@ -47,7 +48,9 @@ public class CurationToolBar {
protected TextButton tableTypeButton;
protected TextButton addColumnButton;
protected TextButton deleteColumnButton;
protected TextButton extractCodelistButton;
protected TextButton codelistMappingButton;
protected TextButton generateSummaryButton;
public CurationToolBar(EventBus eventBus) {
@ -120,7 +123,8 @@ public class CurationToolBar {
duplicateDetectionButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
eventBus.fireEvent(new RibbonEvent(RibbonType.DUPLICATEDETECTION));
eventBus.fireEvent(new RibbonEvent(
RibbonType.DUPLICATEDETECTION));
}
});
@ -224,7 +228,7 @@ public class CurationToolBar {
structureLayout.setWidget(0, 3, addColumnButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
deleteColumnButton = new TextButton("Delete Column",
TabularDataResources.INSTANCE.columnDelete32());
deleteColumnButton.disable();
@ -303,7 +307,23 @@ public class CurationToolBar {
helperLayout.setWidget(0, 0, extractCodelistButton);
helperLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
codelistMappingButton = new TextButton("Map Import",
TabularDataResources.INSTANCE.codelistMapping32());
codelistMappingButton.setScale(ButtonScale.LARGE);
codelistMappingButton.setIconAlign(IconAlign.TOP);
codelistMappingButton.setToolTip("Codelist Map Import");
codelistMappingButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
codelistMappingButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
eventBus.fireEvent(new RibbonEvent(RibbonType.EXTRACTCODELIST));
}
});
helperLayout.setWidget(0, 1, codelistMappingButton);
helperLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
generateSummaryButton = new TextButton("Generate Summary",
TabularDataResources.INSTANCE.summary32());
generateSummaryButton.setScale(ButtonScale.LARGE);
@ -317,11 +337,10 @@ public class CurationToolBar {
}
});
helperLayout.setWidget(0, 1, generateSummaryButton);
helperLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
helperLayout.setWidget(0, 2, generateSummaryButton);
helperLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
cleanCells(helperLayout.getElement());
eventBus.addHandler(UIStateEvent.TYPE,
new UIStateEvent.UIStateHandler() {
@ -330,7 +349,7 @@ public class CurationToolBar {
}
});
}
protected void cleanCells(Element elem) {
@ -343,8 +362,7 @@ public class CurationToolBar {
}
}
}
public void setUI(UIStateEvent event) {
UIStateType uiStateType = event.getUIStateType();
try {
@ -362,10 +380,11 @@ public class CurationToolBar {
addColumnButton.disable();
deleteColumnButton.disable();
extractCodelistButton.disable();
codelistMappingButton.disable();
generateSummaryButton.disable();
break;
case TR_CLOSE:
case TR_READONLY:
case TR_READONLY:
duplicateDetectionButton.disable();
rulesButton.disable();
normalizeButton.disable();
@ -378,10 +397,11 @@ public class CurationToolBar {
addColumnButton.disable();
deleteColumnButton.disable();
extractCodelistButton.disable();
codelistMappingButton.disable();
generateSummaryButton.disable();
break;
case TR_OPEN:
case TABLEUPDATE:
case TABLEUPDATE:
case TABLECURATION:
duplicateDetectionButton.enable();
rulesButton.disable();
@ -395,6 +415,13 @@ public class CurationToolBar {
addColumnButton.enable();
deleteColumnButton.enable();
extractCodelistButton.enable();
TRId trId = event.getTrId();
if (trId != null && trId.getTableType() != null
&& trId.getTableType().compareTo("Codelist") == 0) {
codelistMappingButton.enable();
} else {
codelistMappingButton.disable();
}
generateSummaryButton.disable();
break;
case WIZARD_OPEN:
@ -410,14 +437,16 @@ public class CurationToolBar {
addColumnButton.disable();
deleteColumnButton.disable();
extractCodelistButton.disable();
codelistMappingButton.disable();
generateSummaryButton.disable();
break;
default:
break;
}
} catch (Exception e) {
Log.error("setUI Error on Ribbon Curation: " + e.getLocalizedMessage());
Log.error("setUI Error on Ribbon Curation: "
+ e.getLocalizedMessage());
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB