1280: Workspace GUI: quote and available feature improvements
Task-Url: https://support.d4science.org/issues/1280 Added button hide, updated css git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@120225 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
91d4868ff9
commit
af2e6d0d4a
|
@ -1325,7 +1325,9 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){
|
||||
|
||||
final boolean displayFeatures = readCookieWorkspaceAvailableFeatures();
|
||||
boolean displayFeatures = readCookieWorkspaceAvailableFeatures();
|
||||
|
||||
GWT.log("Display features? "+displayFeatures);
|
||||
|
||||
if(displayFeatures)
|
||||
rootPanel.add(workspaceFeatures);
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.gcube.portlets.user.workspace.client.ConstantsPortlet;
|
|||
import org.gcube.portlets.user.workspace.client.resources.Resources;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Alert;
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.CheckBox;
|
||||
import com.github.gwtbootstrap.client.ui.Label;
|
||||
import com.github.gwtbootstrap.client.ui.Popover;
|
||||
|
@ -18,6 +19,8 @@ import com.github.gwtbootstrap.client.ui.event.ClosedEvent;
|
|||
import com.github.gwtbootstrap.client.ui.event.ClosedHandler;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.VerticalAlign;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
|
@ -80,6 +83,9 @@ public class WorkspaceFeaturesView extends Composite {
|
|||
@UiField
|
||||
CheckBox ck_features_show_again;
|
||||
|
||||
@UiField
|
||||
Button btn_hide_ws_feautures_panel;
|
||||
|
||||
private static WorkspaceFeaturesUiBinder uiBinder = GWT.create(WorkspaceFeaturesUiBinder.class);
|
||||
|
||||
|
||||
|
@ -121,7 +127,7 @@ public class WorkspaceFeaturesView extends Composite {
|
|||
ck_features_show_again.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
|
||||
ck_features_show_again.getElement().getFirstChildElement().setId("check_features_donotshowagain");
|
||||
|
||||
|
||||
ck_features_show_again.addStyleName("margin-right-10");
|
||||
shf.addStyleName("margin-right-10");
|
||||
upl.addStyleName("margin-right-10");
|
||||
plk.addStyleName("margin-right-10");
|
||||
|
@ -140,6 +146,18 @@ public class WorkspaceFeaturesView extends Composite {
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
btn_hide_ws_feautures_panel.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
Boolean isChecked = ck_features_show_again.getValue();
|
||||
Boolean showAgain = !isChecked;
|
||||
GWT.log("Close alert_ws_features, show again? "+showAgain.toString().toLowerCase());
|
||||
AppController.setCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES, showAgain.toString().toLowerCase(), ConstantsPortlet.COOKIE_EXPIRE_DAYS);
|
||||
WorkspaceFeaturesView.this.alert_ws_features.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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">
|
||||
<g:FlowPanel>
|
||||
<b:Alert animation="false" ui:field="alert_ws_features">
|
||||
<b:Alert close="false" animation="false" ui:field="alert_ws_features">
|
||||
<g:HorizontalPanel ui:field="hp_feautures" width="100%">
|
||||
<g:FlowPanel ui:field="fp1">
|
||||
<g:HorizontalPanel ui:field="info_features">
|
||||
|
@ -21,6 +21,7 @@
|
|||
<g:FlowPanel ui:field="fp3">
|
||||
<b:CheckBox checked="false" text="Don't show this again"
|
||||
ui:field="ck_features_show_again"></b:CheckBox>
|
||||
<b:Button ui:field="btn_hide_ws_feautures_panel" text="Hide"></b:Button>
|
||||
</g:FlowPanel>
|
||||
</g:HorizontalPanel>
|
||||
</b:Alert>
|
||||
|
|
|
@ -407,7 +407,8 @@
|
|||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: auto;
|
||||
width: 95%
|
||||
width: 95%;
|
||||
/* height: 27px !important; */
|
||||
}
|
||||
|
||||
.alert_ws_features .close{
|
||||
|
|
Loading…
Reference in New Issue