Adjusted mobile ImageGallery layout

This commit is contained in:
Benjamin Barth committed 2015-09-15 16:17:05 +02:00
1 parent dca01ab291
commit ea774cb6a9
3 files changed
+7 -5

No files matched your search

@@ -17,6 +17,9 @@
.imagegallery_column_item {
cursor: pointer;
margin-bottom: 0.666666666666667em;
background-size: cover;
width: 100%;
padding-top: 100%;
}
.imagegallery_column_item img {
width: 100%;
@@ -1,8 +1,8 @@
package com.sap.sailing.gwt.home.mobile.partials.imagegallery;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.ImageElement;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
@@ -19,11 +19,11 @@ public class ImageGalleryItem extends Widget implements HasClickHandlers {
interface ImageGalleryItemUiBinder extends UiBinder<Element, ImageGalleryItem> {
}
@UiField ImageElement imageUi;
@UiField DivElement imageUi;
public ImageGalleryItem(ImageDTO image) {
setElement(uiBinder.createAndBindUi(this));
imageUi.setSrc(image.getSourceRef());
imageUi.getStyle().setBackgroundImage("url('" + image.getSourceRef() + "')");
}
@Override
@@ -4,7 +4,6 @@
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
<ui:with field="res" type="com.sap.sailing.gwt.home.mobile.resources.SharedResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.mobile.partials.imagegallery.ImageGalleryResources" />
<div class="{local_res.css.imagegallery_column_item}">
<img ui:field="imageUi"/>
<div class="{local_res.css.imagegallery_column_item}" ui:field="imageUi">
</div>
</ui:UiBinder>