mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-28 14:57:12 +00:00
Initial implementation of UserAccountDetails partial
This commit is contained in:
1 parent
5f9c40c6dc
commit
c301954353
5 files changed
+201
No files matched your search
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#49639F;}
|
||||
.st1{fill:#DC4A38;}
|
||||
.st2{fill:#F0AB00;}
|
||||
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#333333;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st4" d="M6,20.2V24h3.8l11.1-11.1l-3.8-3.8L6,20.2z M23.7,10c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0
|
||||
l-1.8,1.8l3.8,3.8L23.7,10z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 778 B |
+43
@@ -0,0 +1,43 @@
|
||||
package com.sap.sailing.gwt.home.desktop.partials.useraccountDetails;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.InputElement;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.shared.app.UserManagementContext;
|
||||
import com.sap.sse.security.ui.shared.UserDTO;
|
||||
|
||||
public class UserAccountDetails extends Composite {
|
||||
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
|
||||
|
||||
interface MyUiBinder extends UiBinder<Widget, UserAccountDetails> {
|
||||
}
|
||||
|
||||
public interface Presenter {
|
||||
}
|
||||
|
||||
@UiField AnchorElement editImageLinkUi;
|
||||
@UiField InputElement usernameUi;
|
||||
@UiField InputElement nameUi;
|
||||
@UiField InputElement emailUi;
|
||||
|
||||
public UserAccountDetails(Presenter presenter) {
|
||||
UseraccountDetailsResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setUserManagementContext(UserManagementContext userManagementContext) {
|
||||
UserDTO currentUser = userManagementContext.getCurrentUser();
|
||||
// TODO correct message
|
||||
editImageLinkUi.setTitle("TODO picture of: " + currentUser.getName());
|
||||
// TODO use image from user when field is available
|
||||
editImageLinkUi.getStyle().setBackgroundImage("url(images/home/userdefault.svg)");
|
||||
|
||||
nameUi.setValue(currentUser.getName());
|
||||
usernameUi.setValue(currentUser.getName());
|
||||
emailUi.setValue(currentUser.getEmail());
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<!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:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:with field="i18n_ubi" type="com.sap.sailing.gwt.common.client.i18n.TextMessages" />
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:with field="local_res" type="com.sap.sailing.gwt.home.desktop.partials.useraccountDetails.UseraccountDetailsResources" />
|
||||
<g:HTMLPanel>
|
||||
<div class="{local_res.css.useraccountdetails}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<a href="#" ui:field="editImageLinkUi" class="{local_res.css.useraccountdetails_image}">
|
||||
<div class="{local_res.css.useraccountdetails_image_editbutton}"></div>
|
||||
</a>
|
||||
<div class="{local_res.css.useraccountdetails_content}">
|
||||
<div class="{local_res.css.useraccountdetails_content_detail}">
|
||||
<label class="{local_res.css.useraccountdetails_content_detail_label}">
|
||||
<!-- <ui:text from="{i18n.username}" /> -->
|
||||
TODO username
|
||||
</label>
|
||||
<input ui:field="usernameUi" type="text" class="{local_res.css.useraccountdetails_content_detail_input}" />
|
||||
</div>
|
||||
<div class="{local_res.css.useraccountdetails_content_detail}">
|
||||
<label class="{local_res.css.useraccountdetails_content_detail_label}">
|
||||
<ui:text from='{i18n.name}' />
|
||||
</label>
|
||||
<input ui:field="nameUi" type="text" class="{local_res.css.useraccountdetails_content_detail_input}" />
|
||||
</div>
|
||||
<div class="{local_res.css.useraccountdetails_content_detail}">
|
||||
<label class="{local_res.css.useraccountdetails_content_detail_label}">
|
||||
<ui:text from='{i18n.password}' />
|
||||
</label>
|
||||
<!-- placeholder="{i18n.passwordwordText}" -->
|
||||
<input type="password" placeholder="TODO placeholder text" class="{local_res.css.useraccountdetails_content_detail_input}"></input>
|
||||
</div>
|
||||
<div class="{local_res.css.useraccountdetails_content_detail}">
|
||||
<label class="{local_res.css.useraccountdetails_content_detail_label}">
|
||||
<ui:text from='{i18n.email}' />
|
||||
</label>
|
||||
<input ui:field="emailUi" type="email" class="{local_res.css.useraccountdetails_content_detail_input}" />
|
||||
</div>
|
||||
<div class="{local_res.css.useraccountdetails_content_detail}">
|
||||
<label class="{local_res.css.useraccountdetails_content_detail_label}">
|
||||
<!-- <ui:text from='{i18n_ubi.passwordConfirmation}' /> -->
|
||||
TODO password confirmation
|
||||
</label>
|
||||
<!-- placeholder="{i18n.passwordConfirmationText}" -->
|
||||
<input type="password" placeholder="TODO placeholder text" class="{local_res.css.useraccountdetails_content_detail_input}"></input>
|
||||
</div>
|
||||
<div class="{local_res.css.useraccountdetails_content_submit}">
|
||||
<div class="{res.mainCss.button} {res.mainCss.buttonprimary}">
|
||||
<ui:text from='{i18n.save}' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
.useraccountdetails {
|
||||
overflow: hidden;
|
||||
}
|
||||
.useraccountdetails_image {
|
||||
float: left;
|
||||
width: 8em;
|
||||
height: 8em;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
||||
.useraccountdetails_image_editbutton {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
background-image: url("images/home/edit.svg");
|
||||
background-color: #efaa00;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
background-position: center center;
|
||||
}
|
||||
.useraccountdetails_image:hover .useraccountdetails_image_editbutton {
|
||||
display: block;
|
||||
}
|
||||
.useraccountdetails_content {
|
||||
float: left;
|
||||
width: 100%;
|
||||
max-width: 53.333333333333336em;
|
||||
padding-left: 12em;
|
||||
margin-left: -10em;
|
||||
}
|
||||
.useraccountdetails_content_detail {
|
||||
float: right;
|
||||
width: 50%;
|
||||
padding-left: 1.333333333333333em;
|
||||
margin-bottom: 1.333333333333333em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.useraccountdetails_content_detail_label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
.useraccountdetails_content_detail_input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.666666666666667em;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.useraccountdetails_content_submit {
|
||||
width: 100%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.sap.sailing.gwt.home.desktop.partials.useraccountDetails;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface UseraccountDetailsResources extends ClientBundle {
|
||||
public static final UseraccountDetailsResources INSTANCE = GWT.create(UseraccountDetailsResources.class);
|
||||
|
||||
@Source("UseraccountDetails.gss")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
String useraccountdetails();
|
||||
String useraccountdetails_image();
|
||||
String useraccountdetails_image_editbutton();
|
||||
String useraccountdetails_content();
|
||||
String useraccountdetails_content_detail();
|
||||
String useraccountdetails_content_detail_label();
|
||||
String useraccountdetails_content_detail_input();
|
||||
String useraccountdetails_content_submit();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user