Refactoring - Moved shared RegattaNavigation partials to respective

package
This commit is contained in:
Benjamin Barth committed 2015-09-08 11:30:52 +02:00
1 parent 3b7621ce46
commit 4a090d25f8
9 files changed
+74 -60

No files matched your search

@@ -40,10 +40,10 @@ import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.reload.ActionPro
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.reload.RefreshManager;
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.reload.RefreshableWidget;
import com.sap.sailing.gwt.home.desktop.partials.regattanavigation.ListNavigationPanel;
import com.sap.sailing.gwt.home.desktop.partials.regattanavigation.RaceStateLegend;
import com.sap.sailing.gwt.home.desktop.partials.regattanavigation.ListNavigationPanel.ListNavigationAction;
import com.sap.sailing.gwt.home.desktop.partials.regattanavigation.ListNavigationPanel.SelectionCallback;
import com.sap.sailing.gwt.home.shared.ExperimentalFeatures;
import com.sap.sailing.gwt.home.shared.partials.regattanavigation.RaceStateLegend;
import com.sap.sailing.gwt.ui.client.StringMessages;
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
@@ -101,49 +101,4 @@
background: url("images/home/dropdown__check@2x.png") no-repeat;
background-position: 95%;
background-size: 1.2em 0.933333333333333em;
}
.regattanavigation_legend {
font-size: 1rem;
width: 100%;
margin-top: 1.333333333333333em;
}
@media (min-width: 61em) {
.regattanavigation_legend {
text-align: right;
margin-top: 0;
}
.regattanavigation_legend_item {
margin-right: 0;
margin-left: 0.666666666666667em;
}
}
.regattanavigation_legend_item {
display: inline-block;
padding: 0.4em 0.666666666666667em;
margin: 0.333333333333333em 0.666666666666667em 0.333333333333333em 0;
font-size: 0.666em;
font-weight: 700;
line-height: 0.666666666666667em;
border: 1px solid #008fcc;
text-transform: capitalize;
}
.regattanavigation_legend_itemtracked {
color: #fff;
border-color: #008fcc;
background-color: #008fcc;
}
.regattanavigation_legend_itemuntracked {
color: #fff;
border-color: #ccc;
background-color: #666;
}
.regattanavigation_legend_itemlive {
color: #fff;
border-color: #e94a1b;
background-color: #e94a1b;
}
.regattanavigation_legend_itemplanned {
color: #ccc;
border-color: #ccc;
background-color: #fff;
}
}
@@ -25,11 +25,5 @@ public interface RegattaNavigationResources extends ClientBundle {
String regattanavigation_filter_current();
String regattanavigation_filter_dropdown_link();
String regattanavigation_filter_dropdown_linkactive();
String regattanavigation_legend();
String regattanavigation_legend_item();
String regattanavigation_legend_itemtracked();
String regattanavigation_legend_itemuntracked();
String regattanavigation_legend_itemlive();
String regattanavigation_legend_itemplanned();
}
}
@@ -6,7 +6,6 @@ import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;
import com.sap.sailing.gwt.home.desktop.partials.regattanavigation.RegattaNavigationResources;
import com.sap.sailing.gwt.home.mobile.partials.quickfinder.Quickfinder;
import com.sap.sailing.gwt.home.mobile.partials.regattacompetition.RegattaCompetition;
import com.sap.sailing.gwt.home.mobile.places.QuickfinderPresenter;
@@ -26,7 +25,6 @@ public class RacesViewImpl extends AbstractEventView<RacesView.Presenter> implem
public RacesViewImpl(RacesView.Presenter presenter) {
super(presenter, presenter.getCtx().getEventDTO().getType() == EventType.MULTI_REGATTA, true);
RegattaNavigationResources.INSTANCE.css().ensureInjected();
regattaCompetitionUi = new RegattaCompetition(presenter);
refreshManager.add(regattaCompetitionUi, new GetCompetitionFormatRacesAction(getEventId(), getRegattaId()));
setViewContent(uiBinder.createAndBindUi(this));
@@ -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:s="urn:import:com.sap.sailing.gwt.home.client.shared"
xmlns:mp="urn:import:com.sap.sailing.gwt.home.mobile.partials"
xmlns:dp="urn:import:com.sap.sailing.gwt.home.desktop.partials">
xmlns:sp="urn:import:com.sap.sailing.gwt.home.shared.partials">
<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:style>
@@ -11,7 +11,7 @@
font-weight: 700;
margin-top: 0.666666666666667em;
}
.legend {
div.legend {
margin-top: 0.666666666666667em;
margin-bottom: 0.666666666666667em;
}
@@ -19,7 +19,7 @@
<g:HTMLPanel>
<div class="{res.mediaCss.columns}">
<div class="{res.mediaCss.small12} {style.pageTitle}"><ui:text from="{i18n.races}" /></div>
<dp:regattanavigation.RaceStateLegend addStyleNames="{res.mediaCss.small12} {style.legend}"/>
<sp:regattanavigation.RaceStateLegend addStyleNames="{res.mediaCss.small12} {style.legend}"/>
</div>
<mp:regattacompetition.RegattaCompetition ui:field="regattaCompetitionUi" />
</g:HTMLPanel>
@@ -1,4 +1,4 @@
package com.sap.sailing.gwt.home.desktop.partials.regattanavigation;
package com.sap.sailing.gwt.home.shared.partials.regattanavigation;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
@@ -13,6 +13,7 @@ public class RaceStateLegend extends Widget {
}
public RaceStateLegend() {
RegattaNavigationResources.INSTANCE.css().ensureInjected();
setElement(uiBinder.createAndBindUi(this));
}
@@ -3,7 +3,7 @@
<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.regattanavigation.RegattaNavigationResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.shared.partials.regattanavigation.RegattaNavigationResources" />
<div class="{local_res.css.regattanavigation_legend}">
<div class="{local_res.css.regattanavigation_legend_item} {local_res.css.regattanavigation_legend_itemtracked}">
<ui:text from='{i18n.tracked}' />
@@ -0,0 +1,45 @@
.regattanavigation_legend {
font-size: 1rem;
width: 100%;
margin-top: 1.333333333333333em;
}
@media (min-width: 61em) {
.regattanavigation_legend {
text-align: right;
margin-top: 0;
}
.regattanavigation_legend_item {
margin-right: 0;
margin-left: 0.666666666666667em;
}
}
.regattanavigation_legend_item {
display: inline-block;
padding: 0.4em 0.666666666666667em;
margin: 0.333333333333333em 0.666666666666667em 0.333333333333333em 0;
font-size: 0.666em;
font-weight: 700;
line-height: 0.666666666666667em;
border: 1px solid #008fcc;
text-transform: capitalize;
}
.regattanavigation_legend_itemtracked {
color: #fff;
border-color: #008fcc;
background-color: #008fcc;
}
.regattanavigation_legend_itemuntracked {
color: #fff;
border-color: #ccc;
background-color: #666;
}
.regattanavigation_legend_itemlive {
color: #fff;
border-color: #e94a1b;
background-color: #e94a1b;
}
.regattanavigation_legend_itemplanned {
color: #ccc;
border-color: #ccc;
background-color: #fff;
}
@@ -0,0 +1,21 @@
package com.sap.sailing.gwt.home.shared.partials.regattanavigation;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
public interface RegattaNavigationResources extends ClientBundle {
public static final RegattaNavigationResources INSTANCE = GWT.create(RegattaNavigationResources.class);
@Source("RegattaNavigation.gss")
LocalCss css();
public interface LocalCss extends CssResource {
String regattanavigation_legend();
String regattanavigation_legend_item();
String regattanavigation_legend_itemtracked();
String regattanavigation_legend_itemuntracked();
String regattanavigation_legend_itemlive();
String regattanavigation_legend_itemplanned();
}
}