edit_facility_26115 #3
|
@ -1,11 +0,0 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
/**
|
||||
* Added resource handler interface
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public interface AddResourceEventHandler extends EventHandler {
|
||||
void onAddedResource(AddResourceEvent addResourceEvent);
|
||||
}
|
|
@ -8,12 +8,12 @@ import com.google.gwt.event.shared.GwtEvent;
|
|||
* Added resource event
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class AddResourceEvent extends GwtEvent<AddResourceEventHandler> {
|
||||
public static Type<AddResourceEventHandler> TYPE = new Type<AddResourceEventHandler>();
|
||||
public class AddResourceEventProfile extends GwtEvent<AddResourceEventProfileHandler> {
|
||||
public static Type<AddResourceEventProfileHandler> TYPE = new Type<AddResourceEventProfileHandler>();
|
||||
|
||||
private ResourceElementBeanProfile resource;
|
||||
|
||||
public AddResourceEvent(ResourceElementBeanProfile resource) {
|
||||
public AddResourceEventProfile(ResourceElementBeanProfile resource) {
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
|
@ -22,12 +22,12 @@ public class AddResourceEvent extends GwtEvent<AddResourceEventHandler> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Type<AddResourceEventHandler> getAssociatedType() {
|
||||
public Type<AddResourceEventProfileHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(AddResourceEventHandler handler) {
|
||||
protected void dispatch(AddResourceEventProfileHandler handler) {
|
||||
handler.onAddedResource(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
|
||||
/**
|
||||
* The Interface AddResourceEventProfileHandler.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Feb 12, 2024
|
||||
*/
|
||||
public interface AddResourceEventProfileHandler extends EventHandler {
|
||||
|
||||
/**
|
||||
* On added resource.
|
||||
*
|
||||
* @param addResourceEvent the add resource event
|
||||
*/
|
||||
void onAddedResource(AddResourceEventProfile addResourceEvent);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
||||
/**
|
||||
* Called on close form.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class CloseCreationFormEvent extends GwtEvent<CloseCreationFormEventHandler>{
|
||||
|
||||
public static Type<CloseCreationFormEventHandler> TYPE = new Type<CloseCreationFormEventHandler>();
|
||||
|
||||
public CloseCreationFormEvent() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<CloseCreationFormEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(CloseCreationFormEventHandler handler) {
|
||||
handler.onClose(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
/**
|
||||
* Close event handler interface
|
||||
* @author Costantino Perciante at ISTI-CNR
|
||||
* (costantino.perciante@isti.cnr.it)
|
||||
*
|
||||
*/
|
||||
public interface CloseCreationFormEventHandler extends EventHandler {
|
||||
void onClose(CloseCreationFormEvent event);
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
||||
|
||||
/**
|
||||
* The Class CloseCreationFormProfileEvent.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Feb 12, 2024
|
||||
*/
|
||||
public class CloseCreationFormProfileEvent extends GwtEvent<CloseCreationFormProfileEventHandler>{
|
||||
|
||||
public static Type<CloseCreationFormProfileEventHandler> TYPE = new Type<CloseCreationFormProfileEventHandler>();
|
||||
|
||||
/**
|
||||
* Instantiates a new close creation form profile event.
|
||||
*/
|
||||
public CloseCreationFormProfileEvent() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the associated type.
|
||||
*
|
||||
* @return the associated type
|
||||
*/
|
||||
@Override
|
||||
public Type<CloseCreationFormProfileEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch.
|
||||
*
|
||||
* @param handler the handler
|
||||
*/
|
||||
@Override
|
||||
protected void dispatch(CloseCreationFormProfileEventHandler handler) {
|
||||
handler.onClose(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
/**
|
||||
* The Interface CloseCreationFormProfileEventHandler.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Feb 12, 2024
|
||||
*/
|
||||
public interface CloseCreationFormProfileEventHandler extends EventHandler {
|
||||
|
||||
/**
|
||||
* On close.
|
||||
*
|
||||
* @param event the event
|
||||
*/
|
||||
void onClose(CloseCreationFormProfileEvent event);
|
||||
}
|
|
@ -7,12 +7,12 @@ import com.google.gwt.event.shared.GwtEvent;
|
|||
* Delete custom field event.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class DeleteCustomFieldEvent extends GwtEvent<DeleteCustomFieldEventHandler> {
|
||||
public static Type<DeleteCustomFieldEventHandler> TYPE = new Type<DeleteCustomFieldEventHandler>();
|
||||
public class DeleteCustomFieldProfileEvent extends GwtEvent<DeleteCustomFieldProfileEventHandler> {
|
||||
public static Type<DeleteCustomFieldProfileEventHandler> TYPE = new Type<DeleteCustomFieldProfileEventHandler>();
|
||||
|
||||
private CustomFieldEntryProfile removedEntry;
|
||||
|
||||
public DeleteCustomFieldEvent(CustomFieldEntryProfile removedEntry) {
|
||||
public DeleteCustomFieldProfileEvent(CustomFieldEntryProfile removedEntry) {
|
||||
this.removedEntry = removedEntry;
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,12 @@ public class DeleteCustomFieldEvent extends GwtEvent<DeleteCustomFieldEventHand
|
|||
}
|
||||
|
||||
@Override
|
||||
public Type<DeleteCustomFieldEventHandler> getAssociatedType() {
|
||||
public Type<DeleteCustomFieldProfileEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DeleteCustomFieldEventHandler handler) {
|
||||
protected void dispatch(DeleteCustomFieldProfileEventHandler handler) {
|
||||
handler.onRemoveEntry(this);
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@ package org.gcube.portlets.widgets.mpformbuilder.client.events;
|
|||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
/**
|
||||
* Handler associated to the DeleteCustomFieldEvent
|
||||
* Handler associated to the DeleteCustomFieldProfileEvent
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public interface DeleteCustomFieldEventHandler extends EventHandler {
|
||||
void onRemoveEntry(DeleteCustomFieldEvent event);
|
||||
public interface DeleteCustomFieldProfileEventHandler extends EventHandler {
|
||||
void onRemoveEntry(DeleteCustomFieldProfileEvent event);
|
||||
}
|
|
@ -8,12 +8,12 @@ import com.google.gwt.event.shared.GwtEvent;
|
|||
* Deleted resource event.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class DeleteResourceEvent extends GwtEvent<DeleteResourceEventHandler> {
|
||||
public static Type<DeleteResourceEventHandler> TYPE = new Type<DeleteResourceEventHandler>();
|
||||
public class DeleteResourceProfileEvent extends GwtEvent<DeleteResourceProfileEventHandler> {
|
||||
public static Type<DeleteResourceProfileEventHandler> TYPE = new Type<DeleteResourceProfileEventHandler>();
|
||||
|
||||
private ResourceElementBeanProfile resource;
|
||||
|
||||
public DeleteResourceEvent(ResourceElementBeanProfile resource) {
|
||||
public DeleteResourceProfileEvent(ResourceElementBeanProfile resource) {
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
|
@ -22,12 +22,12 @@ public class DeleteResourceEvent extends GwtEvent<DeleteResourceEventHandler> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Type<DeleteResourceEventHandler> getAssociatedType() {
|
||||
public Type<DeleteResourceProfileEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(DeleteResourceEventHandler handler) {
|
||||
protected void dispatch(DeleteResourceProfileEventHandler handler) {
|
||||
handler.onDeletedResource(this);
|
||||
}
|
||||
|
|
@ -6,6 +6,6 @@ import com.google.gwt.event.shared.EventHandler;
|
|||
* The delete event handler
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public interface DeleteResourceEventHandler extends EventHandler{
|
||||
void onDeletedResource(DeleteResourceEvent deleteResourceEvent);
|
||||
public interface DeleteResourceProfileEventHandler extends EventHandler{
|
||||
void onDeletedResource(DeleteResourceProfileEvent deleteResourceEvent);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,410 +0,0 @@
|
|||
<!-- <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"
|
||||
xmlns:m="urn:import:org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui.tags">
|
||||
<ui:style>
|
||||
.form-main-style {
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
|
||||
.fieldset-border-style {
|
||||
border: 1px groove #444 !important;
|
||||
-webkit-box-shadow: 0px 0px 0px 0px #000;
|
||||
box-shadow: 0px 0px 0px 0px #000 !important;
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.legend-style {
|
||||
width: auto !important;
|
||||
padding: 10px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
@external .form-horizontal .input-large;
|
||||
.form-horizontal .input-large .input-prepend {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.block-alert-style {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tagsPanelStyle {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.selected-profile {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.label-go-to-product {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.the-margin-left{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="createDatasetMainPanel">
|
||||
<b:Form type="HORIZONTAL" styleName="{style.form-main-style}"
|
||||
ui:field="formFirstStep" visible="true">
|
||||
<b:Fieldset styleName="{style.fieldset-border-style}">
|
||||
|
||||
<b:Legend styleName="{style.legend-style}">
|
||||
Insert Item Information
|
||||
<small>
|
||||
<span style="color:red;">*</span>
|
||||
is required
|
||||
</small>
|
||||
</b:Legend>
|
||||
|
||||
Alert blocks for info/errors
|
||||
<b:AlertBlock type="INFO" close="false" animation="true"
|
||||
visible="false" ui:field="infoBlock" styleName="{style.block-alert-style}"></b:AlertBlock>
|
||||
|
||||
<b:ControlGroup ui:field="productTitleGroup">
|
||||
<b:ControlLabel for="title" title="Item title">
|
||||
<font color="red">*</font>
|
||||
Title :
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" placeholder="Item title"
|
||||
width="90%" b:id="title" title="Item title" ui:field="titleTextBox" />
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverTitle" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelTitle">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconTitle" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="description" title="Item description">
|
||||
Description:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextArea placeholder="eg. Some useful notes about the item"
|
||||
width="90%" alternateSize="LARGE" b:id="description" title="Item description"
|
||||
ui:field="descriptionTextarea"></b:TextArea>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverDescription" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelDescription">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconDescription" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
TAGS Panel
|
||||
<m:TagsPanel ui:field="tagsPanel"></m:TagsPanel>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="licenses" title="License">License:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox b:id="licenses" title="Item license"
|
||||
width="91%" ui:field="licenseListbox">
|
||||
</b:ListBox>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverLicenses" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelLicenses">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconLicenses" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="licenseUrl" title="Selected License'url">Selected
|
||||
License Url:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:Paragraph ui:field="unavailableUrl" visible="true">
|
||||
<b>Unavailable</b>
|
||||
</b:Paragraph>
|
||||
<g:Anchor ui:field="licenseUrlAnchor" target="_blank"
|
||||
visible="false"></g:Anchor>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="visibility" title="Visibility of the item">Visibility:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox b:id="visibility" title="Item visibility"
|
||||
width="91%" ui:field="visibilityListbox">
|
||||
<g:item title="restricted">Restricted</g:item>
|
||||
<g:item enabled="true" title="public">Public</g:item>
|
||||
</b:ListBox>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverVisibility" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelVisibility">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconVisibility" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="organizationsGroup">
|
||||
<b:ControlLabel for="organization"
|
||||
title="Select the organizations in which you want
|
||||
to publish the item">Publish in:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox b:id="organization" alternateSize="LARGE"
|
||||
width="91%" title="Publish in this organization" ui:field="organizationsListbox">
|
||||
</b:ListBox>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="versionControlGroup">
|
||||
<b:ControlLabel for="version"
|
||||
title="Item version expressed as positive integer number">
|
||||
Version:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" placeholder="1.0" b:id="version"
|
||||
width="90%" title="Item version" ui:field="versionTextbox" />
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="author" title="Item author">
|
||||
<font color="red">*</font>
|
||||
Author:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" width="90%"
|
||||
placeholder="Joe Bloggs" enabled="false" b:id="author" title="Item author"
|
||||
ui:field="authorTextbox" />
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverAuthor" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelAuthor">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconAuthor" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="authorEmailControlGroup">
|
||||
<b:ControlLabel for="email" title="Item author's email">
|
||||
<font color="red">*</font>
|
||||
Author Email:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" width="90%"
|
||||
placeholder="joe.bloggs@example.com" enabled="false" b:id="email"
|
||||
title="Item author" ui:field="authorEmailTextbox" />
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverAuthorEmail" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelAuthorEmail">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconAuthorEmail" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel for="maintainer" title="Item maintainer">
|
||||
Maintainer:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" placeholder="Joe Bloggs"
|
||||
width="90%" b:id="maintainer" title="Item maintainer"
|
||||
ui:field="maintainerTextbox" />
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverMaintainer" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelMaintainer">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconMaintainer" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="maintainerControlGroup">
|
||||
<b:ControlLabel for="emailMaintaner" title="Item author's email">
|
||||
Maintainer Email:
|
||||
</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:TextBox alternateSize="LARGE" placeholder="maintainer@example.com"
|
||||
width="90%" b:id="emailMaintaner" title="Item author"
|
||||
ui:field="maintainerEmailTextbox" />
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverMaintainerEmail" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelMaintainerEmail">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconMaintainerEmail" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="metadataTypesControlGroup">
|
||||
<b:ControlLabel for="metadataTypes" title="Item profile types">Types:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox b:id="metadataTypes" alternateSize="LARGE"
|
||||
width="91%" title="The item type to be used"
|
||||
ui:field="metadataTypeListbox">
|
||||
<g:item enabled="true" title="None">none</g:item>
|
||||
</b:ListBox>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverTypes" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelTypes">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconTypes" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup ui:field="groupsControlGroup"
|
||||
visible="false">
|
||||
<b:ControlLabel for="groups" title="The groups for this item">Item Groups:</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox b:id="groups" alternateSize="LARGE" width="91%"
|
||||
multipleSelect="true"
|
||||
title="The groups for this item (Hold CTRL or Command button for multiple selection)"
|
||||
ui:field="groupsListbox">
|
||||
</b:ListBox>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverGroups" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelGroups">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconGroups" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
Alert block on continue
|
||||
<b:AlertBlock animation="true" visible="false"
|
||||
ui:field="alertNoResources"
|
||||
text="Please note that the item you are going to publish will not have resources.">
|
||||
</b:AlertBlock>
|
||||
|
||||
Alert block on continue
|
||||
<b:AlertBlock type="INFO" close="false" animation="true"
|
||||
visible="false" ui:field="onContinueAlertBlock">
|
||||
</b:AlertBlock>
|
||||
|
||||
<b:Button title="Continue" ui:field="continueButton" type="PRIMARY"
|
||||
block="true">Continue</b:Button>
|
||||
<b:Button title="Reset" ui:field="resetButton" block="true">Reset</b:Button>
|
||||
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
|
||||
|
||||
<b:Form type="HORIZONTAL" styleName="{style.form-main-style}"
|
||||
ui:field="formSecondStep" visible="false">
|
||||
<b:Fieldset styleName="{style.fieldset-border-style}">
|
||||
<b:Legend styleName="{style.legend-style}">
|
||||
Manage Resources
|
||||
</b:Legend>
|
||||
<b:ControlGroup>
|
||||
<b:Controls>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverResources" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelResources">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconResources" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
<g:SimplePanel ui:field="workspaceResourcesContainer"
|
||||
width="100%" visible="true">
|
||||
</g:SimplePanel>
|
||||
|
||||
<b:Button title="Continue" ui:field="continueThirdStep"
|
||||
type="PRIMARY" block="true">Continue</b:Button>
|
||||
|
||||
<b:Button title="Go Back" ui:field="goBackButtonFirstStep"
|
||||
block="true">Go
|
||||
Back</b:Button>
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
|
||||
|
||||
<b:Form type="HORIZONTAL" styleName="{style.form-main-style}"
|
||||
ui:field="formThirdStep" visible="false">
|
||||
<b:Fieldset styleName="{style.fieldset-border-style}">
|
||||
<b:Legend styleName="{style.legend-style}">
|
||||
Insert Item Profile Information
|
||||
<small>
|
||||
<span style="color:red;">*</span>
|
||||
is required
|
||||
</small>
|
||||
</b:Legend>
|
||||
|
||||
<b:Paragraph ui:field="selectedProfile" styleName="{style.selected-profile}"></b:Paragraph>
|
||||
|
||||
Here will be placed the metadata fields formats
|
||||
<g:VerticalPanel ui:field="metadataFieldsPanel"
|
||||
visible="false" width="100%"></g:VerticalPanel>
|
||||
|
||||
Custom fields can be dinamically added
|
||||
<b:ControlGroup ui:field="customFields">
|
||||
<b:ControlLabel>Custom Field(s):</b:ControlLabel>
|
||||
</b:ControlGroup>
|
||||
|
||||
<b:ControlGroup>
|
||||
<b:Controls>
|
||||
<span style="float:right; width:5%; color: #aaaaaa;">
|
||||
<b:Popover ui:field="popoverCustomFields" html="true"
|
||||
animation="true" placement="LEFT">
|
||||
<g:FocusPanel ui:field="focusPanelCustomFields">
|
||||
<b:Icon type="INFO_SIGN" size="TWO_TIMES" ui:field="infoIconCustomFields" />
|
||||
</g:FocusPanel>
|
||||
</b:Popover>
|
||||
</span>
|
||||
<b:Button icon="PLUS_SIGN" title="Add Custom Field"
|
||||
ui:field="addCustomFieldButton"></b:Button>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
Alert block on create
|
||||
<b:AlertBlock type="INFO" close="false" animation="true"
|
||||
visible="false" ui:field="onCreateAlertBlock" styleName="{style.block-alert-style}">
|
||||
</b:AlertBlock>
|
||||
|
||||
<g:HorizontalPanel ui:field="goToDatasetButtonPanel" visible="false">
|
||||
<g:Label>Go to the Item</g:Label>
|
||||
<b:Button title="Go to the Item" ui:field="goToDatasetButton"
|
||||
type="LINK" visible="false" styleName="{style.the-margin-left}"></b:Button>
|
||||
</g:HorizontalPanel>
|
||||
|
||||
<b:Button title="Add resources to the just created item"
|
||||
block="true" type="PRIMARY" visible="false" ui:field="addResourcesButton">Add Resources</b:Button>
|
||||
|
||||
<b:Button title="Create Item" ui:field="createButton"
|
||||
type="PRIMARY" block="true">Create</b:Button>
|
||||
|
||||
<b:Button title="Go Back" ui:field="goBackButtonSecondStep"
|
||||
block="true">Go
|
||||
Back</b:Button>
|
||||
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder> -->
|
|
@ -8,10 +8,10 @@ import java.util.Map;
|
|||
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.MetadataProfileFormBuilderService;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.MetadataProfileFormBuilderServiceAsync;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormProfileEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormProfileEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldProfileEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldProfileEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.MetaDataField;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.GenericFormEventsListener;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.GenericFormEvents.HasGenericFormListenerRegistration;
|
||||
|
@ -387,19 +387,19 @@ public class CreateMetadataForm extends Composite implements HasGenericFormListe
|
|||
*/
|
||||
private void bind() {
|
||||
// when a custom field is removed, remove it from the list
|
||||
uiBus.addHandler(DeleteCustomFieldEvent.TYPE, new DeleteCustomFieldEventHandler() {
|
||||
uiBus.addHandler(DeleteCustomFieldProfileEvent.TYPE, new DeleteCustomFieldProfileEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onRemoveEntry(DeleteCustomFieldEvent event) {
|
||||
public void onRemoveEntry(DeleteCustomFieldProfileEvent event) {
|
||||
customFieldEntriesList.remove(event.getRemovedEntry());
|
||||
customFields.remove(event.getRemovedEntry());
|
||||
}
|
||||
});
|
||||
|
||||
// on close form
|
||||
uiBus.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
||||
uiBus.addHandler(CloseCreationFormProfileEvent.TYPE, new CloseCreationFormProfileEventHandler() {
|
||||
@Override
|
||||
public void onClose(CloseCreationFormEvent event) {
|
||||
public void onClose(CloseCreationFormProfileEvent event) {
|
||||
InfoIconsLabels.closeDialogBox(popupOpenedIds);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata;
|
||||
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteCustomFieldProfileEvent;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.InputAddOn;
|
||||
|
@ -91,7 +91,7 @@ public class CustomFieldEntryProfile extends Composite {
|
|||
void onRemoveCustomField(ClickEvent e){
|
||||
|
||||
// fire event
|
||||
eventBus.fireEvent(new DeleteCustomFieldEvent(this));
|
||||
eventBus.fireEvent(new DeleteCustomFieldProfileEvent(this));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormProfileEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.CloseCreationFormProfileEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.form.generic.CreateMetadataForm.OPERATION;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.openlayerwidget.GeoJsonAreaSelectionDialog;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.timeandranges.DataTimeBox;
|
||||
|
@ -546,10 +546,10 @@ public class MetaDataFieldSkeleton extends Composite {
|
|||
private void bind() {
|
||||
|
||||
// on close form
|
||||
eventBus.addHandler(CloseCreationFormEvent.TYPE, new CloseCreationFormEventHandler() {
|
||||
eventBus.addHandler(CloseCreationFormProfileEvent.TYPE, new CloseCreationFormProfileEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onClose(CloseCreationFormEvent event) {
|
||||
public void onClose(CloseCreationFormProfileEvent event) {
|
||||
|
||||
if (dialog != null)
|
||||
dialog.hide();
|
||||
|
|
|
@ -137,7 +137,7 @@ public class AddResourceToDataset extends Composite{
|
|||
|
||||
if(result != null){
|
||||
showAlert("Resource created correctly", AlertType.SUCCESS);
|
||||
eventBus.fireEvent(new AddResourceEvent(result));
|
||||
eventBus.fireEvent(new AddResourceEventProfile(result));
|
||||
|
||||
// remove data
|
||||
resourceUrlTextBox.setText("");
|
||||
|
|
|
@ -3,10 +3,11 @@ package org.gcube.portlets.widgets.mpformbuilder.client.ui.resources;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.AddResourceEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.AddResourceEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteResourceEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteResourceEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.MetadataProfileFormBuilderServiceAsync;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.AddResourceEventProfile;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.AddResourceEventProfileHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteResourceProfileEvent;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.client.events.DeleteResourceProfileEventHandler;
|
||||
import org.gcube.portlets.widgets.mpformbuilder.shared.catalogue.ResourceElementBeanProfile;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Accordion;
|
||||
|
@ -19,6 +20,8 @@ import com.google.gwt.event.dom.client.ClickHandler;
|
|||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
@ -27,13 +30,13 @@ import com.google.gwt.user.client.ui.Widget;
|
|||
* A summary of the resources added by the user.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
*/
|
||||
public class AddedResourcesSummary extends Composite{
|
||||
public class AddedResourcesSummaryProfile extends Composite{
|
||||
|
||||
private static AddedResourcesSummaryUiBinder uiBinder = GWT
|
||||
.create(AddedResourcesSummaryUiBinder.class);
|
||||
|
||||
interface AddedResourcesSummaryUiBinder extends
|
||||
UiBinder<Widget, AddedResourcesSummary> {
|
||||
UiBinder<Widget, AddedResourcesSummaryProfile> {
|
||||
}
|
||||
|
||||
// Event bus
|
||||
|
@ -44,15 +47,12 @@ public class AddedResourcesSummary extends Composite{
|
|||
|
||||
@UiField VerticalPanel addResourcesPanel;
|
||||
|
||||
public AddedResourcesSummary(HandlerManager eventBus) {
|
||||
public AddedResourcesSummaryProfile(HandlerManager eventBus) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
// save bus
|
||||
this.eventBus = eventBus;
|
||||
|
||||
// bind on add resource event
|
||||
bind();
|
||||
|
||||
// init list
|
||||
addedResources = new ArrayList<ResourceElementBeanProfile>();
|
||||
}
|
||||
|
@ -63,10 +63,11 @@ public class AddedResourcesSummary extends Composite{
|
|||
private void bind() {
|
||||
|
||||
// when a new resource is added
|
||||
eventBus.addHandler(AddResourceEvent.TYPE, new AddResourceEventHandler() {
|
||||
eventBus.addHandler(AddResourceEventProfile.TYPE, new AddResourceEventProfileHandler() {
|
||||
|
||||
@Override
|
||||
public void onAddedResource(AddResourceEvent addResourceEvent) {
|
||||
public void onAddedResource(AddResourceEventProfile addResourceEvent) {
|
||||
GWT.log("Added resource event: "+addResourceEvent);
|
||||
|
||||
// get the resource
|
||||
final ResourceElementBeanProfile justAddedResource = addResourceEvent.getResource();
|
||||
|
@ -91,7 +92,7 @@ public class AddedResourcesSummary extends Composite{
|
|||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
eventBus.fireEvent(new DeleteResourceEvent(justAddedResource));
|
||||
eventBus.fireEvent(new DeleteResourceProfileEvent(justAddedResource));
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -110,29 +111,24 @@ public class AddedResourcesSummary extends Composite{
|
|||
});
|
||||
|
||||
// when the user wants to delete a resource
|
||||
eventBus.addHandler(DeleteResourceEvent.TYPE, new DeleteResourceEventHandler() {
|
||||
eventBus.addHandler(DeleteResourceProfileEvent.TYPE, new DeleteResourceProfileEventHandler() {
|
||||
|
||||
@Override
|
||||
public void onDeletedResource(DeleteResourceEvent deleteResourceEvent) {
|
||||
public void onDeletedResource(DeleteResourceProfileEvent deleteResourceEvent) {
|
||||
|
||||
// to delete
|
||||
ResourceElementBeanProfile toDelete = deleteResourceEvent.getResource();
|
||||
|
||||
|
||||
|
||||
// find it
|
||||
Window.alert("DELETE RESOURCE MUST BE IMPLEMENTED");
|
||||
/*
|
||||
* MUST ME MANAGED IN ANOTHER POINT
|
||||
*
|
||||
* for(int i = 0; i < addedResources.size(); i++){
|
||||
for(int i = 0; i < addedResources.size(); i++){
|
||||
|
||||
if(addedResources.get(i).getOriginalIdInWorkspace().equals(toDelete.getOriginalIdInWorkspace())){
|
||||
if(addedResources.get(i).equals(toDelete)){
|
||||
|
||||
// get the associated widget and remove it
|
||||
final Widget widget = addResourcesPanel.getWidget(i);
|
||||
|
||||
// remote call to remove it from the dataset
|
||||
ckanServices.deleteResourceFromDataset(toDelete, new AsyncCallback<Boolean>() {
|
||||
MetadataProfileFormBuilderServiceAsync.Util.getInstance().deleteResourceFromDataset(toDelete, new AsyncCallback<Boolean>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
|
@ -149,11 +145,15 @@ public class AddedResourcesSummary extends Composite{
|
|||
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
*/
|
||||
// remove from the list
|
||||
addedResources.remove(toDelete);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public HandlerManager getEventBus() {
|
||||
return eventBus;
|
||||
}
|
||||
}
|
|
@ -400,7 +400,7 @@ public class MetadataFieldWrapper implements UpdatableField, Serializable {
|
|||
builder.append(", maxOccurs=");
|
||||
builder.append(maxOccurs);
|
||||
builder.append(", currentValues=");
|
||||
builder.append(currentValues);
|
||||
builder.append("currentValues");
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue