minor fixes

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@134215 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-11-16 09:25:35 +00:00
parent 1cfb02adb8
commit cb02953847
5 changed files with 16 additions and 9 deletions

View File

@ -37,7 +37,7 @@ public class CKanMetadataPublisher implements EntryPoint {
public void onModuleLoad() {
// remove comment to the below line for testing the widget
// startExample();
//startExample();
//testMetadata();
//testSelectionPanel();

View File

@ -11,6 +11,7 @@ import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.cell.client.ValueUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Float;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
@ -67,7 +68,7 @@ public class ResourceInfoForm extends Composite{
closeButton.getElement().getStyle().setFloat(Float.RIGHT);
closeButton.setIcon(IconType.REMOVE_CIRCLE);
commandPanel.setCellHorizontalAlignment(updateResourceButton, HasHorizontalAlignment.ALIGN_RIGHT);
commandPanel.getElement().getStyle().setMarginTop(10, Unit.PX);
updateResourceButton.addClickHandler(new ClickHandler() {
@Override

View File

@ -13,6 +13,8 @@
padding: 5px;
border: 1px solid #bbb;
border-radius: 5px;
height: 400px;
width: 95%;
}
.labels-style {
@ -22,6 +24,10 @@
.controls-style {
margin-left: 10px !important;
}
.control-group {
margin-bottom: 0px !important;
}
</ui:style>
<g:HTMLPanel styleName="{style.panel-style}">
<b:Form type="VERTICAL" width="100%">
@ -30,7 +36,7 @@
<b>Resource Information</b>
<b:Button ui:field="closeButton" type="LINK" title="Close details"></b:Button>
</b:Legend>
<b:ControlGroup ui:field="controlName">
<b:ControlGroup ui:field="controlName" styleName="{style.control-group}">
<b:ControlLabel for="name" styleName="{style.labels-style}"
title="The name the resource will have on the catalogue">
<b>Name:</b>
@ -41,7 +47,7 @@
ui:field="resourceName" />
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlGroup styleName="{style.control-group}">
<b:ControlLabel for="path" title="Resource path"
styleName="{style.labels-style}">
<b>Path:</b>
@ -51,7 +57,7 @@
readOnly="true" title="Resource path" ui:field="resourcePath" />
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlGroup styleName="{style.control-group}">
<b:ControlLabel for="description" styleName="{style.labels-style}"
title="The description the resource will have on the catalogue">
<b>Description:</b>
@ -62,7 +68,7 @@
ui:field="resourceDescription"></b:TextArea>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup>
<b:ControlGroup styleName="{style.control-group}">
<b:ControlLabel for="format" styleName="{style.labels-style}"
title="The MIME type">
<b>Format:</b>

View File

@ -623,14 +623,14 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
String scope = (String)httpSession.getAttribute(SessionCatalogueAttributes.SCOPE_CLIENT_PORTLET_URL);
DataCatalogue catalogue = getCatalogue(scope);
List<CkanGroup> ckanGroups = catalogue.getGroups();
// TODO check role
for (CkanGroup ckanGroup : ckanGroups) {
toReturn.add(new GroupBean(ckanGroup.getTitle(), ckanGroup.getName()));
}
logger.debug("List of groups to return is " + toReturn);
}else{
logger.warn("Dev mode detected");
toReturn = Arrays.asList(new GroupBean("Group title", "aaa"));

View File

@ -11,7 +11,7 @@ public class TestClass {
@Test
public void testUser() {
// assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
}
}