Minor glitch fixed to Liferay 6.2

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@128956 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-06-01 12:54:58 +00:00
parent 3653e08863
commit a77ee54778
5 changed files with 117 additions and 90 deletions

View File

@ -8,6 +8,12 @@
<dependent-module archiveName="workspace-tree-widget-6.13.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="workspace-application-handler-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-application-handler-TRUNK/workspace-application-handler-TRUNK">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="workspace-explorer-1.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-explorer/workspace-explorer">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="workspace"/>

View File

@ -1,15 +1,15 @@
package org.gcube.portlets.user.workspace.client;
/**
*
*
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*
*/
public class ConstantsPortlet {
// ToolBar button
public static final String CATEGORIZE = "";
public static final String REFRESH = "Refresh";
public static final String ADDFOLDER = "New Folder";
public static final String DELETEITEM = "Delete";
@ -24,7 +24,7 @@ public class ConstantsPortlet {
public static final String GET_ITEMID_PARAMETER ="itemid";
public static final String GET_OPERATION_PARAMETER ="operation";
public static final String GET_VALIDATE_SESSION="validatesession";
// Div Gwt
public static final String WORKSPACEDIV = "workspaceDiv";
@ -50,13 +50,16 @@ public class ConstantsPortlet {
public static final String VIEWSPACE = "";//"Filter by Space";
public static final String PREVIEW = "Preview";
public static final String OPEN = "Open";
public static final String TITLEACCESSWEBDAV = "Desktop Access";
//COOKIE SETTINGS
public static final String GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING = "GCUBE-Cookie-WorkspaceGridViewSetting";
public static final String GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES = "GCUBE-Cookie-WorkspaceAvailableFeatures";
public static final int COOKIE_EXPIRE_DAYS = 30;
public static final long MILLISECS_PER_DAY = 1000L * 60L * 60L * 24L;
public static final int NORTH_HEIGHT = 70;
}

View File

@ -1,5 +1,5 @@
/**
*
*
*/
package org.gcube.portlets.user.workspace.client.view;
@ -18,7 +18,6 @@ import com.github.gwtbootstrap.client.ui.constants.Trigger;
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;
@ -39,56 +38,56 @@ import com.google.gwt.user.client.ui.Widget;
* Nov 6, 2015
*/
public class WorkspaceFeaturesView extends Composite {
@UiField
Alert alert_ws_features;
@UiField
HorizontalPanel ws_features;
@UiField
HorizontalPanel hp_feautures;
@UiField
HorizontalPanel info_features;
@UiField
com.google.gwt.user.client.ui.Label how_to;
@UiField
Label shf; //Share Folders & Files
private Popover overShF= new Popover();
@UiField
Label upl; //UPLOAD
private Popover overUpload = new Popover();
@UiField
Label plk; //PUBLIC LINK
private Popover overPlk = new Popover();
@UiField
FlowPanel fp1;
@UiField
FlowPanel fp2;
@UiField
FlowPanel fp3;
@UiField
CheckBox ck_features_show_again;
@UiField
Button btn_hide_ws_feautures_panel;
private static WorkspaceFeaturesUiBinder uiBinder = GWT.create(WorkspaceFeaturesUiBinder.class);
/**
* The Interface WorkspaceFeaturesUiBinder.
*
@ -98,7 +97,7 @@ public class WorkspaceFeaturesView extends Composite {
interface WorkspaceFeaturesUiBinder extends
UiBinder<Widget, WorkspaceFeaturesView> {
}
/**
* Instantiates a new workspace features view.
*/
@ -109,24 +108,24 @@ public class WorkspaceFeaturesView extends Composite {
hp_feautures.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
ws_features.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
hp_feautures.setCellWidth(fp1, "33%");
Image info = Resources.getIconInformation().createImage();
info.setTitle("Workspace available features");
info_features.insert(info, 0);
info_features.setCellVerticalAlignment(how_to, HasVerticalAlignment.ALIGN_MIDDLE);
how_to.addStyleName("margin-left-5");
hp_feautures.setCellVerticalAlignment(fp1, HasVerticalAlignment.ALIGN_MIDDLE);
hp_feautures.setCellWidth(fp2, "33%");
hp_feautures.setCellHorizontalAlignment(fp2, HasHorizontalAlignment.ALIGN_CENTER);
hp_feautures.setCellVerticalAlignment(fp2, HasVerticalAlignment.ALIGN_MIDDLE);
hp_feautures.setCellWidth(fp3, "33%");
hp_feautures.setCellHorizontalAlignment(fp3, HasHorizontalAlignment.ALIGN_RIGHT);
hp_feautures.setCellVerticalAlignment(fp3, HasVerticalAlignment.ALIGN_MIDDLE);
ck_features_show_again.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
ck_features_show_again.getElement().getFirstChildElement().setId("check_features_donotshowagain");
// 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");
@ -134,21 +133,21 @@ public class WorkspaceFeaturesView extends Composite {
initPopupShareFeature();
initPopupUploadFeature();
initPopupPlkFeature();
alert_ws_features.addClosedHandler(new ClosedHandler<AlertBase>() {
@Override
public void onClosed(ClosedEvent<AlertBase> 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);
}
});
btn_hide_ws_feautures_panel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Boolean isChecked = ck_features_show_again.getValue();
@ -159,7 +158,7 @@ public class WorkspaceFeaturesView extends Composite {
}
});
}
/**
* Inits the popup share feature.
*/
@ -189,13 +188,13 @@ public class WorkspaceFeaturesView extends Composite {
+iconUploadDND+ "1 - Drop your files from Desktop;<br/>"
+iconUploadFile+ "2 - Click 'Upload' and Browse Files;<br/>"
+iconUploadArchive+ "3 - Upload a zip file to unzip directly its content in the Workspace.<br/>");
overUpload.setHtml(true);
overUpload.setPlacement(Placement.BOTTOM);
overUpload.setTrigger(Trigger.HOVER);
overUpload.reconfigure();
}
/**
* Inits the popup plk feature.
*/
@ -210,14 +209,14 @@ public class WorkspaceFeaturesView extends Composite {
overPlk.setTrigger(Trigger.HOVER);
overPlk.reconfigure();
}
/* (non-Javadoc)
* @see com.google.gwt.user.client.ui.UIObject#setVisible(boolean)
*/
public void setVisible(boolean bool){
this.setVisible(bool);
}
}

View File

@ -1,6 +1,21 @@
<!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">
<ui:style>
.label-check {
display: inline !important;
vertical-align: middle !important;
}
.label-check input {
margin-right: 2px !important;
margin-top: 0px !important;
vertical-align: middle !important;
}
</ui:style>
<g:FlowPanel>
<b:Alert close="false" animation="false" ui:field="alert_ws_features">
<g:HorizontalPanel ui:field="hp_feautures" width="100%">
@ -10,7 +25,8 @@
</g:HorizontalPanel>
</g:FlowPanel>
<g:FlowPanel ui:field="fp2">
<g:HorizontalPanel ui:field="ws_features" verticalAlignment="middle">
<g:HorizontalPanel ui:field="ws_features"
verticalAlignment="middle">
<b:Label ui:field="shf" text="Share"></b:Label>
<b:Label ui:field="plk" text="Public Link"></b:Label>
@ -20,7 +36,7 @@
</g:FlowPanel>
<g:FlowPanel ui:field="fp3">
<b:CheckBox checked="false" text="Don't show this again"
ui:field="ck_features_show_again"></b:CheckBox>
ui:field="ck_features_show_again" styleName="{style.label-check}"></b:CheckBox>
<b:Button ui:field="btn_hide_ws_feautures_panel" text="Hide"></b:Button>
</g:FlowPanel>
</g:HorizontalPanel>

View File

@ -26,6 +26,9 @@ import com.google.gwt.user.client.Random;
* Nov 10, 2015
*/
public class GxtBorderLayoutPanel extends ContentPanel {
/**
*
*/
private ContentPanel north = new ContentPanel();
private ContentPanel west = new ContentPanel();
private ContentPanel center = new ContentPanel();
@ -37,7 +40,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
private GxtCardLayoutResultPanel gxtCardLayoutResultPanel;
private MultipleDNDUpload dnd;
/**
* Instantiates a new gxt border layout panel.
*
@ -52,13 +55,13 @@ public class GxtBorderLayoutPanel extends ContentPanel {
ExplorerPanel explorerPanel,
GxtCardLayoutResultPanel gxtCardLayoutResultPanel,
GxtBottomToolBarItem detailsContainer2, MultipleDNDUpload dnd) {
this.searchAndFilterContainer = searchAndFilterContainer2;
this.expPanel = explorerPanel;
this.gxtCardLayoutResultPanel = gxtCardLayoutResultPanel;
this.toolBarItemDetails = detailsContainer2;
this.dnd = dnd;
this.initLayout();
this.createLayouts();
}
@ -67,9 +70,9 @@ public class GxtBorderLayoutPanel extends ContentPanel {
* Inits the layout.
*/
private void initLayout(){
north.setId("NorthPanel");
north.setLayout(new FitLayout());
west.setId("WestPanel");
west.setLayout(new FitLayout());
@ -79,56 +82,56 @@ public class GxtBorderLayoutPanel extends ContentPanel {
east.setId("EastPanel");
center.setScrollMode(Scroll.AUTOX);
center.setBorders(false);
north.setHeaderVisible(false);
west.setHeaderVisible(false);
south.setHeading(ConstantsPortlet.DETAILS);
south.setHeaderVisible(false);
south.setLayout(new FitLayout());
east.setVisible(false);
// south.setVisible(false);
}
/**
* Creates the layouts.
*/
private void createLayouts(){
final BorderLayout borderLayout = new BorderLayout();
setLayout(borderLayout);
//setStyleAttribute("padding", "10px");
setHeaderVisible(false);
// center.add(this.gridFilter);
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 60, 60, 60);
BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, ConstantsPortlet.NORTH_HEIGHT, ConstantsPortlet.NORTH_HEIGHT, ConstantsPortlet.NORTH_HEIGHT);
northData.setCollapsible(true);
northData.setSplit(true); //Split bar between regions
// northData.setFloatable(true);
northData.setCollapsible(true);
// northData.setHideCollapseTool(false);
// northData.setSplit(true);
northData.setMargins(new Margins(0, 0, 1, 0));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 330,330,400);
westData.setSplit(true);
westData.setCollapsible(true);
// northData.setFloatable(true);
northData.setCollapsible(true);
// northData.setHideCollapseTool(false);
// northData.setSplit(true);
northData.setMargins(new Margins(0, 0, 1, 0));
BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 330,330,400);
westData.setSplit(true);
westData.setCollapsible(true);
westData.setMargins(new Margins(0,1,0,0));
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
centerData.setMargins(new Margins(0));
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 150,50,150);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(0,0,0,1));
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 30,30,30);
southData.setSplit(true);
southData.setCollapsible(false);
southData.setMargins(new Margins(1, 0, 0, 0));
BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 150,50,150);
eastData.setSplit(true);
eastData.setCollapsible(true);
eastData.setMargins(new Margins(0,0,0,1));
BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 30,30,30);
southData.setSplit(true);
southData.setCollapsible(false);
southData.setMargins(new Margins(1, 0, 0, 0));
north.add(this.searchAndFilterContainer);
north.setScrollMode(Scroll.AUTOY);
west.add(this.expPanel);
@ -140,9 +143,9 @@ public class GxtBorderLayoutPanel extends ContentPanel {
searchAndFilterContainer.getToolbarPathPanel().refreshSize();
}
});
center.addListener(Events.Resize,new Listener<BoxComponentEvent>(){
@Override
@ -152,7 +155,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
updateSizeGrid();
}
});
gxtCardLayoutResultPanel.addListener(Events.Render, new Listener<BaseEvent>() {
@Override
@ -160,7 +163,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
updateSizeCard();
}
});
gxtCardLayoutResultPanel.getGridGroupViewContainer().addListener(Events.Render, new Listener<BaseEvent>() {
@Override
@ -179,28 +182,28 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void handleEvent(BoxComponentEvent be) {
expPanel.getAsycTreePanel().setSizeTreePanel(expPanel.getWidth()-13, expPanel.getHeight()-39);
if(expPanel.getSmartFolderPanel()!=null)
expPanel.getSmartFolderPanel().setSizeSmartPanel(expPanel.getWidth()-2, expPanel.getHeight()-29);
expPanel.getSmartFolderPanel().setSizeSmartPanel(expPanel.getWidth()-2, expPanel.getHeight()-29);
}
});
add(north, northData);
add(west, westData);
add(center, centerData);
add(north, northData);
add(west, westData);
add(center, centerData);
add(east, eastData);
}
/**
* Update size card.
*/
private void updateSizeCard(){
gxtCardLayoutResultPanel.setSize(center.getWidth()-2, center.getHeight());
}
/**
* Update size grid.
*/
private void updateSizeGrid(){
gxtCardLayoutResultPanel.getGridGroupViewContainer().refreshSize((center.getWidth()-5)+"px", (center.getHeight()-75)+"px");
gxtCardLayoutResultPanel.getGridGroupViewContainer().refreshSize(center.getWidth()-5+"px", center.getHeight()-75+"px");
}
/**