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:
parent
1cfb02adb8
commit
cb02953847
|
@ -37,7 +37,7 @@ public class CKanMetadataPublisher implements EntryPoint {
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
|
|
||||||
// remove comment to the below line for testing the widget
|
// remove comment to the below line for testing the widget
|
||||||
// startExample();
|
//startExample();
|
||||||
//testMetadata();
|
//testMetadata();
|
||||||
//testSelectionPanel();
|
//testSelectionPanel();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||||
import com.google.gwt.cell.client.ValueUpdater;
|
import com.google.gwt.cell.client.ValueUpdater;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Style.Float;
|
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.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
import com.google.gwt.uibinder.client.UiBinder;
|
import com.google.gwt.uibinder.client.UiBinder;
|
||||||
|
@ -67,7 +68,7 @@ public class ResourceInfoForm extends Composite{
|
||||||
closeButton.getElement().getStyle().setFloat(Float.RIGHT);
|
closeButton.getElement().getStyle().setFloat(Float.RIGHT);
|
||||||
closeButton.setIcon(IconType.REMOVE_CIRCLE);
|
closeButton.setIcon(IconType.REMOVE_CIRCLE);
|
||||||
commandPanel.setCellHorizontalAlignment(updateResourceButton, HasHorizontalAlignment.ALIGN_RIGHT);
|
commandPanel.setCellHorizontalAlignment(updateResourceButton, HasHorizontalAlignment.ALIGN_RIGHT);
|
||||||
|
commandPanel.getElement().getStyle().setMarginTop(10, Unit.PX);
|
||||||
updateResourceButton.addClickHandler(new ClickHandler() {
|
updateResourceButton.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid #bbb;
|
border: 1px solid #bbb;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
height: 400px;
|
||||||
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.labels-style {
|
.labels-style {
|
||||||
|
@ -22,6 +24,10 @@
|
||||||
.controls-style {
|
.controls-style {
|
||||||
margin-left: 10px !important;
|
margin-left: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.control-group {
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel styleName="{style.panel-style}">
|
<g:HTMLPanel styleName="{style.panel-style}">
|
||||||
<b:Form type="VERTICAL" width="100%">
|
<b:Form type="VERTICAL" width="100%">
|
||||||
|
@ -30,7 +36,7 @@
|
||||||
<b>Resource Information</b>
|
<b>Resource Information</b>
|
||||||
<b:Button ui:field="closeButton" type="LINK" title="Close details"></b:Button>
|
<b:Button ui:field="closeButton" type="LINK" title="Close details"></b:Button>
|
||||||
</b:Legend>
|
</b:Legend>
|
||||||
<b:ControlGroup ui:field="controlName">
|
<b:ControlGroup ui:field="controlName" styleName="{style.control-group}">
|
||||||
<b:ControlLabel for="name" styleName="{style.labels-style}"
|
<b:ControlLabel for="name" styleName="{style.labels-style}"
|
||||||
title="The name the resource will have on the catalogue">
|
title="The name the resource will have on the catalogue">
|
||||||
<b>Name:</b>
|
<b>Name:</b>
|
||||||
|
@ -41,7 +47,7 @@
|
||||||
ui:field="resourceName" />
|
ui:field="resourceName" />
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup styleName="{style.control-group}">
|
||||||
<b:ControlLabel for="path" title="Resource path"
|
<b:ControlLabel for="path" title="Resource path"
|
||||||
styleName="{style.labels-style}">
|
styleName="{style.labels-style}">
|
||||||
<b>Path:</b>
|
<b>Path:</b>
|
||||||
|
@ -51,7 +57,7 @@
|
||||||
readOnly="true" title="Resource path" ui:field="resourcePath" />
|
readOnly="true" title="Resource path" ui:field="resourcePath" />
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup styleName="{style.control-group}">
|
||||||
<b:ControlLabel for="description" styleName="{style.labels-style}"
|
<b:ControlLabel for="description" styleName="{style.labels-style}"
|
||||||
title="The description the resource will have on the catalogue">
|
title="The description the resource will have on the catalogue">
|
||||||
<b>Description:</b>
|
<b>Description:</b>
|
||||||
|
@ -62,7 +68,7 @@
|
||||||
ui:field="resourceDescription"></b:TextArea>
|
ui:field="resourceDescription"></b:TextArea>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup styleName="{style.control-group}">
|
||||||
<b:ControlLabel for="format" styleName="{style.labels-style}"
|
<b:ControlLabel for="format" styleName="{style.labels-style}"
|
||||||
title="The MIME type">
|
title="The MIME type">
|
||||||
<b>Format:</b>
|
<b>Format:</b>
|
||||||
|
|
|
@ -623,14 +623,14 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
String scope = (String)httpSession.getAttribute(SessionCatalogueAttributes.SCOPE_CLIENT_PORTLET_URL);
|
String scope = (String)httpSession.getAttribute(SessionCatalogueAttributes.SCOPE_CLIENT_PORTLET_URL);
|
||||||
DataCatalogue catalogue = getCatalogue(scope);
|
DataCatalogue catalogue = getCatalogue(scope);
|
||||||
List<CkanGroup> ckanGroups = catalogue.getGroups();
|
List<CkanGroup> ckanGroups = catalogue.getGroups();
|
||||||
|
|
||||||
// TODO check role
|
// TODO check role
|
||||||
|
|
||||||
for (CkanGroup ckanGroup : ckanGroups) {
|
for (CkanGroup ckanGroup : ckanGroups) {
|
||||||
toReturn.add(new GroupBean(ckanGroup.getTitle(), ckanGroup.getName()));
|
toReturn.add(new GroupBean(ckanGroup.getTitle(), ckanGroup.getName()));
|
||||||
}
|
}
|
||||||
logger.debug("List of groups to return is " + toReturn);
|
logger.debug("List of groups to return is " + toReturn);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
logger.warn("Dev mode detected");
|
logger.warn("Dev mode detected");
|
||||||
toReturn = Arrays.asList(new GroupBean("Group title", "aaa"));
|
toReturn = Arrays.asList(new GroupBean("Group title", "aaa"));
|
||||||
|
|
|
@ -11,7 +11,7 @@ public class TestClass {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUser() {
|
public void testUser() {
|
||||||
// assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
|
assert(new CKANPublisherServicesImpl().getDevelopmentUser().equals(CKANPublisherServicesImpl.TEST_USER));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue