added header instead of buttons
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gcube-loggedin@101180 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e33f1507cc
commit
7a0da6879f
|
@ -3,7 +3,7 @@
|
|||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<dependent-module archiveName="session-checker-0.2.5-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker">
|
||||
<dependent-module archiveName="session-checker-0.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gcube-loggedin</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.4.0-SNAPSHOT</version>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
|
||||
<name>gCube Loggedin Portlet</name>
|
||||
<description>
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package org.gcube.portlets.user.gcubeloggedin.client;
|
||||
|
||||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portlets.user.gcubeloggedin.client.ui.AboutView;
|
||||
import org.gcube.portlets.user.gcubeloggedin.shared.VObject;
|
||||
import org.gcube.portlets.user.gcubeloggedin.shared.VREClient;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -13,11 +10,6 @@ import com.google.gwt.user.client.rpc.ServiceDefTarget;
|
|||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.liferay.portal.model.User;
|
||||
import com.liferay.portal.security.permission.PermissionChecker;
|
||||
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
|
||||
import com.liferay.portal.security.permission.PermissionThreadLocal;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
||||
/**
|
||||
* Entry point classes define <code>onModuleLoad()</code>.
|
||||
|
|
|
@ -8,4 +8,6 @@ public class UIConstants {
|
|||
|
||||
public static final String LOADINGE = GWT.getModuleBaseURL() + "../images/loading.gif";
|
||||
|
||||
public static final String HOME = GWT.getModuleBaseURL() + "../images/home.png";
|
||||
|
||||
}
|
||||
|
|
|
@ -7,18 +7,22 @@ import org.gcube.portlets.user.gcubeloggedin.shared.VREClient;
|
|||
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.Window.Location;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public class AboutView extends Composite {
|
||||
|
@ -36,24 +40,36 @@ public class AboutView extends Composite {
|
|||
|
||||
@UiField HTMLPanel htmlPanel;
|
||||
@UiField HTML description;
|
||||
@UiField Button backButton;
|
||||
@UiField Button leaveButton;
|
||||
@UiField Anchor backButton;
|
||||
@UiField Anchor leaveButton;
|
||||
|
||||
|
||||
private LoggedinServiceAsync loggedinService;
|
||||
|
||||
public AboutView(VObject vobj, LoggedinServiceAsync loggedinService) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
vobj.setMandatory(true);
|
||||
|
||||
this.loggedinService = loggedinService;
|
||||
description.setHTML("<img class=\"imageVRE\" src=\"" + vobj.getImageURL() + "\" />" + vobj.getDescription());
|
||||
if (vobj instanceof VREClient && !vobj.isMandatory()) {
|
||||
leaveButton.getElement().getStyle().setBackgroundColor("#F2DEDE");
|
||||
leaveButton.getElement().getStyle().setBorderColor("#EBCCD1");
|
||||
leaveButton.getElement().getStyle().setColor("#A94440");
|
||||
|
||||
leaveButton.setStyleName("leave-group");
|
||||
|
||||
if (vobj instanceof VREClient && !vobj.isMandatory()) {
|
||||
wa = new WarningAlert("Are you sure you want to leave this group? "
|
||||
+ "By leaving this group you will no longer receive updates and lose the workspace folder related to the group.", this);
|
||||
} else
|
||||
htmlPanel.remove(leaveButton);
|
||||
}
|
||||
else {
|
||||
//remove the login button
|
||||
Scheduler.get().scheduleDeferred(new Command() {
|
||||
public void execute () {
|
||||
DOM.getElementById("removable-item-li").removeFromParent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@UiHandler("backButton")
|
||||
|
|
|
@ -2,9 +2,17 @@
|
|||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
|
||||
<g:HTMLPanel ui:field="htmlPanel" styleName="framed">
|
||||
<g:HTMLPanel ui:field="htmlPanel" styleName="envhome-frame">
|
||||
<div id="vre-header-container">
|
||||
<ul id="vre-header">
|
||||
<li>
|
||||
<g:Anchor ui:field="backButton" href="#"><span> </span></g:Anchor>
|
||||
</li>
|
||||
<li id="removable-item-li">
|
||||
<g:Anchor ui:field="leaveButton" href="#">Leave Group</g:Anchor>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<g:HTML ui:field="description" styleName="description"></g:HTML>
|
||||
<g:Button ui:field="backButton">Back</g:Button>
|
||||
<g:Button ui:field="leaveButton">Leave Group</g:Button>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -9,8 +9,6 @@ import java.util.List;
|
|||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.portlet.PortletSession;
|
||||
import javax.portlet.RenderRequest;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
|
@ -27,9 +25,7 @@ import org.gcube.portlets.user.gcubeloggedin.shared.VObject.UserBelongingClient;
|
|||
import org.gcube.portlets.user.gcubeloggedin.shared.VREClient;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
import org.gcube.vomanagement.usermanagement.model.RoleModel;
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to='gcubeloggedin'>
|
||||
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
||||
<!-- Other module inherits -->
|
||||
<set-property name="user.agent" value="gecko1_8,safari" />
|
||||
|
||||
|
||||
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point
|
||||
class='org.gcube.portlets.user.gcubeloggedin.client.GCubeLoggedin' />
|
||||
|
|
|
@ -3,15 +3,51 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#vre-header-container {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#vre-header-container ul {
|
||||
margin: 6px 2px 0px;
|
||||
padding: 1px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
#vre-header li {
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
border-right: 1px solid #ccc;
|
||||
padding: 8px 20px;
|
||||
}
|
||||
|
||||
#vre-header li a {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#vre-header li a span {
|
||||
background-image: url('images/home.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 80%;
|
||||
}
|
||||
|
||||
#vre-header li a:hover {
|
||||
color: #A94440;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.framed {
|
||||
margin: 0 0 10px;
|
||||
padding: 10px;
|
||||
margin: 0px 5px;
|
||||
.envhome-frame {
|
||||
background: #FFF;
|
||||
border-radius: 6px !important;
|
||||
-moz-border-radius: 6px !important;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue