minor fixes to css
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129905 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d5bf7d71c0
commit
56f02d54a8
|
@ -542,7 +542,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
receivedBean.setCustomFields(customFieldsMap);
|
receivedBean.setCustomFields(customFieldsMap);
|
||||||
|
|
||||||
// alert
|
// alert
|
||||||
alertOnCreate("Trying to create dataset, please wait", AlertType.INFO);
|
alertOnCreate("Trying to create product, please wait", AlertType.INFO);
|
||||||
|
|
||||||
// invoke the create method
|
// invoke the create method
|
||||||
createButton.setEnabled(false);
|
createButton.setEnabled(false);
|
||||||
|
@ -555,7 +555,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
if(createdDatasetBean != null){
|
if(createdDatasetBean != null){
|
||||||
|
|
||||||
alertOnCreate("Dataset correctly created!", AlertType.SUCCESS);
|
alertOnCreate("Product correctly created!", AlertType.SUCCESS);
|
||||||
|
|
||||||
// disable dataset fields
|
// disable dataset fields
|
||||||
disableDatasetFields();
|
disableDatasetFields();
|
||||||
|
@ -643,7 +643,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
alertOnCreate("Unable to create this dataset, maybe it already exists?", AlertType.ERROR);
|
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -651,7 +651,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
|
||||||
alertOnCreate("Unable to create this dataset, maybe it already exists?", AlertType.ERROR);
|
alertOnCreate("Unable to create this product, maybe it already exists?", AlertType.ERROR);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,6 +5,8 @@ import java.util.List;
|
||||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.MetadataFieldWrapper;
|
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.MetadataFieldWrapper;
|
||||||
|
|
||||||
import com.github.gwtbootstrap.client.ui.CheckBox;
|
import com.github.gwtbootstrap.client.ui.CheckBox;
|
||||||
|
import com.github.gwtbootstrap.client.ui.ControlLabel;
|
||||||
|
import com.github.gwtbootstrap.client.ui.Controls;
|
||||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||||
import com.github.gwtbootstrap.client.ui.TextBox;
|
import com.github.gwtbootstrap.client.ui.TextBox;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -33,6 +35,8 @@ public class MetaDataFieldSkeleton extends Composite{
|
||||||
@UiField SimplePanel elementPanel;
|
@UiField SimplePanel elementPanel;
|
||||||
@UiField FlowPanel noteFieldContainer;
|
@UiField FlowPanel noteFieldContainer;
|
||||||
@UiField InlineLabel noteField;
|
@UiField InlineLabel noteField;
|
||||||
|
@UiField ControlLabel controlLabel;
|
||||||
|
@UiField Controls controls;
|
||||||
|
|
||||||
// the element that holds the value (it could be a checkbox, textbox or listbox)
|
// the element that holds the value (it could be a checkbox, textbox or listbox)
|
||||||
private Widget holder;
|
private Widget holder;
|
||||||
|
@ -46,6 +50,10 @@ public class MetaDataFieldSkeleton extends Composite{
|
||||||
// prepare information
|
// prepare information
|
||||||
this.field = field;
|
this.field = field;
|
||||||
|
|
||||||
|
// add custom css properties
|
||||||
|
controls.addStyleName("form-controls-custom");
|
||||||
|
controlLabel.addStyleName("form-control-label-custom");
|
||||||
|
|
||||||
// save the name
|
// save the name
|
||||||
name.setInnerText(field.getFieldName() + ":");
|
name.setInnerText(field.getFieldName() + ":");
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
display: inline;
|
display: inline;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-panel {
|
.element-panel {
|
||||||
|
@ -22,13 +23,14 @@
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel>
|
<g:HTMLPanel>
|
||||||
<b:ControlGroup>
|
<b:ControlGroup>
|
||||||
<b:ControlLabel>
|
<b:ControlLabel ui:field="controlLabel">
|
||||||
<font color="red" ui:field="mandatorySymbol">*</font>
|
<font color="red" ui:field="mandatorySymbol">*</font>
|
||||||
<span ui:field="name"></span>
|
<span ui:field="name"></span>
|
||||||
</b:ControlLabel>
|
</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls ui:field="controls">
|
||||||
<g:FlowPanel width="90%">
|
<g:FlowPanel width="90%">
|
||||||
<g:SimplePanel ui:field="elementPanel" styleName="{style.element-panel}" width="80%">
|
<g:SimplePanel ui:field="elementPanel" styleName="{style.element-panel}"
|
||||||
|
width="80%">
|
||||||
<!-- Listbox or Checkbox or Textbox according to isBoolean field -->
|
<!-- Listbox or Checkbox or Textbox according to isBoolean field -->
|
||||||
</g:SimplePanel>
|
</g:SimplePanel>
|
||||||
<g:FlowPanel ui:field="noteFieldContainer" styleName="{style.note-container}">
|
<g:FlowPanel ui:field="noteFieldContainer" styleName="{style.note-container}">
|
||||||
|
|
|
@ -22,3 +22,12 @@
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
cursor: pointer !important;
|
cursor: pointer !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** override some bootstrap css **/
|
||||||
|
.form-controls-custom {
|
||||||
|
margin-left: 12% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control-label-custom {
|
||||||
|
width: 10% !important;
|
||||||
|
}
|
|
@ -60,7 +60,6 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
|
|
||||||
// ckan keys for ASL
|
// ckan keys for ASL
|
||||||
private static final String CKAN_TOKEN_KEY = "ckanToken";
|
private static final String CKAN_TOKEN_KEY = "ckanToken";
|
||||||
private static final String CKAN_OBJ_KEY = "ckanObj";
|
|
||||||
private static final String CKAN_LICENSES_KEY = "ckanLicenses"; // licenses
|
private static final String CKAN_LICENSES_KEY = "ckanLicenses"; // licenses
|
||||||
private static final String CKAN_ORGANIZATIONS_PUBLISH_KEY = "ckanOrganizationsPublish"; // here he can publish
|
private static final String CKAN_ORGANIZATIONS_PUBLISH_KEY = "ckanOrganizationsPublish"; // here he can publish
|
||||||
private static final String CKAN_PROFILES_KEY = "ckanProfiles"; // product profiles
|
private static final String CKAN_PROFILES_KEY = "ckanProfiles"; // product profiles
|
||||||
|
@ -71,11 +70,10 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
*/
|
*/
|
||||||
private CKanUtils getCkanUtilsObj(){
|
private CKanUtils getCkanUtilsObj(){
|
||||||
|
|
||||||
String currentScope = getASLSession().getScope();
|
|
||||||
CKanUtils instance = null;
|
CKanUtils instance = null;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
logger.debug("The ckan util object was null");
|
String currentScope = getASLSession().getScope();
|
||||||
instance = new CKanUtilsImpl(currentScope);
|
instance = new CKanUtilsImpl(currentScope);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("Unable to retrieve ckan utils", e);
|
logger.error("Unable to retrieve ckan utils", e);
|
||||||
|
@ -105,7 +103,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
*/
|
*/
|
||||||
public String getDevelopmentUser() {
|
public String getDevelopmentUser() {
|
||||||
String user = TEST_USER;
|
String user = TEST_USER;
|
||||||
// user = "costantino.perciante";
|
//user = "costantino.perciante";
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
package org.gcube.portlets.widgets.ckandatapublisherwidget.client;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Costantino Perciante at ISTI-CNR
|
|
||||||
* (costantino.perciante@isti.cnr.it)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Tests {
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue