Merge branch 'design2015'
Conflicts: java/com.sap.sailing.gwt.ui/.settings/org.eclipse.core.resources.prefs java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_cn.properties java/com.sap.sailing.gwt.ui/src/main/resources/com/sap/sailing/gwt/Home.gwt.xml
No files matched your search
@@ -1,6 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java/com/sap/sailing/gwt/common/client/i18n/TextMessages.properties=UTF-8
|
||||
encoding//src/main/java/com/sap/sailing/gwt/common/client/i18n/TextMessages_cn.properties=UTF-8
|
||||
encoding//src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties=UTF-8
|
||||
encoding//src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_cn.properties=UTF-8
|
||||
encoding//src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_de.properties=UTF-8
|
||||
encoding//src/main/java/com/sap/sailing/gwt/ui/client/StringMessages_ru.properties=UTF-8
|
||||
@@ -42,8 +42,8 @@
|
||||
<script type="text/javascript" src="highcharts/js/themes/grid.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="js/jquery.slick/slick-1.3.15.css"/>
|
||||
<script type="text/javascript" src="js/jquery.slick/slick-1.3.15.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="js/jquery.slick/slick-1.5.0.css"/>
|
||||
<script type="text/javascript" src="js/jquery.slick/slick-1.5.0.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ Require-Bundle: com.sap.sailing.domain,
|
||||
com.sap.sse,
|
||||
com.sap.sse.security.common,
|
||||
com.sap.sse.filestorage,
|
||||
org.apache.shiro.core;bundle-version="1.2.2"
|
||||
org.apache.shiro.core;bundle-version="1.2.2",
|
||||
com.sap.sse.gwt.theme
|
||||
Bundle-Activator: com.sap.sailing.gwt.ui.server.Activator
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: javax.jms;version="1.1.0",
|
||||
|
||||
@@ -1,76 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Leaderboard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.PolarSheets"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RegattaOverview"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Spectator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.AdminConsole"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.LeaderboardEditing"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.DataMining"/>
|
||||
<listEntry value="com.sap.sailing.gwt.Home"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.YoutubePopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.AutoPlay"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.SUPERDEVMODE_ENABLED" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-superDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024m -Xmx3072m"/>
|
||||
</launchConfiguration>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Leaderboard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.PolarSheets"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RegattaOverview"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Spectator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.AdminConsole"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.LeaderboardEditing"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.DataMining"/>
|
||||
<listEntry value="com.sap.sailing.gwt.Home"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.YoutubePopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.AutoPlay"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.SUPERDEVMODE_ENABLED" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.theme/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-superDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024m -Xmx3072m"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,74 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.Home"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.DataMining"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.YoutubePopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.LeaderboardEditing"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.AdminConsole"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Spectator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RegattaOverview"/>
|
||||
<listEntry value="com.sap.sailing.gwt.AutoPlay"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.PolarSheets"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Leaderboard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /security/ui/Login.html com.sap.sse.security.ui.Login -startupUrl /security/ui/EditProfile.html com.sap.sse.security.ui.EditProfile -startupUrl /security/ui/EmailValidation.html com.sap.sse.security.ui.EmailValidation com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false"/>
|
||||
</launchConfiguration>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/>
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<booleanAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT_AUTO" value="true"/>
|
||||
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.Home"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.DataMining"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.YoutubePopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.LeaderboardEditing"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.AdminConsole"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Spectator"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.RegattaOverview"/>
|
||||
<listEntry value="com.sap.sailing.gwt.AutoPlay"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.VideoPopup"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.PolarSheets"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Leaderboard"/>
|
||||
<listEntry value="com.sap.sailing.gwt.ui.Simulator"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="/gwt/Home.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="com.sap.sailing.gwt.ui" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.gwt.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.theme/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.googlecode.java-diff-utils/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.json.simple/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.server/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.expeditionconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.declination/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.udpconnector/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.mongodb/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.swisstimingadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.operationaltransformation/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.replication/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.domain.tractracadapter.persistence/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/org.moxieapps.gwt.highcharts/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.geocoding/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sailing.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.common/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.datamining.shared/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.google.gwt.osgi/lib/gwt-user.jar" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="com.sap.sailing.gwt.ui"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.ui/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.gwt.adminconsole/src" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/com.sap.sse.security.common/src" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort auto -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup -startupUrl /security/ui/Login.html com.sap.sse.security.ui.Login -startupUrl /security/ui/EditProfile.html com.sap.sse.security.ui.EditProfile -startupUrl /security/ui/EmailValidation.html com.sap.sse.security.ui.EmailValidation com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.RaceBoard"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false"/>
|
||||
</launchConfiguration>
|
||||
@@ -63,6 +63,16 @@
|
||||
<url-pattern>/service/sailing</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<display-name>Home Service</display-name>
|
||||
<servlet-name>HomeService</servlet-name>
|
||||
<servlet-class>com.sap.sailing.gwt.home.server.HomeServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>HomeService</servlet-name>
|
||||
<url-pattern>/service/home</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<display-name>Media Service</display-name>
|
||||
<servlet-name>MediaService</servlet-name>
|
||||
|
||||
|
After Width: | Height: | Size: 865 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 623 B |
@@ -1,57 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
/* Slider */
|
||||
.slick-slider { position: relative; display: block; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -ms-touch-action: pan-y; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
|
||||
|
||||
.slick-list { position: relative; overflow: hidden; display: block; margin: 0; padding: 0; }
|
||||
.slick-list:focus { outline: none; }
|
||||
.slick-loading .slick-list { background: #fff url("./ajax-loader.gif") center center no-repeat; }
|
||||
.slick-list.dragging { cursor: pointer; cursor: hand; }
|
||||
|
||||
.slick-slider .slick-track { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
|
||||
|
||||
.slick-track { position: relative; left: 0; top: 0; display: block; }
|
||||
.slick-track:before, .slick-track:after { content: ""; display: table; }
|
||||
.slick-track:after { clear: both; }
|
||||
.slick-loading .slick-track { visibility: hidden; }
|
||||
|
||||
.slick-slide { float: left; height: 100%; min-height: 1px; display: none; }
|
||||
[dir="rtl"] .slick-slide { float: right; }
|
||||
.slick-slide img { display: block; }
|
||||
.slick-slide.slick-loading img { display: none; }
|
||||
.slick-slide.dragging img { pointer-events: none; }
|
||||
.slick-initialized .slick-slide { display: block; }
|
||||
.slick-loading .slick-slide { visibility: hidden; }
|
||||
.slick-vertical .slick-slide { display: block; height: auto; border: 1px solid transparent; }
|
||||
|
||||
/* Icons */
|
||||
@font-face { font-family: "slick"; src: url("./fonts/slick.eot"); src: url("./fonts/slick.eot?#iefix") format("embedded-opentype"), url("./fonts/slick.woff") format("woff"), url("./fonts/slick.ttf") format("truetype"), url("./fonts/slick.svg#slick") format("svg"); font-weight: normal; font-style: normal; }
|
||||
/* Arrows */
|
||||
.slick-prev, .slick-next { position: absolute; display: block; height: 20px; width: 20px; line-height: 0; font-size: 0; cursor: pointer; background: transparent; color: transparent; top: 50%; margin-top: -10px; padding: 0; border: none; outline: none; }
|
||||
.slick-prev:hover, .slick-prev:focus, .slick-next:hover, .slick-next:focus { outline: none; background: transparent; color: transparent; }
|
||||
.slick-prev:hover:before, .slick-prev:focus:before, .slick-next:hover:before, .slick-next:focus:before { opacity: 1; }
|
||||
.slick-prev.slick-disabled:before, .slick-next.slick-disabled:before { opacity: 0.25; }
|
||||
|
||||
.slick-prev:before, .slick-next:before { font-family: "slick"; font-size: 20px; line-height: 1; color: white; opacity: 0.75; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
||||
|
||||
.slick-prev { left: -25px; }
|
||||
[dir="rtl"] .slick-prev { left: auto; right: -25px; }
|
||||
.slick-prev:before { content: "←"; }
|
||||
[dir="rtl"] .slick-prev:before { content: "→"; }
|
||||
|
||||
.slick-next { right: -25px; }
|
||||
[dir="rtl"] .slick-next { left: -25px; right: auto; }
|
||||
.slick-next:before { content: "→"; }
|
||||
[dir="rtl"] .slick-next:before { content: "←"; }
|
||||
|
||||
/* Dots */
|
||||
.slick-slider { margin-bottom: 30px; }
|
||||
|
||||
.slick-dots { position: absolute; bottom: -45px; list-style: none; display: block; text-align: center; padding: 0; width: 100%; }
|
||||
.slick-dots li { position: relative; display: inline-block; height: 20px; width: 20px; margin: 0 5px; padding: 0; cursor: pointer; }
|
||||
.slick-dots li button { border: 0; background: transparent; display: block; height: 20px; width: 20px; outline: none; line-height: 0; font-size: 0; color: transparent; padding: 5px; cursor: pointer; }
|
||||
.slick-dots li button:hover, .slick-dots li button:focus { outline: none; }
|
||||
.slick-dots li button:hover:before, .slick-dots li button:focus:before { opacity: 1; }
|
||||
.slick-dots li button:before { position: absolute; top: 0; left: 0; content: "•"; width: 20px; height: 20px; font-family: "slick"; font-size: 6px; line-height: 20px; text-align: center; color: black; opacity: 0.25; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
||||
.slick-dots li.slick-active button:before { color: black; opacity: 0.75; }
|
||||
|
||||
/*# sourceMappingURL=slick.css.map */
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": ";;AAuCA,aAAc,GACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,KAAK,EACd,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,UAAU,EAC3B,qBAAqB,EAAE,IAAI,EAC3B,mBAAmB,EAAE,IAAI,EACzB,kBAAkB,EAAE,IAAI,EACxB,gBAAgB,EAAE,IAAI,EACtB,eAAe,EAAE,IAAI,EACrB,WAAW,EAAE,IAAI,EACjB,gBAAgB,EAAE,KAAK,EACvB,YAAY,EAAE,KAAK,EACnB,2BAA2B,EAAE,WAAW;;AAE5C,WAAY,GACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CAAC;AAEV,iBAAQ,GACJ,OAAO,EAAE,IAAI;AAGjB,0BAAiB,GACb,UAAU,EAAE,qDAA+D;AAG/E,oBAAW,GACP,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,IAAI;;AAGpB,0BAA2B,GACvB,iBAAiB,EAAE,oBAAoB,EACvC,cAAc,EAAE,oBAAoB,EACpC,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,oBAAoB,EAClC,SAAS,EAAE,oBAAoB;;AAGnC,YAAa,GACT,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,KAAK;AAEd,uCACQ,GACJ,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,KAAK;AAGlB,kBAAQ,GACJ,KAAK,EAAE,IAAI;AAGf,2BAAiB,GACb,UAAU,EAAE,MAAM;;AAG1B,YAAa,GACT,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,UAAU,EAAE,GAAG,EAWf,OAAO,EAAE,IAAI;AAVb,wBAAc,GACV,KAAK,EAAE,KAAK;AAEhB,gBAAI,GACA,OAAO,EAAE,KAAK;AAElB,8BAAoB,GAChB,OAAO,EAAE,IAAI;AAKjB,yBAAe,GACX,cAAc,EAAE,IAAI;AAGxB,+BAAqB,GACjB,OAAO,EAAE,KAAK;AAGlB,2BAAiB,GACb,UAAU,EAAE,MAAM;AAGtB,4BAAkB,GACd,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,qBAAqB;;;AAMnC,UASC,GARG,WAAW,EAAC,OAAO,EACnB,GAAG,EAAK,wBAA2B,EACnC,GAAG,EAAK,gMAA8D,EAItE,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM;;AAMxB,wBACY,GACR,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,CAAC,EACd,SAAS,EAAE,CAAC,EACZ,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI;AACb,0EAAiB,GACf,OAAO,EAAE,IAAI,EACb,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,WAAW;AAClB,sGAAS,GACP,OAAO,EA/JI,CAAC;AAkKhB,oEAAwB,GACpB,OAAO,EAlKM,IAAG;;AAqKxB,sCAAuC,GACnC,WAAW,EAjLK,OAAO,EAkLvB,SAAS,EAAE,IAAI,EACf,WAAW,EAAE,CAAC,EACd,KAAK,EAlLW,KAAK,EAmLrB,OAAO,EA5KO,IAAG,EA6KjB,sBAAsB,EAAE,WAAW,EACnC,uBAAuB,EAAE,SAAS;;AAEtC,WAAY,GACR,IAAI,EAAE,KAAK;AACX,uBAAc,GACV,IAAI,EAAG,IAAI,EACX,KAAK,EAAE,KAAK;AAEhB,kBAAS,GACL,OAAO,EA3LQ,GAAO;AA4LtB,8BAAc,GACV,OAAO,EA5LI,GAAO;;AAgM9B,WAAY,GACR,KAAK,EAAE,KAAK;AACZ,uBAAc,GACV,IAAI,EAAG,KAAK,EACZ,KAAK,EAAE,IAAI;AAEf,kBAAS,GACL,OAAO,EAvMQ,GAAO;AAwMtB,8BAAc,GACV,OAAO,EA1MI,GAAO;;;AAiN9B,aAAc,GACV,aAAa,EAAE,IAAI;;AAEvB,WAAY,GACR,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,KAAK,EACb,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,KAAK,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,IAAI;AAEX,cAAG,GACC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,OAAO;AAEf,qBAAO,GACH,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,CAAC,EACd,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,OAAO;AACf,wDAAiB,GACb,OAAO,EAAE,IAAI;AACb,sEAAS,GACP,OAAO,EAhPN,CAAC;AAoPR,4BAAS,GACL,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,EACP,OAAO,EA3PD,GAAO,EA4Pb,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,WAAW,EArQP,OAAO,EAsQX,SAAS,EA9PR,GAAG,EA+PJ,WAAW,EAAE,IAAI,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EArQI,KAAgB,EAsQzB,OAAO,EA/PF,IAAG,EAgQR,sBAAsB,EAAE,WAAW,EACnC,uBAAuB,EAAE,SAAS;AAK1C,yCAA6B,GACzB,KAAK,EA9QQ,KAAgB,EA+Q7B,OAAO,EA1QD,IAAG",
|
||||
"sources": ["slick.scss"],
|
||||
"names": [],
|
||||
"file": "slick.css"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
_ _ _ _
|
||||
___| (_) ___| | __ (_)___
|
||||
/ __| | |/ __| |/ / | / __|
|
||||
\__ \ | | (__| < _ | \__ \
|
||||
|___/_|_|\___|_|\_(_)/ |___/
|
||||
|__/
|
||||
|
||||
Version: 1.3.15
|
||||
Author: Ken Wheeler
|
||||
Website: http://kenwheeler.github.io
|
||||
Docs: http://kenwheeler.github.io/slick
|
||||
Repo: http://github.com/kenwheeler/slick
|
||||
Issues: http://github.com/kenwheeler/slick/issues
|
||||
|
||||
*/
|
||||
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,g,e=this;if(e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,onSetPosition:null,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.paused=!1,e.positionProp=null,e.respondTo=null,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.windowWidth=0,e.windowTimer=null,e.options=a.extend({},e.defaults,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,f=e.options.responsive||null,f&&f.length>-1){e.respondTo=e.options.respondTo||"window";for(g in f)f.hasOwnProperty(g)&&(e.breakpoints.push(f[g].breakpoint),e.breakpointSettings[f[g].breakpoint]=f[g].settings);e.breakpoints.sort(function(a,b){return b-a})}e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.init(),e.checkResponsive()}var b=0;return c}(),b.prototype.addSlide=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateSlide=function(b,c){var d={},e=this;if(1===e.options.slidesToShow&&e.options.adaptiveHeight===!0&&e.options.vertical===!1){var f=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:f},e.options.speed)}e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}}):(e.applyTransition(),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=null!=c.options.asNavFor?a(c.options.asNavFor).getSlick():null;null!=d&&d.slideHandler(b,!0)},b.prototype.applyTransition=function(a){var b=this,c={};c[b.transitionType]=b.options.fade===!1?b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:"opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearIntLine truncated
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Slider */
|
||||
.slick-slider
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-khtml-user-select: none;
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.slick-list
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.slick-list:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
.slick-list.dragging
|
||||
{
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.slick-slider .slick-track,
|
||||
.slick-slider .slick-list
|
||||
{
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.slick-track
|
||||
{
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
display: block;
|
||||
}
|
||||
.slick-track:before,
|
||||
.slick-track:after
|
||||
{
|
||||
display: table;
|
||||
|
||||
content: '';
|
||||
}
|
||||
.slick-track:after
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
.slick-loading .slick-track
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-slide
|
||||
{
|
||||
display: none;
|
||||
float: left;
|
||||
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
}
|
||||
[dir='rtl'] .slick-slide
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
.slick-slide img
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.slick-slide.slick-loading img
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.slick-slide.dragging img
|
||||
{
|
||||
pointer-events: none;
|
||||
}
|
||||
.slick-initialized .slick-slide
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.slick-loading .slick-slide
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
.slick-vertical .slick-slide
|
||||
{
|
||||
display: block;
|
||||
|
||||
height: auto;
|
||||
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
_ _ _ _
|
||||
___| (_) ___| | __ (_)___
|
||||
/ __| | |/ __| |/ / | / __|
|
||||
\__ \ | | (__| < _ | \__ \
|
||||
|___/_|_|\___|_|\_(_)/ |___/
|
||||
|__/
|
||||
|
||||
Version: 1.5.0
|
||||
Author: Ken Wheeler
|
||||
Website: http://kenwheeler.github.io
|
||||
Docs: http://kenwheeler.github.io/slick
|
||||
Repo: http://github.com/kenwheeler/slick
|
||||
Issues: http://github.com/kenwheeler/slick/issues
|
||||
|
||||
*/
|
||||
/* global window, document, define, jQuery, setInterval, clearInterval */
|
||||
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,g,h,e=this;if(e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="previous">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="next">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden="hidden",e.paused=!1,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,g=e.options.responsive||null,g&&g.length>-1){e.respondTo=e.options.respondTo||"window";for(h in g)g.hasOwnProperty(h)&&(e.breakpoints.push(g[h].breakpoint),e.breakpointSettings[g[h].breakpoint]=g[h].settings);e.breakpoints.sort(function(a,b){return e.options.mobileFirst===!0?a-b:b-a})}"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(e.hidden="msHidden",e.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.init(),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=nLine truncated
|
||||
if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.swipeLeft=b.options.vertical===!1?d+f*g:d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):(b.setCSS(b.swipeLeft),void 0)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,b.dragging=!0,void 0)},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&"object"!=typeof b.options.prevArrow&&b.$prevArrow.remove(),b.$nextArrow&&"object"!=typeof b.options.nextArrow&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(){var a=this;a.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.options.infinite!==!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.removeClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled"),a.$nextArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled"),a.$prevArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled"),a.$prevArrow.removeClass("slick-disabled")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):(a.paused=!1,a.autoPlay())},a.fn.slick=function(){var g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length,f=0;for(f;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
|
||||
@@ -0,0 +1,90 @@
|
||||
@charset 'UTF-8';
|
||||
|
||||
/* Dots */
|
||||
.slick-slider
|
||||
{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.slick-dots
|
||||
{
|
||||
position: absolute;
|
||||
bottom: -45px;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
|
||||
list-style: none;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
.slick-dots li
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
.slick-dots li button
|
||||
{
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
color: transparent;
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
.slick-dots li button:hover,
|
||||
.slick-dots li button:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
.slick-dots li button:hover:before,
|
||||
.slick-dots li button:focus:before
|
||||
{
|
||||
opacity: 1;
|
||||
}
|
||||
.slick-dots li button:before
|
||||
{
|
||||
font-family: 'slick';
|
||||
font-size: 6px;
|
||||
line-height: 20px;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
content: '•';
|
||||
text-align: center;
|
||||
|
||||
opacity: .25;
|
||||
color: black;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.slick-dots li.slick-active button:before
|
||||
{
|
||||
opacity: .75;
|
||||
color: black;
|
||||
}
|
||||
@@ -68,6 +68,12 @@
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>com.sap.sse.gwt.theme</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<artifactId>com.sap.sse.gwt.adminconsole</artifactId>
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.autoplay.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.home.client.HomeService;
|
||||
import com.sap.sailing.gwt.home.client.HomeServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.MediaService;
|
||||
import com.sap.sailing.gwt.ui.client.MediaServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.SailingService;
|
||||
@@ -13,6 +15,7 @@ import com.sap.sse.security.ui.client.SecureClientFactoryImpl;
|
||||
|
||||
public abstract class AbstractApplicationClientFactory extends SecureClientFactoryImpl implements AutoPlayAppClientFactory {
|
||||
private final SailingServiceAsync sailingService;
|
||||
private final HomeServiceAsync homeService;
|
||||
private final MediaServiceAsync mediaService;
|
||||
private final PlaceNavigator navigator;
|
||||
|
||||
@@ -20,6 +23,7 @@ public abstract class AbstractApplicationClientFactory extends SecureClientFacto
|
||||
super(root, eventBus, placeController);
|
||||
navigator = new PlaceNavigatorImpl(placeController);
|
||||
sailingService = GWT.create(SailingService.class);
|
||||
homeService = GWT.create(HomeService.class);
|
||||
mediaService = GWT.create(MediaService.class);
|
||||
}
|
||||
|
||||
@@ -33,6 +37,11 @@ public abstract class AbstractApplicationClientFactory extends SecureClientFacto
|
||||
return sailingService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HomeServiceAsync getHomeService() {
|
||||
return homeService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MediaServiceAsync getMediaService() {
|
||||
return mediaService;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<g:HTMLPanel>
|
||||
<s:header.SAPHeader ui:field="sapHeader" />
|
||||
<div style="height:1em;" />
|
||||
<div class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Display language:</span>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
<g:ListBox ui:field="localeSelectionBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Start browser in full screen mode:</span>
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<g:CheckBox ui:field="startInFullscreenModeBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Event:</span>
|
||||
</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
<g:ListBox ui:field="eventSelectionBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div ui:field="leaderboardSelectionDiv" class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div ui:field="leaderboardSelectionDiv" class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Leaderboard:</span>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<g:ListBox ui:field="leaderboardSelectionBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div ui:field="leaderboardAutoZoomDiv" class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div ui:field="leaderboardAutoZoomDiv" class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Leaderboard Auto-Zoom:</span>
|
||||
</div>
|
||||
@@ -47,7 +47,7 @@
|
||||
<g:CheckBox ui:field="leaderboardAutoZoomBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div ui:field="leaderboardZoomDiv" class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div ui:field="leaderboardZoomDiv" class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Leaderboard Zoom-Factor:</span>
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
<g:TextBox ui:field="leaderboardZoomBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mainCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.grid}" style="padding-bottom:1em;">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
<span>Auto-Play video:</span>
|
||||
</div>
|
||||
@@ -63,7 +63,7 @@
|
||||
<g:CheckBox ui:field="autoSelectMediaBox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mainCss.grid}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small2} {res.mediaCss.columns}">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.sap.sailing.gwt.common.client;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
|
||||
public abstract class AbstractMapTokenizer<P extends Place> implements PlaceTokenizer<P> {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AbstractMapTokenizer.class.getName());
|
||||
|
||||
@Override
|
||||
public P getPlace(String token) {
|
||||
return getPlaceFromParameters(toParameterMap(token));
|
||||
}
|
||||
|
||||
protected abstract P getPlaceFromParameters(Map<String, String> parameters);
|
||||
|
||||
protected abstract Map<String, String> getParameters(P place);
|
||||
|
||||
@Override
|
||||
public String getToken(P place) {
|
||||
return toToken(getParameters(place));
|
||||
}
|
||||
|
||||
private String toToken(Map<String, String> parameters) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (Map.Entry<String, String> entry : parameters.entrySet()) {
|
||||
if(entry.getValue() == null || entry.getValue().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
if(stringBuilder.length() > 0) {
|
||||
stringBuilder.append("&");
|
||||
}
|
||||
stringBuilder.append(entry.getKey() + "=" + entry.getValue());
|
||||
}
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
private Map<String, String> toParameterMap(String placeParametersAsToken) {
|
||||
List<String> list = Arrays.asList(placeParametersAsToken.split("&"));
|
||||
|
||||
if (list == null || list.size() < 1) {
|
||||
logger.warning("Token empty, no-op");
|
||||
Collections.emptyMap();
|
||||
}
|
||||
|
||||
Map<String, String> result = new HashMap<>();
|
||||
for (String listItem : list) {
|
||||
String[] nvPair = listItem.split("=");
|
||||
if (nvPair == null || nvPair.length != 2) {
|
||||
logger.warning("Invalid parameters");
|
||||
continue;
|
||||
}
|
||||
result.put(nvPair[0], nvPair[1]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,4 +57,10 @@ public class DateUtil {
|
||||
Date now = new Date();
|
||||
return date.before(now) && !isToday(date);
|
||||
}
|
||||
|
||||
public static int daysFromNow(Date date) {
|
||||
long day = date.getTime() / DAY_IN_MILLIS;
|
||||
long today= new Date().getTime() / DAY_IN_MILLIS;
|
||||
return (int) (day - today);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.sap.sailing.gwt.common.client;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
|
||||
public final class LinkUtil {
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
private LinkUtil() {
|
||||
}
|
||||
|
||||
public static boolean handleLinkClick(Event event) {
|
||||
if(event.getTypeInt() != Event.ONCLICK) {
|
||||
return false;
|
||||
}
|
||||
return HYPERLINK_IMPL.handleAsClick(event);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package com.sap.sailing.gwt.common.client;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.CssResource.Shared;
|
||||
|
||||
public interface SharedResources extends ClientBundle {
|
||||
public static final SharedResources INSTANCE = GWT.create(SharedResources.class);
|
||||
@@ -14,20 +13,24 @@ public interface SharedResources extends ClientBundle {
|
||||
@Source("com/sap/sailing/gwt/home/media.gss")
|
||||
MediaCss mediaCss();
|
||||
|
||||
@Shared
|
||||
public interface MainCss extends CssResource {
|
||||
String grid();
|
||||
String stackenblochen();
|
||||
public interface MainCss extends CssResource{
|
||||
String wrapper();
|
||||
String navbar();
|
||||
String navbar_button();
|
||||
String navbar_buttonhidden();
|
||||
String navbar_buttonactive();
|
||||
String button();
|
||||
String buttonsmall();
|
||||
String buttonstrong();
|
||||
String buttoninactive();
|
||||
String buttonprimary();
|
||||
String buttonred();
|
||||
String buttonrefresh();
|
||||
String buttonsearch();
|
||||
String buttonarrowdown();
|
||||
String buttonsearch();
|
||||
String buttonarrowrightwhite();
|
||||
String label();
|
||||
String labellarge();
|
||||
String morelink();
|
||||
String dummy();
|
||||
String mainsection();
|
||||
@@ -36,22 +39,19 @@ public interface SharedResources extends ClientBundle {
|
||||
String mainsection_navigation();
|
||||
String lightbox();
|
||||
String lightbox_overlay();
|
||||
String lightbox_overlayhidden();
|
||||
String lightbox_content();
|
||||
String lightbox_contenthidden();
|
||||
String lightbox_content_enlargeditem();
|
||||
String lightbox_content_enlargeditem_caption();
|
||||
String lightbox_content_enlargeditem_close();
|
||||
String media_slideshow_controls();
|
||||
String lightbox_data();
|
||||
String lightbox_item();
|
||||
String lightbox_close();
|
||||
String stickyheader();
|
||||
String slideto();
|
||||
String slidetonav();
|
||||
String slidetoactive();
|
||||
}
|
||||
|
||||
@Shared
|
||||
public interface MediaCss extends CssResource {
|
||||
|
||||
public interface MediaCss extends CssResource{
|
||||
String grid();
|
||||
String stackenblochen();
|
||||
String column();
|
||||
String columns();
|
||||
|
||||
String small1();
|
||||
String small2();
|
||||
String small3();
|
||||
@@ -76,11 +76,14 @@ public interface SharedResources extends ClientBundle {
|
||||
String smalloffset9();
|
||||
String smalloffset10();
|
||||
String smalloffset11();
|
||||
String smallcentered();
|
||||
String smalluncentered();
|
||||
String showonsmall();
|
||||
String hideonsmall();
|
||||
|
||||
String showonmedium();
|
||||
String hideonmedium();
|
||||
String showonlarge();
|
||||
String hideonlarge();
|
||||
String smallcentered();
|
||||
String smalluncentered();
|
||||
String medium1();
|
||||
String medium2();
|
||||
String medium3();
|
||||
@@ -107,9 +110,6 @@ public interface SharedResources extends ClientBundle {
|
||||
String mediumoffset11();
|
||||
String mediumcentered();
|
||||
String mediumuncentered();
|
||||
String showonmedium();
|
||||
String hideonmedium();
|
||||
|
||||
String large1();
|
||||
String large2();
|
||||
String large3();
|
||||
@@ -136,9 +136,5 @@ public interface SharedResources extends ClientBundle {
|
||||
String largeoffset11();
|
||||
String largecentered();
|
||||
String largeuncentered();
|
||||
String showonlarge();
|
||||
String hideonlarge();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
@CHARSET "UTF-8";
|
||||
|
||||
.event_header__breadcrumb {
|
||||
font-size: 15px;
|
||||
font-size: 1rem;
|
||||
font-size: 0.866666666666667em;
|
||||
font-weight: 600;
|
||||
padding: 0.666666666666667em 0;
|
||||
}
|
||||
|
||||
.event_header__breadcrumb__item {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: 1.923076923076923em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.event_header__breadcrumb__item:before {
|
||||
content: ' ';
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAUCAYAAAC58NwRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2OUUzNjU2OTYyN0ExMUU0OTkzRUFBMUUyRUFGQjM4NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2OUUzNjU2QTYyN0ExMUU0OTkzRUFBMUUyRUFGQjM4NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjY5RTM2NTY3NjI3QTExRTQ5OTNFQUExRTJFQUZCMzg3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjY5RTM2NTY4NjI3QTExRTQ5OTNFQUExRTJFQUZCMzg3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+yfJlBgAAAK5JREFUeNpinDlz5goGBgZXIM4F4mUMBAATEDsBsRAQLwLiKGI0RADxdyBmJkYTSMM+IPYkVhMTlD5IrCYmJDZRmpjQ+CBNbvg0MWGx9Qg+TUw4/IZTExOeEIRp+oKkSZeJgTTAhk+DDRBvB2IeIP4LxIlAfJaJBMWLQRIsOBTvAmJOdMXYPI1XMboGe0KKkTXYQ92MVzFyfiBKMUzDCmIVI+eHd0AcR0gxCAAEGACmPjby/HEDIgAAAABJRU5ErkJggg==");
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
position: absolute;
|
||||
background-size: contain;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
left: 0.666666666666667em;
|
||||
}
|
||||
.event_header__breadcrumb__item:first-of-type {
|
||||
padding-left: 0;
|
||||
}
|
||||
.event_header__breadcrumb__item:first-of-type:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.sap.sailing.gwt.common.client.controls.tabbar;
|
||||
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.safehtml.shared.SafeUri;
|
||||
import com.google.gwt.safehtml.shared.UriUtils;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.EventListener;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.LinkUtil;
|
||||
|
||||
/**
|
||||
* @author zhorvath
|
||||
*
|
||||
*/
|
||||
public class BreadcrumbPane extends Widget {
|
||||
|
||||
interface Resources extends ClientBundle {
|
||||
@Source("Breadcrumb.css")
|
||||
Style style();
|
||||
}
|
||||
|
||||
interface Style extends CssResource {
|
||||
|
||||
String event_header__breadcrumb();
|
||||
|
||||
String event_header__breadcrumb__item();
|
||||
|
||||
}
|
||||
|
||||
private static Resources resources;
|
||||
|
||||
private static Resources getResources() {
|
||||
if (resources == null) {
|
||||
resources = GWT.create(Resources.class);
|
||||
resources.style().ensureInjected();
|
||||
}
|
||||
return resources;
|
||||
}
|
||||
|
||||
private final Style style = getResources().style();
|
||||
|
||||
private final DivElement breadcrumDiv;
|
||||
|
||||
public BreadcrumbPane() {
|
||||
breadcrumDiv = Document.get().createDivElement();
|
||||
breadcrumDiv.addClassName(style.event_header__breadcrumb());
|
||||
|
||||
setElement(breadcrumDiv);
|
||||
}
|
||||
|
||||
public void addBreadcrumbItem(String title, String link, final Runnable runnable) {
|
||||
addBreadcrumbItem(title, UriUtils.fromString(link), runnable);
|
||||
}
|
||||
|
||||
public void addBreadcrumbItem(String title, SafeUri link, final Runnable runnable) {
|
||||
AnchorElement breadcrumItem = Document.get().createAnchorElement();
|
||||
breadcrumItem.setHref(link);
|
||||
breadcrumItem.setInnerText(title);
|
||||
breadcrumItem.addClassName(style.event_header__breadcrumb__item());
|
||||
|
||||
breadcrumDiv.appendChild(breadcrumItem);
|
||||
|
||||
Event.sinkEvents(breadcrumItem, Event.ONCLICK);
|
||||
Event.setEventListener(breadcrumItem, new EventListener() {
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
if (LinkUtil.handleLinkClick(event)) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
runnable.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.sap.sailing.gwt.common.client.controls.tabbar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.EventTarget;
|
||||
import com.google.gwt.event.logical.shared.HasSelectionHandlers;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.LinkUtil;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources;
|
||||
import com.sap.sailing.gwt.common.client.SharedResources.MainCss;
|
||||
|
||||
/**
|
||||
* Capsulates functionality for a tab bar.
|
||||
*
|
||||
* @author zhorvath
|
||||
*
|
||||
*/
|
||||
public class TabBar extends Widget implements HasSelectionHandlers<Class<Place>> {
|
||||
|
||||
private final MainCss style = SharedResources.INSTANCE.mainCss();
|
||||
|
||||
private final List<Class<Place>> knownPlaceClasses = new ArrayList<>();
|
||||
private final DivElement tabBarDiv;
|
||||
|
||||
public TabBar() {
|
||||
tabBarDiv = Document.get().createDivElement();
|
||||
tabBarDiv.addClassName(style.navbar());
|
||||
|
||||
setElement(tabBarDiv);
|
||||
|
||||
sinkEvents(Event.ONCLICK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBrowserEvent(Event event) {
|
||||
EventTarget eventTarget = event.getEventTarget();
|
||||
|
||||
if (Element.is(eventTarget)) {
|
||||
// An event target can be any JavaScript object, but we are interested in events related to DOM events only
|
||||
Element element = eventTarget.cast();
|
||||
|
||||
if (LinkUtil.handleLinkClick(event)) {
|
||||
// The user clicked somewhere into the tab bar -> we have to find the tab that was clicked
|
||||
for (int i = 0; i < tabBarDiv.getChildCount(); i++) {
|
||||
if (tabBarDiv.getChild(i).isOrHasChild(element)) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
// the specific tab was clicked -> fire SelectionEvent with the associated place
|
||||
GWT.log("Found " + knownPlaceClasses.get(i));
|
||||
SelectionEvent.fire(this, knownPlaceClasses.get(i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.onBrowserEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Selects the tab associated with the given place.
|
||||
*
|
||||
* @param place
|
||||
* the place that should get selected.
|
||||
*/
|
||||
public void select(Place place) {
|
||||
GWT.log("Should activate: " + place.getClass().getName());
|
||||
// remove all previous selections
|
||||
for (int i = 0; i < tabBarDiv.getChildCount(); i++) {
|
||||
Element.as(tabBarDiv.getChild(i)).removeClassName(style.navbar_buttonactive());
|
||||
}
|
||||
// find the tab that has to be selected for the given place
|
||||
for (int i = 0; i < knownPlaceClasses.size(); i++) {
|
||||
if (place.getClass().equals(knownPlaceClasses.get(i))) {
|
||||
GWT.log("Activate: " + place.getClass().getName());
|
||||
// found the associated tab -> set the selected style.
|
||||
Element.as(tabBarDiv.getChild(i)).addClassName(style.navbar_buttonactive());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a tab with an associated place to be fired when the tab is selected
|
||||
*
|
||||
* TODO: create custom widget for tab
|
||||
*
|
||||
* @param title
|
||||
* the label of the tab header.
|
||||
* @param place
|
||||
* the place that should be associated with the tab.
|
||||
*/
|
||||
public void addTab(String title, Class<Place> place, String link) {
|
||||
AnchorElement tabElement = Document.get().createAnchorElement();
|
||||
tabElement.setHref(link);
|
||||
tabElement.setInnerText(title);
|
||||
tabElement.addClassName(style.navbar_button());
|
||||
|
||||
tabBarDiv.appendChild(tabElement);
|
||||
knownPlaceClasses.add(place);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public HandlerRegistration addSelectionHandler(SelectionHandler<Class<Place>> handler) {
|
||||
return addHandler(handler, SelectionEvent.getType());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
package com.sap.sailing.gwt.common.client.controls.tabbar;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceHistoryMapper;
|
||||
import com.google.gwt.safehtml.shared.SafeUri;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiChild;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView.State;
|
||||
|
||||
/**
|
||||
* Defines whole layout for site, including the header with the breadcrumbs and tab bar, and the content.
|
||||
* <p/>
|
||||
* Created by pgtaboada on 25.11.14.
|
||||
*/
|
||||
|
||||
public class TabPanel<PRESENTER> extends Composite {
|
||||
private static TabPanelUiBinder ourUiBinder = GWT.create(TabPanelUiBinder.class);
|
||||
private final Map<Class<Place>, TabView<Place, PRESENTER>> knownTabs = new LinkedHashMap<>();
|
||||
private final Map<Class<Place>, String> knownTabTitles = new HashMap<>();
|
||||
|
||||
@UiField
|
||||
SimplePanel additionalHeader;
|
||||
@UiField
|
||||
SimplePanel tabContentPanelUi;
|
||||
@UiField
|
||||
TabBar tabBar;
|
||||
@UiField BreadcrumbPane breadcrumbs;
|
||||
@UiField FlowPanel tabExtension;
|
||||
private TabView<Place, PRESENTER> currentTab;
|
||||
|
||||
|
||||
private final PlaceHistoryMapper historyMapper;
|
||||
private final PRESENTER presenter;
|
||||
|
||||
public TabPanel(PRESENTER presenter, PlaceHistoryMapper historyMapper) {
|
||||
this.presenter = presenter;
|
||||
this.historyMapper = historyMapper;
|
||||
initWidget(ourUiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public TabView<?, PRESENTER> getCurrentTab() {
|
||||
return currentTab;
|
||||
}
|
||||
|
||||
@UiChild
|
||||
public void addHeader(Widget widget) {
|
||||
additionalHeader.setWidget(widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds all tabs to the tab bar.
|
||||
*
|
||||
* @param tab
|
||||
* The tab to add
|
||||
* @param title
|
||||
* The label for the tab.
|
||||
*/
|
||||
@UiChild
|
||||
public void addTabContent(final TabView<Place, PRESENTER> tab, String title) {
|
||||
|
||||
GWT.log("Adding TAB: " + title);
|
||||
|
||||
// TODO: check if place class already known, reject...
|
||||
tab.setPresenter(presenter);
|
||||
final Class<Place> classForActivation = tab.getPlaceClassForActivation();
|
||||
knownTabs.put(classForActivation, tab);
|
||||
knownTabTitles.put(classForActivation, title);
|
||||
|
||||
if(tab.getState() == State.VISIBLE) {
|
||||
String link = "#" + historyMapper.getToken(tab.placeToFire());
|
||||
tabBar.addTab(title, classForActivation, link);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles given SelectionEvent, when tab is clicked. Fires a TabPanelPlaceSelectionEvent. The listener to this
|
||||
* event should properly fire place change events.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
@UiHandler("tabBar")
|
||||
void onTabSelection(SelectionEvent<Class<Place>> event) {
|
||||
|
||||
TabView<?, PRESENTER> selectedTabActivity = knownTabs.get(event.getSelectedItem());
|
||||
if (selectedTabActivity != null) {
|
||||
GWT.log("Tab selection: " + selectedTabActivity.getPlaceClassForActivation().getName());
|
||||
if (currentTab != null) {
|
||||
currentTab.stop();
|
||||
}
|
||||
fireEvent(new TabPanelPlaceSelectionEvent(selectedTabActivity));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the tab Activity and selects the tab based on the given Place.
|
||||
*
|
||||
* @param placeToGo
|
||||
* the given place.
|
||||
*/
|
||||
public void activatePlace(Place placeToGo) {
|
||||
if (knownTabs.containsKey(placeToGo.getClass())) {
|
||||
final TabView<Place, PRESENTER> newTab = knownTabs.get(placeToGo.getClass());
|
||||
|
||||
if (newTab.getState() == State.NOT_AVAILABLE_REDIRECT
|
||||
|| newTab.getState() == State.NOT_AVAILABLE_SHOW_NEXT_AVAILABLE) {
|
||||
for(TabView<Place, PRESENTER> tab : knownTabs.values()) {
|
||||
if(tab.getState() == State.VISIBLE) {
|
||||
// TODO is this redirect wanted? Just silently select another tab?
|
||||
if (currentTab != null) {
|
||||
currentTab.stop();
|
||||
}
|
||||
|
||||
if (newTab.getState() == State.NOT_AVAILABLE_REDIRECT) {
|
||||
fireEvent(new TabPanelPlaceSelectionEvent(tab));
|
||||
} else {
|
||||
activatePlace(tab.placeToFire());
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newTab.start(placeToGo, tabContentPanelUi);
|
||||
tabBar.select(placeToGo);
|
||||
|
||||
currentTab = newTab;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Directly sets the content of the current widget until it is reloaded/ reset
|
||||
*
|
||||
* @param widget
|
||||
*/
|
||||
public void overrideCurrentContentInTab(IsWidget widget) {
|
||||
tabContentPanelUi.setWidget(widget);
|
||||
}
|
||||
|
||||
public void addBreadcrumbItem(String title, String link, final Runnable runnable) {
|
||||
breadcrumbs.addBreadcrumbItem(title, link, runnable);
|
||||
}
|
||||
|
||||
public void addBreadcrumbItem(String title, SafeUri link, final Runnable runnable) {
|
||||
breadcrumbs.addBreadcrumbItem(title, link, runnable);
|
||||
}
|
||||
|
||||
public HandlerRegistration addTabPanelPlaceSelectionEventHandler(TabPanelPlaceSelectionEvent.Handler handler) {
|
||||
return addHandler(handler, TabPanelPlaceSelectionEvent.TYPE);
|
||||
}
|
||||
|
||||
interface TabPanelUiBinder extends UiBinder<FlowPanel, TabPanel<?>> {
|
||||
}
|
||||
|
||||
public String getCurrentTabTitle() {
|
||||
if (currentTab == null)
|
||||
return null;
|
||||
return knownTabTitles.get(currentTab.getPlaceClassForActivation());
|
||||
}
|
||||
|
||||
@UiChild
|
||||
public void addTabExtension(IsWidget widget) {
|
||||
tabExtension.add(widget);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||
xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:c="urn:import:com.sap.sailing.gwt.common.client.controls.tabbar">
|
||||
<ui:with field="res"
|
||||
type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:style>
|
||||
.header {
|
||||
position: relative;
|
||||
font-size: 1rem;
|
||||
color: #666;
|
||||
background: #f2f2f2;
|
||||
border-bottom: 1px solid #dedede;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
font-size: 1rem;
|
||||
/* @alternate */ font-size: 0.866666666666667em;
|
||||
font-weight: 600;
|
||||
padding: 0.666666666666667em 0;
|
||||
}
|
||||
|
||||
.back:hover {
|
||||
background-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
/* font-size: 0; */
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.navigation a{
|
||||
border-top-left-radius:4px;
|
||||
border-top-right-radius:4px;
|
||||
}
|
||||
.tabExtension {
|
||||
float: right;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
</ui:style>
|
||||
<g:FlowPanel>
|
||||
<g:HTMLPanel addStyleNames="{style.header}">
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<c:BreadcrumbPane ui:field="breadcrumbs"
|
||||
addStyleNames="{style.breadcrumb}" />
|
||||
</div>
|
||||
</div>
|
||||
<g:SimplePanel ui:field="additionalHeader" />
|
||||
<div class="{res.mediaCss.grid}">
|
||||
<div class="{res.mediaCss.small12} {res.mediaCss.columns}">
|
||||
<g:FlowPanel ui:field="tabExtension" addStyleNames="{style.tabExtension}" />
|
||||
<c:TabBar ui:field="tabBar"
|
||||
addStyleNames="{style.navigation}" />
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
<g:SimplePanel ui:field="tabContentPanelUi"
|
||||
addStyleNames="{style.content}" />
|
||||
</g:FlowPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.sap.sailing.gwt.common.client.controls.tabbar;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
|
||||
/**
|
||||
* Created by pgtaboada on 01.12.14.
|
||||
*/
|
||||
public class TabPanelPlaceSelectionEvent extends GwtEvent<TabPanelPlaceSelectionEvent.Handler> {
|
||||
|
||||
public final static Type<Handler> TYPE = new Type<Handler>();
|
||||
|
||||
private TabView<?, ?> selectedActivity;
|
||||
|
||||
public TabPanelPlaceSelectionEvent(TabView<?, ?> selectedActivity) {
|
||||
this.selectedActivity = selectedActivity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<Handler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public TabView<?, ?> getSelectedActivity() {
|
||||
return selectedActivity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(Handler handler) {
|
||||
|
||||
handler.onTabSelected(this);
|
||||
}
|
||||
|
||||
public interface Handler extends EventHandler {
|
||||
|
||||
void onTabSelected(TabPanelPlaceSelectionEvent event);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.sap.sailing.gwt.common.client.controls.tabbar;
|
||||
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
|
||||
/**
|
||||
* Defines lifecycle handling for the tab view.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* Created by pgtaboada on 25.11.14.
|
||||
*/
|
||||
public interface TabView<PLACE extends Place, PRESENTER> {
|
||||
|
||||
public enum State {
|
||||
VISIBLE, INVISIBLE, NOT_AVAILABLE_REDIRECT, NOT_AVAILABLE_SHOW_NEXT_AVAILABLE
|
||||
}
|
||||
|
||||
/**
|
||||
* The place type that activates this tab.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<PLACE> getPlaceClassForActivation();
|
||||
|
||||
/**
|
||||
* Lifecycle method that triggers tab view start
|
||||
*
|
||||
* @param placeToGo
|
||||
* @param contentArea
|
||||
*/
|
||||
void start(PLACE requestedPlace, AcceptsOneWidget contentArea);
|
||||
|
||||
void setPresenter(PRESENTER presenter);
|
||||
|
||||
/**
|
||||
* Tells the tab that it is going to be deactiviated (not visible anymore), because of tab switch
|
||||
*/
|
||||
void stop();
|
||||
|
||||
PLACE placeToFire();
|
||||
|
||||
// TODO implement as defender method when Java 8 is ready as this is "VISIBLE" in most cases
|
||||
State getState();
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.sap.sailing.gwt.common.client.i18n;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.i18n.client.LocalizableResource.DefaultLocale;
|
||||
import com.google.gwt.i18n.client.Messages;
|
||||
|
||||
|
||||
@DefaultLocale("en")
|
||||
public interface TextMessages extends Messages {
|
||||
public static final TextMessages INSTANCE = GWT.create(TextMessages.class);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ eventHeaderOverview=Overview
|
||||
eventHeaderRaces=Schedule
|
||||
eventHeaderRegattas=Regattas
|
||||
seriesHeaderOverview=About the Series
|
||||
seriesHeaderUpcoming=Upcoming Events
|
||||
seriesHeaderUpcoming=Upcoming
|
||||
seriesHeaderRecent=Recent Events
|
||||
seriesHeaderLeaderboard=Leaderboard
|
||||
seriesOverviewHeaderRecent=Latest Series Events
|
||||
@@ -113,15 +113,15 @@ eventRegattaRacesLegendAudio=Audio Stream
|
||||
eventSponsorsTitle=Event Sponsorships
|
||||
footerJobs=Jobs
|
||||
footerCopyright=\u00A9 2015 SAP Sailing Analytics
|
||||
footerLanguage=SAP Sailing offered in
|
||||
footerLanguage=SAP Sailing in
|
||||
footerLegal=Legal Disclosure
|
||||
footerPrivacy=Privacy
|
||||
footerFeedback=Feedback
|
||||
headerEvents=Events
|
||||
headerHome=Home
|
||||
headerLogo=SAP Sailing Analytics
|
||||
headerLogo=Sailing Analytics
|
||||
headerSearch=Search
|
||||
headerSearchPlaceholder=Search SAPSailing.com
|
||||
headerSearchPlaceholder=Search
|
||||
headerSolutions=Solutions
|
||||
headerSponsoring=Sponsoring
|
||||
latestRaceResultsHeadline=Latest Official Race Results
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
chartSelectionHint=Hinweis: Sie können auch Ergebnisstabelle (im Menü ERGEBNISSE) nutzen, um die im Diagramm angezeigten Teilnehmer auszuwählen.
|
||||
chartSelectionHint=Hinweis: Sie können auch Ergebnisstabelle (im Menü ERGEBNISSE) nutzen, um die im Diagramm angezeigten Teilnehmer auszuwählen.
|
||||
chooseALanguage=Wähle eine Sprache
|
||||
events=Veranstaltungen
|
||||
home=Startseite
|
||||
@@ -13,7 +13,7 @@ officalEventWebsite=Offizielle Internetseite
|
||||
leg=Schenkel
|
||||
races=Rennen
|
||||
moreInfo=Weitere Informationen
|
||||
viewAnalysis=Analyzen ansehen
|
||||
viewAnalysis=Analysen ansehen
|
||||
overallLeaderboard=Gesamtergebnis
|
||||
pleaseEnterASearchTerm=Bitte gebe einen Suchbegriff ein.
|
||||
pleaseTryAgain=Bitte versuchen sie es erneut...
|
||||
@@ -30,7 +30,7 @@ regattaLeaderboards=Regattaergebnisse
|
||||
features=Funktionen
|
||||
releaseNotes=Anmerkungen zur Version
|
||||
whatsNew=Neuigkeiten
|
||||
overview=Übersicht
|
||||
overview=Übersicht
|
||||
sapSailing=SAP Sailing
|
||||
search=Suche
|
||||
startSimulator=Simulator starten
|
||||
@@ -66,7 +66,7 @@ eventHeaderOverview=Übersicht
|
||||
eventHeaderRaces=Zeitplan
|
||||
eventHeaderRegattas=Regatten
|
||||
seriesHeaderOverview=Über die Serie
|
||||
seriesHeaderUpcoming=Noch kommende Veranstaltungen
|
||||
seriesHeaderUpcoming=Demnächst
|
||||
seriesHeaderRecent=Letzte Veranstaltungen
|
||||
seriesHeaderLeaderboard=Ergebnisliste
|
||||
seriesOverviewHeaderRecent=Letzte Serienveranstaltungen
|
||||
@@ -98,7 +98,7 @@ eventRegattaLeaderboardRegattaRank=Platz in der Regatta
|
||||
eventRegattaLeaderboardTotalPoints=Gesamtpunkte
|
||||
eventRegattaRaceWatch=Live ansehen
|
||||
eventRegattaRaceAnalyse=Rennen analysieren
|
||||
eventRegattaRaceNotTracked=Nicht getracked
|
||||
eventRegattaRaceNotTracked=Nicht getrackt
|
||||
eventRegattaRaceFinished=Beendet um:
|
||||
eventRegattaRaceStarted=Gestartet um:
|
||||
eventRegattaRaceScheduled=Geplant um:
|
||||
@@ -119,7 +119,7 @@ footerPrivacy=Datenschutz
|
||||
footerFeedback=Feedback
|
||||
headerEvents=Veranstaltungen
|
||||
headerHome=Startseite
|
||||
headerLogo=SAP Sailing Analytics
|
||||
headerLogo=Sailing Analytics
|
||||
headerSearch=Suche in SAPSailing.com
|
||||
headerSearchPlaceholder=Suche
|
||||
headerSolutions=Lösungen
|
||||
@@ -134,7 +134,7 @@ leaderboardQuickAccessLabel=Ergebnisliste Schnellzugang
|
||||
mainEventShowAll=Zeige alle Veranstaltungen
|
||||
mainEventTitle=Die letzten Veranstaltungen aus der Segelwelt
|
||||
mainMediaSubtitle=Hier gibt es die aktuellsten und schönsten Impressionen aus deiner beliebtesten Segelveranstaltung.
|
||||
mainMediaTitle=Segeln liebt Fotographie
|
||||
mainMediaTitle=Segeln liebt Fotografie
|
||||
mainMediaVideosSubtitle=Tauche ein in die Welt des Segelns und besuche auch die anderen Veranstaltungen für mehr Videos.
|
||||
mainMediaVideosTitle= Die Letzten Videoeinträge
|
||||
mainSponsorsReadMore=Lese mehr
|
||||
@@ -142,7 +142,7 @@ mediaTeaserPhotosTitle=Fotos
|
||||
mediaTeaserVideosTitle=Videos
|
||||
regattaCompetitors=Teilnehmer
|
||||
regattaRaces=Rennen
|
||||
regattaTracked=Getracked
|
||||
regattaTracked=Getrackt
|
||||
regattaRegattaStarts=Regatta wird starten
|
||||
regattaPts=Pkt.
|
||||
regattaCourse=Kurs
|
||||
|
||||
@@ -16,6 +16,7 @@ public class HomeEntryPoint extends AbstractMvpEntryPoint<StringMessages> {
|
||||
public void doOnModuleLoad() {
|
||||
ApplicationClientFactory clientFactory = GWT.create(ApplicationClientFactory.class);
|
||||
EntryPointHelper.registerASyncService((ServiceDefTarget) clientFactory.getSailingService(), RemoteServiceMappingConstants.sailingServiceRemotePath);
|
||||
EntryPointHelper.registerASyncService((ServiceDefTarget) clientFactory.getHomeService(), RemoteServiceMappingConstants.homeServiceRemotePath);
|
||||
ApplicationHistoryMapper applicationHistoryMapper = GWT.create(ApplicationHistoryMapper.class);
|
||||
initMvp(clientFactory, applicationHistoryMapper, new ApplicationActivityMapper(clientFactory));
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.sap.sailing.gwt.home.client;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.user.client.rpc.RemoteService;
|
||||
import com.sap.sailing.gwt.ui.shared.eventlist.EventListViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.fakeseries.EventSeriesViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.start.StartViewDTO;
|
||||
|
||||
public interface HomeService extends RemoteService {
|
||||
EventViewDTO getEventViewById(UUID id);
|
||||
|
||||
EventSeriesViewDTO getEventSeriesViewById(UUID id);
|
||||
|
||||
MediaDTO getMediaForEvent(UUID eventId);
|
||||
|
||||
MediaDTO getMediaForEventSeries(UUID seriesId);
|
||||
|
||||
EventListViewDTO getEventListView() throws Exception;
|
||||
|
||||
StartViewDTO getStartView() throws Exception;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.sap.sailing.gwt.home.client;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.gwt.ui.shared.eventlist.EventListViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.fakeseries.EventSeriesViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.start.StartViewDTO;
|
||||
|
||||
|
||||
/**
|
||||
* The async counterpart of {@link HomeService}
|
||||
*/
|
||||
public interface HomeServiceAsync {
|
||||
void getEventViewById(UUID id, AsyncCallback<EventViewDTO> callback);
|
||||
|
||||
void getEventSeriesViewById(UUID id, AsyncCallback<EventSeriesViewDTO> asyncCallback);
|
||||
|
||||
void getMediaForEvent(UUID eventId, AsyncCallback<MediaDTO> callback);
|
||||
|
||||
void getMediaForEventSeries(UUID seriesId, AsyncCallback<MediaDTO> callback);
|
||||
|
||||
void getEventListView(AsyncCallback<EventListViewDTO> callback);
|
||||
|
||||
void getStartView(AsyncCallback<StartViewDTO> callback);
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.HomeService;
|
||||
import com.sap.sailing.gwt.home.client.HomeServiceAsync;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.ui.client.MediaService;
|
||||
import com.sap.sailing.gwt.ui.client.MediaServiceAsync;
|
||||
@@ -14,6 +16,7 @@ import com.sap.sse.security.ui.client.SecureClientFactoryImpl;
|
||||
|
||||
public abstract class AbstractApplicationClientFactory extends SecureClientFactoryImpl implements ApplicationClientFactory {
|
||||
private final SailingServiceAsync sailingService;
|
||||
private final HomeServiceAsync homeService;
|
||||
private final MediaServiceAsync mediaService;
|
||||
private final HomePlacesNavigator navigator;
|
||||
|
||||
@@ -21,6 +24,7 @@ public abstract class AbstractApplicationClientFactory extends SecureClientFacto
|
||||
super(root, eventBus, placeController);
|
||||
navigator = new HomePlacesNavigator(placeController);
|
||||
sailingService = GWT.create(SailingService.class);
|
||||
homeService = GWT.create(HomeService.class);
|
||||
mediaService = GWT.create(MediaService.class);
|
||||
}
|
||||
|
||||
@@ -34,6 +38,11 @@ public abstract class AbstractApplicationClientFactory extends SecureClientFacto
|
||||
return sailingService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HomeServiceAsync getHomeService() {
|
||||
return homeService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MediaServiceAsync getMediaService() {
|
||||
return mediaService;
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.google.gwt.user.client.History;
|
||||
import com.google.gwt.user.client.Window;
|
||||
|
||||
public abstract class AbstractPlaceNavigator implements PlaceNavigator {
|
||||
protected final PlaceController placeController;
|
||||
public final static String DEFAULT_SAPSAILING_SERVER = "www.sapsailing.com";
|
||||
public final static String DEFAULT_SAPSAILING_SERVER_URL = "http://" + DEFAULT_SAPSAILING_SERVER;
|
||||
|
||||
private final ApplicationHistoryMapper mapper = GWT.create(ApplicationHistoryMapper.class);
|
||||
|
||||
public final static String DEFAULT_SAPSAILING_SERVER = "www.sapsailing.com";
|
||||
public final static String DEFAULT_SAPSAILING_DEV_SERVER = "dev.sapsailing.com";
|
||||
public final static String DEFAULT_SAPSAILING_SERVER_URL = "http://" + DEFAULT_SAPSAILING_SERVER;
|
||||
|
||||
protected AbstractPlaceNavigator(PlaceController placeController) {
|
||||
this.placeController = placeController;
|
||||
@@ -25,20 +29,24 @@ public abstract class AbstractPlaceNavigator implements PlaceNavigator {
|
||||
}
|
||||
}
|
||||
|
||||
protected <T extends Place> PlaceNavigation<T> createLocalPlaceNavigation(T destinationPlace, PlaceTokenizer<T> tokenizer) {
|
||||
return new PlaceNavigation<T>(null, destinationPlace, tokenizer, false);
|
||||
protected <T extends Place> PlaceNavigation<T> createLocalPlaceNavigation(T destinationPlace) {
|
||||
return new PlaceNavigation<T>(null, destinationPlace, false, this);
|
||||
}
|
||||
|
||||
protected <T extends Place> PlaceNavigation<T> createGlobalPlaceNavigation(T destinationPlace, PlaceTokenizer<T> tokenizer) {
|
||||
return new PlaceNavigation<T>(destinationPlace, tokenizer);
|
||||
|
||||
protected <T extends Place> PlaceNavigation<T> createGlobalPlaceNavigation(T destinationPlace) {
|
||||
return new PlaceNavigation<T>(destinationPlace, this);
|
||||
}
|
||||
|
||||
protected <T extends Place> PlaceNavigation<T> createPlaceNavigation(String baseUrl, boolean isOnRemoteServer, T destinationPlace, PlaceTokenizer<T> tokenizer) {
|
||||
return new PlaceNavigation<T>(baseUrl, destinationPlace, tokenizer, isOnRemoteServer);
|
||||
|
||||
protected <T extends Place> PlaceNavigation<T> createPlaceNavigation(String baseUrl, boolean isOnRemoteServer,
|
||||
T destinationPlace) {
|
||||
return new PlaceNavigation<T>(baseUrl, destinationPlace, isOnRemoteServer, this);
|
||||
}
|
||||
|
||||
public <T extends Place> void pushPlaceToHistoryStack(T destinationPlace, PlaceTokenizer<T> tokenizer) {
|
||||
String placeHistoryToken = destinationPlace.getClass().getSimpleName() + ":" + tokenizer.getToken(destinationPlace);
|
||||
|
||||
|
||||
public <T extends Place> void pushPlaceToHistoryStack(T destinationPlace) {
|
||||
String placeHistoryToken = mapper.getToken(destinationPlace);
|
||||
History.newItem(placeHistoryToken, false);
|
||||
}
|
||||
}
|
||||
@@ -7,16 +7,33 @@ import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.AbstractSeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesContext;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesLeaderboardsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesOverallLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsActivityProxy;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringActivityProxy;
|
||||
@@ -38,10 +55,19 @@ public class ApplicationActivityMapper implements ActivityMapper {
|
||||
public Activity getActivity(Place place) {
|
||||
if (place instanceof AboutUsPlace) {
|
||||
return new AboutUsActivityProxy((AboutUsPlace) place, clientFactory);
|
||||
} else if (place instanceof ErrorPlace) {
|
||||
return new ErrorActivityProxy((ErrorPlace) place, clientFactory);
|
||||
} else if (place instanceof ContactPlace) {
|
||||
return new ContactActivityProxy((ContactPlace) place, clientFactory);
|
||||
} else if (place instanceof EventPlace) {
|
||||
return new EventActivityProxy((EventPlace) place, clientFactory);
|
||||
// return new EventActivityProxy((EventPlace) place, clientFactory);
|
||||
// rerouting old place to new place to make bookmarked URLs to work with the new interface.
|
||||
return getActivity(getRealEventPlace((EventPlace) place));
|
||||
} else if (place instanceof AbstractEventPlace) {
|
||||
AbstractEventPlace eventPlace = (AbstractEventPlace) place;
|
||||
return new EventActivityProxy(eventPlace, clientFactory, clientFactory.getHomePlacesNavigator());
|
||||
} else if (place instanceof AbstractSeriesPlace) {
|
||||
return new com.sap.sailing.gwt.home.client.place.fakeseries.SeriesActivityProxy((AbstractSeriesPlace) place, clientFactory, clientFactory.getHomePlacesNavigator());
|
||||
} else if (place instanceof EventsPlace) {
|
||||
return new EventsActivityProxy((EventsPlace) place, clientFactory);
|
||||
} else if (place instanceof StartPlace) {
|
||||
@@ -53,13 +79,93 @@ public class ApplicationActivityMapper implements ActivityMapper {
|
||||
} else if (place instanceof WhatsNewPlace) {
|
||||
return new WhatsNewActivityProxy((WhatsNewPlace) place, clientFactory);
|
||||
} else if (place instanceof RegattaPlace) {
|
||||
return new RegattaActivityProxy((RegattaPlace) place, clientFactory);
|
||||
// return new RegattaActivityProxy((RegattaPlace) place, clientFactory);
|
||||
// rerouting old place to new place to make bookmarked URLs to work with the new interface.
|
||||
return getActivity(getRealRegattaPlace((RegattaPlace) place));
|
||||
} else if (place instanceof SeriesPlace) {
|
||||
return new SeriesActivityProxy((SeriesPlace) place, clientFactory);
|
||||
// return new SeriesActivityProxy((SeriesPlace) place, clientFactory);
|
||||
// rerouting old place to new place to make bookmarked URLs to work with the new interface.
|
||||
return getActivity(getRealSeriesPlace((SeriesPlace) place));
|
||||
} else if (place instanceof SearchResultPlace) {
|
||||
return new SearchResultActivityProxy((SearchResultPlace) place, clientFactory);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private Place getRealRegattaPlace(RegattaPlace place) {
|
||||
String eventId = place.getEventUuidAsString();
|
||||
if(eventId == null || eventId.isEmpty()) {
|
||||
return new EventsPlace();
|
||||
}
|
||||
EventContext eventContext = new EventContext().withId(eventId);
|
||||
String regattaId = place.getLeaderboardIdAsNameString();
|
||||
boolean hasRegattaId = (regattaId != null && !regattaId.isEmpty());
|
||||
|
||||
// TODO evaluate additional parameters
|
||||
|
||||
if(hasRegattaId) {
|
||||
switch (place.getNavigationTab()) {
|
||||
case CompetitorAnalytics:
|
||||
return new RegattaCompetitorAnalyticsPlace(eventContext);
|
||||
case Leaderboard:
|
||||
return new RegattaLeaderboardPlace(eventContext);
|
||||
}
|
||||
}
|
||||
return new EventDefaultPlace(eventContext);
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
private Place getRealEventPlace(EventPlace place) {
|
||||
String eventId = place.getEventUuidAsString();
|
||||
if(eventId == null || eventId.isEmpty()) {
|
||||
return new EventsPlace();
|
||||
}
|
||||
EventContext eventContext = new EventContext().withId(eventId);
|
||||
String regattaId = place.getLeaderboardIdAsNameString();
|
||||
boolean hasRegattaId = (regattaId != null && !regattaId.isEmpty());
|
||||
if(hasRegattaId) {
|
||||
eventContext.withRegattaId(regattaId);
|
||||
|
||||
switch (place.getNavigationTab()) {
|
||||
case Media:
|
||||
return new RegattaMediaPlace(eventContext);
|
||||
case Overview:
|
||||
return new RegattaOverviewPlace(eventContext);
|
||||
case Regatta:
|
||||
return new RegattaRacesPlace(eventContext);
|
||||
}
|
||||
} else {
|
||||
switch (place.getNavigationTab()) {
|
||||
// TODO some places aren't implemented yet
|
||||
case Media:
|
||||
return new MultiregattaMediaPlace(eventContext);
|
||||
case Overview:
|
||||
return new MultiregattaOverviewPlace(eventContext);
|
||||
case Schedule:
|
||||
// Schedule not implemented yet -> using race list
|
||||
case Regattas:
|
||||
return new MultiregattaRegattasPlace(eventContext);
|
||||
}
|
||||
}
|
||||
|
||||
return new EventDefaultPlace(eventContext);
|
||||
}
|
||||
|
||||
private Place getRealSeriesPlace(SeriesPlace place) {
|
||||
String seriesId = place.getEventUuidAsString();
|
||||
SeriesContext context = new SeriesContext().withId(seriesId);
|
||||
|
||||
// TODO evaluate additional parameters
|
||||
|
||||
switch (place.getNavigationTab()) {
|
||||
case OverallLeaderboard:
|
||||
return new EventSeriesOverallLeaderboardPlace(context);
|
||||
case RegattaLeaderboards:
|
||||
return new EventSeriesLeaderboardsPlace(context);
|
||||
case CompetitorAnalytics:
|
||||
return new EventSeriesCompetitorAnalyticsPlace(context);
|
||||
}
|
||||
return new SeriesDefaultPlace(context);
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,11 @@ package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartClientFactory;
|
||||
@@ -14,6 +14,6 @@ import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewClientFactory;
|
||||
|
||||
public interface ApplicationClientFactory extends AboutUsClientFactory, ContactClientFactory, EventClientFactory,
|
||||
EventsClientFactory, StartClientFactory, SponsoringClientFactory, SolutionsClientFactory, SearchResultClientFactory,
|
||||
WhatsNewClientFactory, RegattaClientFactory, SeriesClientFactory {
|
||||
WhatsNewClientFactory, SeriesClientFactory, ErrorClientFactory {
|
||||
HomePlacesNavigator getHomePlacesNavigator();
|
||||
}
|
||||
@@ -4,18 +4,56 @@ import com.google.gwt.place.shared.PlaceHistoryMapper;
|
||||
import com.google.gwt.place.shared.WithTokenizers;
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.legacy.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesLeaderboardsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.EventSeriesOverallLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.SeriesEventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.tabs.SeriesMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewPlace;
|
||||
|
||||
@WithTokenizers({ AboutUsPlace.Tokenizer.class, ContactPlace.Tokenizer.class, EventPlace.Tokenizer.class, EventsPlace.Tokenizer.class,
|
||||
SolutionsPlace.Tokenizer.class, WhatsNewPlace.Tokenizer.class, SponsoringPlace.Tokenizer.class, SearchResultPlace.Tokenizer.class, StartPlace.Tokenizer.class,
|
||||
RegattaPlace.Tokenizer.class, SeriesPlace.Tokenizer.class })
|
||||
@WithTokenizers({ AboutUsPlace.Tokenizer.class, ContactPlace.Tokenizer.class, EventPlace.Tokenizer.class,
|
||||
EventsPlace.Tokenizer.class, SolutionsPlace.Tokenizer.class, WhatsNewPlace.Tokenizer.class,
|
||||
SponsoringPlace.Tokenizer.class, SearchResultPlace.Tokenizer.class, StartPlace.Tokenizer.class,
|
||||
RegattaPlace.Tokenizer.class, SeriesPlace.Tokenizer.class,
|
||||
// Event tab places...
|
||||
EventDefaultPlace.Tokenizer.class,
|
||||
// Multiregatta places:
|
||||
MultiregattaOverviewPlace.Tokenizer.class,
|
||||
MultiregattaRegattasPlace.Tokenizer.class,
|
||||
MultiregattaMediaPlace.Tokenizer.class,
|
||||
// Regatta places:
|
||||
RegattaOverviewPlace.Tokenizer.class,
|
||||
RegattaRacesPlace.Tokenizer.class,
|
||||
RegattaLeaderboardPlace.Tokenizer.class,
|
||||
RegattaCompetitorAnalyticsPlace.Tokenizer.class,
|
||||
RegattaMediaPlace.Tokenizer.class,
|
||||
// Fake series places:
|
||||
SeriesDefaultPlace.Tokenizer.class,
|
||||
RegattaOverviewPlace.Tokenizer.class,
|
||||
SeriesEventsPlace.Tokenizer.class,
|
||||
EventSeriesCompetitorAnalyticsPlace.Tokenizer.class,
|
||||
EventSeriesOverallLeaderboardPlace.Tokenizer.class,
|
||||
EventSeriesLeaderboardsPlace.Tokenizer.class,
|
||||
SeriesMediaPlace.Tokenizer.class
|
||||
|
||||
})
|
||||
public interface ApplicationHistoryMapper extends PlaceHistoryMapper {
|
||||
}
|
||||
@@ -6,14 +6,16 @@ import java.util.Map;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.sap.sailing.gwt.home.client.place.aboutus.AboutUsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.contact.ContactPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaCompetitorAnalyticsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringPlace;
|
||||
@@ -29,19 +31,19 @@ public class HomePlacesNavigator extends AbstractPlaceNavigator {
|
||||
}
|
||||
|
||||
public PlaceNavigation<StartPlace> getHomeNavigation() {
|
||||
return createGlobalPlaceNavigation(new StartPlace(), new StartPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new StartPlace());
|
||||
}
|
||||
|
||||
public PlaceNavigation<EventsPlace> getEventsNavigation() {
|
||||
return createGlobalPlaceNavigation(new EventsPlace(), new EventsPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new EventsPlace());
|
||||
}
|
||||
|
||||
public PlaceNavigation<SolutionsPlace> getSolutionsNavigation(SolutionsNavigationTabs navigationTab) {
|
||||
return createLocalPlaceNavigation(new SolutionsPlace(navigationTab), new SolutionsPlace.Tokenizer());
|
||||
return createLocalPlaceNavigation(new SolutionsPlace(navigationTab));
|
||||
}
|
||||
|
||||
public PlaceNavigation<WhatsNewPlace> getWhatsNewNavigation(WhatsNewNavigationTabs navigationTab) {
|
||||
return createLocalPlaceNavigation(new WhatsNewPlace(navigationTab), new WhatsNewPlace.Tokenizer());
|
||||
return createLocalPlaceNavigation(new WhatsNewPlace(navigationTab));
|
||||
}
|
||||
|
||||
public String getSimulatorURL() {
|
||||
@@ -50,40 +52,54 @@ public class HomePlacesNavigator extends AbstractPlaceNavigator {
|
||||
}
|
||||
|
||||
public PlaceNavigation<SponsoringPlace> getSponsoringNavigation() {
|
||||
return createGlobalPlaceNavigation(new SponsoringPlace(), new SponsoringPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new SponsoringPlace());
|
||||
}
|
||||
|
||||
public PlaceNavigation<AboutUsPlace> getAboutUsNavigation() {
|
||||
return createGlobalPlaceNavigation(new AboutUsPlace(), new AboutUsPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new AboutUsPlace());
|
||||
}
|
||||
|
||||
public PlaceNavigation<ContactPlace> getContactNavigation() {
|
||||
return createGlobalPlaceNavigation(new ContactPlace(), new ContactPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new ContactPlace());
|
||||
}
|
||||
|
||||
public PlaceNavigation<MultiregattaRegattasPlace> getEventRegattasNavigation(String eventUuidAsString, String baseUrl, boolean isOnRemoteServer) {
|
||||
MultiregattaRegattasPlace eventPlace = new MultiregattaRegattasPlace(eventUuidAsString);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, eventPlace);
|
||||
}
|
||||
|
||||
public PlaceNavigation<SeriesDefaultPlace> getEventSeriesNavigation(String seriesId, String baseUrl, boolean isOnRemoteServer) {
|
||||
SeriesDefaultPlace place = new SeriesDefaultPlace(seriesId);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, place);
|
||||
}
|
||||
|
||||
public PlaceNavigation<EventPlace> getEventNavigation(String eventUuidAsString, String baseUrl, boolean isOnRemoteServer) {
|
||||
EventPlace eventPlace = new EventPlace(eventUuidAsString, EventNavigationTabs.Regattas, null);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, eventPlace, new EventPlace.Tokenizer());
|
||||
public PlaceNavigation<EventDefaultPlace> getEventNavigation(String eventUuidAsString, String baseUrl, boolean isOnRemoteServer) {
|
||||
EventDefaultPlace eventPlace = new EventDefaultPlace(eventUuidAsString);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, eventPlace);
|
||||
}
|
||||
|
||||
public <P extends AbstractEventPlace> PlaceNavigation<P> getEventNavigation(P place, String baseUrl,
|
||||
boolean isOnRemoteServer) {
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, place);
|
||||
}
|
||||
|
||||
public PlaceNavigation<EventPlace> getRegattaNavigation(String eventUuidAsString, String leaderboardIdAsNameString, String baseUrl, boolean isOnRemoteServer) {
|
||||
EventPlace eventPlace = new EventPlace(eventUuidAsString, EventNavigationTabs.Regatta, leaderboardIdAsNameString);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, eventPlace, new EventPlace.Tokenizer());
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public PlaceNavigation<AbstractEventRegattaPlace> getRegattaNavigation(String eventUuidAsString, String leaderboardIdAsNameString, String baseUrl, boolean isOnRemoteServer) {
|
||||
RegattaOverviewPlace eventPlace = new RegattaOverviewPlace(eventUuidAsString, leaderboardIdAsNameString);
|
||||
return (PlaceNavigation) createPlaceNavigation(baseUrl, isOnRemoteServer, eventPlace);
|
||||
}
|
||||
|
||||
/** this place will be merged into the common regatta view as tab later on */
|
||||
public PlaceNavigation<RegattaPlace> getRegattaAnalyticsNavigation(String eventUuidAsString, RegattaNavigationTabs navigationTab, String leaderboardIdAsNameString, String baseUrl, boolean isOnRemoteServer) {
|
||||
RegattaPlace regattaPlace = new RegattaPlace(eventUuidAsString, navigationTab, leaderboardIdAsNameString, true, true);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, regattaPlace, new RegattaPlace.Tokenizer());
|
||||
public PlaceNavigation<RegattaCompetitorAnalyticsPlace> getCompetitorAnalyticsNavigation(String eventUuidAsString, String regattaId, String baseUrl, boolean isOnRemoteServer) {
|
||||
RegattaCompetitorAnalyticsPlace regattaPlace = new RegattaCompetitorAnalyticsPlace(eventUuidAsString, regattaId);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, regattaPlace);
|
||||
}
|
||||
|
||||
/** this place will be merged into the common series event view as tab later on */
|
||||
public PlaceNavigation<SeriesPlace> getSeriesAnalyticsNavigation(String eventUuidAsString, SeriesNavigationTabs navigationTab, String leaderboardIdAsNameString, String baseUrl, boolean isOnRemoteServer) {
|
||||
SeriesPlace seriesPlace = new SeriesPlace(eventUuidAsString, navigationTab, leaderboardIdAsNameString, true, true);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, seriesPlace, new SeriesPlace.Tokenizer());
|
||||
|
||||
public PlaceNavigation<RegattaLeaderboardPlace> getLeaderboardNavigation(String eventUuidAsString, String regattaId, String baseUrl, boolean isOnRemoteServer) {
|
||||
RegattaLeaderboardPlace regattaPlace = new RegattaLeaderboardPlace(eventUuidAsString, regattaId);
|
||||
return createPlaceNavigation(baseUrl, isOnRemoteServer, regattaPlace);
|
||||
}
|
||||
|
||||
public PlaceNavigation<SearchResultPlace> getSearchResultNavigation(String searchQuery) {
|
||||
return createGlobalPlaceNavigation(new SearchResultPlace(searchQuery), new SearchResultPlace.Tokenizer());
|
||||
return createGlobalPlaceNavigation(new SearchResultPlace(searchQuery));
|
||||
}
|
||||
}
|
||||
@@ -2,28 +2,31 @@ package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.google.gwt.user.client.Window;
|
||||
|
||||
public class PlaceNavigation<T extends Place> {
|
||||
private final PlaceNavigator placeNavigator;
|
||||
|
||||
private final ApplicationHistoryMapper mapper = GWT.create(ApplicationHistoryMapper.class);
|
||||
|
||||
private final T destinationPlace;
|
||||
private final PlaceTokenizer<T> tokenizer;
|
||||
private final String baseUrl;
|
||||
private final boolean isDestinationOnRemoteServer;
|
||||
|
||||
public PlaceNavigation(T destinationPlace, PlaceTokenizer<T> tokenizer) {
|
||||
|
||||
public PlaceNavigation(T destinationPlace, PlaceNavigator placeNavigator) {
|
||||
this.placeNavigator = placeNavigator;
|
||||
this.destinationPlace = destinationPlace;
|
||||
this.tokenizer = tokenizer;
|
||||
String locationURL = getLocationURL();
|
||||
this.isDestinationOnRemoteServer = !(isLocationOnLocalhost(locationURL) || isLocationOnDefaultSapSailingServer(locationURL));
|
||||
this.baseUrl = isDestinationOnRemoteServer ? AbstractPlaceNavigator.DEFAULT_SAPSAILING_SERVER_URL : locationURL;
|
||||
this.isDestinationOnRemoteServer = !(isLocationOnLocalhostOrDevServer(locationURL) || isLocationOnDefaultSapSailingServer(locationURL));
|
||||
this.baseUrl = isDestinationOnRemoteServer ? AbstractPlaceNavigator.DEFAULT_SAPSAILING_SERVER_URL : locationURL;
|
||||
}
|
||||
|
||||
public PlaceNavigation(String baseUrl, T destinationPlace, PlaceTokenizer<T> tokenizer, boolean isDestinationOnRemoteServer) {
|
||||
public PlaceNavigation(String baseUrl, T destinationPlace, boolean isDestinationOnRemoteServer,
|
||||
PlaceNavigator placeNavigator) {
|
||||
this.destinationPlace = destinationPlace;
|
||||
this.tokenizer = tokenizer;
|
||||
this.isDestinationOnRemoteServer = isDestinationOnRemoteServer;
|
||||
this.baseUrl = isDestinationOnRemoteServer ? baseUrl : getLocationURL();
|
||||
this.placeNavigator = placeNavigator;
|
||||
this.baseUrl = isDestinationOnRemoteServer ? baseUrl : getLocationURL();
|
||||
}
|
||||
|
||||
public String getTargetUrl() {
|
||||
@@ -32,7 +35,7 @@ public class PlaceNavigation<T extends Place> {
|
||||
|
||||
public String getHistoryUrl() {
|
||||
String placeUrl = buildPlaceUrl();
|
||||
if(placeUrl.startsWith("#")) {
|
||||
if (placeUrl.startsWith("#")) {
|
||||
placeUrl = placeUrl.substring(1, placeUrl.length());
|
||||
}
|
||||
return placeUrl;
|
||||
@@ -44,10 +47,10 @@ public class PlaceNavigation<T extends Place> {
|
||||
|
||||
private String buildPlaceUrl() {
|
||||
String url = "";
|
||||
if(isRemotePlace()) {
|
||||
if (isRemotePlace()) {
|
||||
url = baseUrl + "/gwt/Home.html";
|
||||
if(!GWT.isProdMode()) {
|
||||
url += "?gwt.codesvr=127.0.0.1:9997";
|
||||
if (!GWT.isProdMode()) {
|
||||
url += "?gwt.codesvr=127.0.0.1:9997";
|
||||
}
|
||||
url += getPlaceToken();
|
||||
} else {
|
||||
@@ -55,24 +58,30 @@ public class PlaceNavigation<T extends Place> {
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
public boolean isRemotePlace() {
|
||||
return isDestinationOnRemoteServer;
|
||||
}
|
||||
|
||||
private String getPlaceToken() {
|
||||
return "#" + destinationPlace.getClass().getSimpleName() + ":" + tokenizer.getToken(destinationPlace);
|
||||
return "#" + mapper.getToken(destinationPlace);
|
||||
|
||||
}
|
||||
|
||||
private boolean isLocationOnDefaultSapSailingServer(String urlToCheck) {
|
||||
return urlToCheck.contains(HomePlacesNavigator.DEFAULT_SAPSAILING_SERVER);
|
||||
}
|
||||
|
||||
private boolean isLocationOnLocalhost(String urlToCheck) {
|
||||
return urlToCheck.contains("localhost") || urlToCheck.contains("127.0.0.1");
|
||||
private boolean isLocationOnLocalhostOrDevServer(String urlToCheck) {
|
||||
return urlToCheck.contains("localhost") || urlToCheck.contains("127.0.0.1")
|
||||
|| urlToCheck.contains(HomePlacesNavigator.DEFAULT_SAPSAILING_DEV_SERVER);
|
||||
}
|
||||
|
||||
|
||||
private String getLocationURL() {
|
||||
return Window.Location.getProtocol() + "//" + Window.Location.getHostName() + ":" + Window.Location.getPort();
|
||||
}
|
||||
|
||||
public void goToPlace() {
|
||||
placeNavigator.goToPlace(this);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,13 @@
|
||||
package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.shared.SimpleEventBus;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.place.error.TabletAndDesktopErrorView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.TabletAndDesktopEventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.TabletAndDesktopRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.TabletAndDesktopSearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.series.TabletAndDesktopSeriesView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.TabletAndDesktopSolutionsView;
|
||||
@@ -28,12 +15,9 @@ import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringView;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.TabletAndDesktopSponsoringView;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartView;
|
||||
import com.sap.sailing.gwt.home.client.place.start.TabletAndDesktopStartView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.TabletAndDesktopWhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewPlace.WhatsNewNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.TabletAndDesktopWhatsNewView;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
|
||||
public class SmartphoneApplicationClientFactory extends AbstractApplicationClientFactory implements ApplicationClientFactory {
|
||||
@@ -46,18 +30,9 @@ public class SmartphoneApplicationClientFactory extends AbstractApplicationClien
|
||||
}
|
||||
|
||||
private SmartphoneApplicationClientFactory(EventBus eventBus, PlaceController placeController) {
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController)), eventBus, placeController);
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController), eventBus), eventBus, placeController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopEventView(getSailingService(), event, navigationTab, raceGroups, leaderboardName, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event) {
|
||||
return new TabletAndDesktopEventWithoutRegattasView(getSailingService(), event, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventsView createEventsView() {
|
||||
@@ -66,7 +41,7 @@ public class SmartphoneApplicationClientFactory extends AbstractApplicationClien
|
||||
|
||||
@Override
|
||||
public TabletAndDesktopErrorView createErrorView(String errorMessage, Throwable errorReason) {
|
||||
return new TabletAndDesktopErrorView(errorMessage, errorReason);
|
||||
return new TabletAndDesktopErrorView(errorMessage, errorReason, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,16 +58,6 @@ public class SmartphoneApplicationClientFactory extends AbstractApplicationClien
|
||||
return new TabletAndDesktopSolutionsView(navigationTab, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegattaAnalyticsView createRegattaAnalyticsView(EventDTO event, String leaderboardName, RegattaNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopRegattaView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopSeriesView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResultView createSearchResultView() {
|
||||
return new TabletAndDesktopSearchResultView(getHomePlacesNavigator());
|
||||
|
||||
@@ -1,26 +1,13 @@
|
||||
package com.sap.sailing.gwt.home.client.app;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.shared.SimpleEventBus;
|
||||
import com.google.gwt.place.shared.PlaceController;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.place.error.TabletAndDesktopErrorView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.TabletAndDesktopEventWithoutRegattasView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.events.TabletAndDesktopEventsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.RegattaPlace.RegattaNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.regatta.TabletAndDesktopRegattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.SearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.searchresult.TabletAndDesktopSearchResultView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesAnalyticsView;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.series.TabletAndDesktopSeriesView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsPlace.SolutionsNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.SolutionsView;
|
||||
import com.sap.sailing.gwt.home.client.place.solutions.TabletAndDesktopSolutionsView;
|
||||
@@ -28,12 +15,9 @@ import com.sap.sailing.gwt.home.client.place.sponsoring.SponsoringView;
|
||||
import com.sap.sailing.gwt.home.client.place.sponsoring.TabletAndDesktopSponsoringView;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartView;
|
||||
import com.sap.sailing.gwt.home.client.place.start.TabletAndDesktopStartView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.TabletAndDesktopWhatsNewView;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewPlace.WhatsNewNavigationTabs;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sailing.gwt.home.client.place.whatsnew.WhatsNewView;
|
||||
|
||||
|
||||
public class TabletAndDesktopApplicationClientFactory extends AbstractApplicationClientFactory implements ApplicationClientFactory {
|
||||
@@ -46,22 +30,12 @@ public class TabletAndDesktopApplicationClientFactory extends AbstractApplicatio
|
||||
}
|
||||
|
||||
private TabletAndDesktopApplicationClientFactory(EventBus eventBus, PlaceController placeController) {
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController)), eventBus, placeController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopEventView(getSailingService(), event, navigationTab, raceGroups, leaderboardName, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
super(new TabletAndDesktopApplicationView(new HomePlacesNavigator(placeController), eventBus), eventBus, placeController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TabletAndDesktopErrorView createErrorView(String errorMessage, Throwable errorReason) {
|
||||
return new TabletAndDesktopErrorView(errorMessage, errorReason);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event) {
|
||||
return new TabletAndDesktopEventWithoutRegattasView(getSailingService(), event, getHomePlacesNavigator());
|
||||
return new TabletAndDesktopErrorView(errorMessage, errorReason, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,16 +57,6 @@ public class TabletAndDesktopApplicationClientFactory extends AbstractApplicatio
|
||||
public SolutionsView createSolutionsView(SolutionsNavigationTabs navigationTab) {
|
||||
return new TabletAndDesktopSolutionsView(navigationTab, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegattaAnalyticsView createRegattaAnalyticsView(EventDTO event, String leaderboardName, RegattaNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopRegattaView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs navigationTab, Timer timerForClientServerOffset) {
|
||||
return new TabletAndDesktopSeriesView(event, leaderboardName, navigationTab, timerForClientServerOffset, getHomePlacesNavigator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResultView createSearchResultView() {
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sap.sailing.gwt.home.client.shared.footer.Footer;
|
||||
import com.sap.sailing.gwt.home.client.shared.header.Header;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
@@ -34,8 +35,8 @@ public class TabletAndDesktopApplicationView extends Composite implements Applic
|
||||
@UiField
|
||||
SimplePanel mainContentPanel;
|
||||
|
||||
public TabletAndDesktopApplicationView(HomePlacesNavigator navigator) {
|
||||
headerPanel = new Header(navigator);
|
||||
public TabletAndDesktopApplicationView(HomePlacesNavigator navigator, EventBus eventBus) {
|
||||
headerPanel = new Header(navigator, eventBus);
|
||||
footerPanel = new Footer(navigator);
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<!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">
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared">
|
||||
|
||||
<ui:style>
|
||||
.mainContent {
|
||||
min-height: 400px;
|
||||
}
|
||||
</ui:style>
|
||||
|
||||
<g:HTMLPanel>
|
||||
<s:header.Header ui:field="headerPanel" />
|
||||
<g:SimplePanel ui:field="mainContentPanel" />
|
||||
<s:footer.Footer ui:field="footerPanel" />
|
||||
</g:HTMLPanel>
|
||||
<g:SimplePanel ui:field="mainContentPanel" styleName="{style.mainContent}" />
|
||||
<s:footer.Footer ui:field="footerPanel" />
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -2,17 +2,46 @@ package com.sap.sailing.gwt.home.client.place.error;
|
||||
|
||||
import com.google.gwt.activity.shared.AbstractActivity;
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
|
||||
public class ErrorActivity extends AbstractActivity {
|
||||
|
||||
private ErrorPlace currentPlace;
|
||||
private ErrorClientFactory clientFactory;
|
||||
|
||||
public ErrorActivity(ErrorPlace place, ErrorClientFactory clientFactory) {
|
||||
this.currentPlace = place;
|
||||
this.clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(AcceptsOneWidget panel, EventBus eventBus) {
|
||||
// TODO: the error place should get the error message from the place
|
||||
panel.setWidget(new TabletAndDesktopErrorView(null, null));
|
||||
final TabletAndDesktopErrorView view;
|
||||
|
||||
Command reloadCommand = null;
|
||||
if (currentPlace.getComingFrom() != null) {
|
||||
reloadCommand = new Command() {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
clientFactory.getPlaceController().goTo(currentPlace.getComingFrom());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (currentPlace.hasCustomErrorMessages()) {
|
||||
view = new TabletAndDesktopErrorView(
|
||||
currentPlace.getErrorMessage(),
|
||||
currentPlace.getErrorMessageDetail(),
|
||||
currentPlace.getException(), reloadCommand);
|
||||
} else {
|
||||
view = new TabletAndDesktopErrorView(currentPlace.getErrorMessageDetail(), currentPlace.getException(),
|
||||
reloadCommand);
|
||||
}
|
||||
|
||||
panel.setWidget(view);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,62 @@
|
||||
package com.sap.sailing.gwt.home.client.place.error;
|
||||
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
|
||||
public class ErrorPlace extends AbstractBasePlace {
|
||||
|
||||
/**
|
||||
* Place provided for reload action
|
||||
*/
|
||||
private Place comingFrom;
|
||||
|
||||
/**
|
||||
* Custom error messages
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* Detail error message
|
||||
*/
|
||||
private final String errorMessageDetail;
|
||||
|
||||
public ErrorPlace(String errorMessageDetail) {
|
||||
this.errorMessageDetail = errorMessageDetail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception ocurred
|
||||
*/
|
||||
private Throwable exception;
|
||||
|
||||
public Place getComingFrom() {
|
||||
return comingFrom;
|
||||
}
|
||||
|
||||
public void setComingFrom(Place comingFrom) {
|
||||
this.comingFrom = comingFrom;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public String getErrorMessageDetail() {
|
||||
return errorMessageDetail;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
public Throwable getException() {
|
||||
return exception;
|
||||
}
|
||||
|
||||
public void setException(Throwable exception) {
|
||||
this.exception = exception;
|
||||
}
|
||||
|
||||
public static class Tokenizer implements PlaceTokenizer<ErrorPlace> {
|
||||
@Override
|
||||
public String getToken(ErrorPlace place) {
|
||||
@@ -13,7 +65,12 @@ public class ErrorPlace extends AbstractBasePlace {
|
||||
|
||||
@Override
|
||||
public ErrorPlace getPlace(String token) {
|
||||
return new ErrorPlace();
|
||||
return new ErrorPlace("");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasCustomErrorMessages() {
|
||||
|
||||
return errorMessage != null && !errorMessage.isEmpty();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.sap.sailing.gwt.home.client.place.error;
|
||||
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.Command;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.shared.error.ErrorMessage;
|
||||
@@ -16,9 +17,14 @@ public class TabletAndDesktopErrorView extends Composite implements ErrorView {
|
||||
|
||||
@UiField(provided=true) ErrorMessage errorMessage;
|
||||
|
||||
public TabletAndDesktopErrorView(String errorMessageText, Throwable errorReason) {
|
||||
errorMessage = new ErrorMessage(errorMessageText, errorReason);
|
||||
|
||||
public TabletAndDesktopErrorView(String errorMessageTextDetail, Throwable errorReason, Command reloadCommand) {
|
||||
errorMessage = new ErrorMessage(errorMessageTextDetail, errorReason, reloadCommand);
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public TabletAndDesktopErrorView(String customMessageText, String errorMessageTextDetail, Throwable errorReason,
|
||||
Command reloadCommand) {
|
||||
errorMessage = new ErrorMessage(customMessageText, errorMessageTextDetail, errorReason, reloadCommand);
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.activity.shared.AbstractActivity;
|
||||
import com.google.gwt.core.shared.GWT;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.safehtml.shared.SafeUri;
|
||||
import com.google.gwt.safehtml.shared.UriUtils;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.HomeServiceAsync;
|
||||
import com.sap.sailing.gwt.home.client.app.ApplicationHistoryMapper;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.home.client.shared.placeholder.InfoPlaceholder;
|
||||
import com.sap.sailing.gwt.ui.client.EntryPointLinkFactory;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardViewConfiguration;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.HasRegattaMetadata;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sse.gwt.client.mvp.ErrorView;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sse.gwt.client.player.Timer.PlayModes;
|
||||
|
||||
public abstract class AbstractEventActivity<PLACE extends AbstractEventPlace> extends AbstractActivity implements
|
||||
EventView.Presenter {
|
||||
|
||||
protected final PLACE currentPlace;
|
||||
|
||||
protected final EventContext ctx;
|
||||
|
||||
protected final EventClientFactory clientFactory;
|
||||
|
||||
private final Timer timerForClientServerOffset;
|
||||
|
||||
protected final HomePlacesNavigator homePlacesNavigator;
|
||||
|
||||
private static final ApplicationHistoryMapper historyMapper = GWT.create(ApplicationHistoryMapper.class);
|
||||
|
||||
public AbstractEventActivity(PLACE place, EventClientFactory clientFactory, HomePlacesNavigator homePlacesNavigator) {
|
||||
this.currentPlace = place;
|
||||
this.homePlacesNavigator = homePlacesNavigator;
|
||||
this.ctx = new EventContext(place.getCtx());
|
||||
this.timerForClientServerOffset = new Timer(PlayModes.Replay);
|
||||
|
||||
this.clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
public HomeServiceAsync getHomeService() {
|
||||
return clientFactory.getHomeService();
|
||||
}
|
||||
|
||||
public SailingServiceAsync getSailingService() {
|
||||
return clientFactory.getSailingService();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventContext getCtx() {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTabPlaceSelection(TabView<?, ? extends EventView.Presenter> selectedActivity) {
|
||||
Place tabPlaceToGo = selectedActivity.placeToFire();
|
||||
clientFactory.getPlaceController().goTo(tabPlaceToGo);
|
||||
}
|
||||
|
||||
public void navigateTo(Place place) {
|
||||
clientFactory.getPlaceController().goTo(place);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SafeUri getUrl(AbstractEventPlace place) {
|
||||
String token = historyMapper.getToken(place);
|
||||
return UriUtils.fromString("#" + token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HasRegattaMetadata getRegattaMetadata() {
|
||||
return ctx.getRegatta();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Timer getTimerForClientServerOffset() {
|
||||
return timerForClientServerOffset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractEventRegattaPlace getPlaceForRegatta(String regattaId) {
|
||||
return new RegattaOverviewPlace(contextForRegatta(regattaId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RegattaRacesPlace getPlaceForRegattaRaces(String regattaId) {
|
||||
return new RegattaRacesPlace(contextForRegatta(regattaId));
|
||||
}
|
||||
|
||||
protected EventContext contextForRegatta(String regattaId) {
|
||||
return new EventContext(ctx).withRegattaId(regattaId);
|
||||
}
|
||||
|
||||
public String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race) {
|
||||
RegattaAndRaceIdentifier raceIdentifier = race.getRaceIdentifier();
|
||||
return EntryPointLinkFactory
|
||||
.createRaceBoardLink(createRaceBoardLinkParameters(leaderboard.name, raceIdentifier));
|
||||
}
|
||||
|
||||
private Map<String, String> createRaceBoardLinkParameters(String leaderboardName,
|
||||
RegattaAndRaceIdentifier raceIdentifier) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", ctx.getEventId());
|
||||
linkParams.put("leaderboardName", leaderboardName);
|
||||
linkParams.put("raceName", raceIdentifier.getRaceName());
|
||||
// TODO this must only be forwarded if there is a logged-on user
|
||||
// linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_MAPCONTROLS, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_NAVIGATION_PANEL, "true");
|
||||
linkParams.put("regattaName", raceIdentifier.getRegattaName());
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<StartPlace> getHomeNavigation() {
|
||||
return homePlacesNavigator.getHomeNavigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<EventsPlace> getEventsNavigation() {
|
||||
return homePlacesNavigator.getEventsNavigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<EventDefaultPlace> getCurrentEventNavigation() {
|
||||
return homePlacesNavigator.getEventNavigation(ctx.getEventId(), null, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<SeriesDefaultPlace> getCurrentEventSeriesNavigation() {
|
||||
return homePlacesNavigator.getEventSeriesNavigation(ctx.getEventId(), null, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<RegattaRacesPlace> getRegattaRacesNavigation(String regattaId) {
|
||||
return homePlacesNavigator.getEventNavigation(getPlaceForRegattaRaces(regattaId), null, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlaceNavigation<AbstractEventRegattaPlace> getRegattaNavigation(String regattaId) {
|
||||
return homePlacesNavigator.getEventNavigation(getPlaceForRegatta(regattaId), null, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ensureRegattaStructure(final AsyncCallback<List<RaceGroupDTO>> callback) {
|
||||
if (ctx.getRaceGroups() != null) {
|
||||
callback.onSuccess(ctx.getRaceGroups());
|
||||
return;
|
||||
}
|
||||
|
||||
final EventViewDTO eventDTO = ctx.getEventDTO();
|
||||
|
||||
ensureLeaderboardGroups(new AsyncCallback<List<LeaderboardGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(final List<LeaderboardGroupDTO> leaderboardGroups) {
|
||||
final long clientTimeWhenRequestWasSent = System.currentTimeMillis();
|
||||
|
||||
getSailingService().getRegattaStructureOfEvent(eventDTO.getId(),
|
||||
new AsyncCallback<List<RaceGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RaceGroupDTO> raceGroups) {
|
||||
if (raceGroups.size() > 0) {
|
||||
for (LeaderboardGroupDTO leaderboardGroupDTO : leaderboardGroups) {
|
||||
final long clientTimeWhenResponseWasReceived = System.currentTimeMillis();
|
||||
if (leaderboardGroupDTO.getAverageDelayToLiveInMillis() != null) {
|
||||
timerForClientServerOffset.setLivePlayDelayInMillis(leaderboardGroupDTO
|
||||
.getAverageDelayToLiveInMillis());
|
||||
}
|
||||
timerForClientServerOffset.adjustClientServerOffset(clientTimeWhenRequestWasSent,
|
||||
leaderboardGroupDTO.getCurrentServerTime(), clientTimeWhenResponseWasReceived);
|
||||
}
|
||||
ctx.withRaceGroups(raceGroups);
|
||||
callback.onSuccess(raceGroups);
|
||||
} else {
|
||||
getView().showErrorInCurrentTab(new InfoPlaceholder(StringMessages.INSTANCE.noDataForEvent()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO @FM: extract error message
|
||||
ErrorView errorView = clientFactory.createErrorView(
|
||||
"Error while loading the regatta structure with service getRegattaStructureOfEvent()", caught);
|
||||
getView().showErrorInCurrentTab(errorView);
|
||||
// TODO: notify callback of failure?
|
||||
// callback.onFailure(caught);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ensureLeaderboardGroups(final AsyncCallback<List<LeaderboardGroupDTO>> callback) {
|
||||
if (ctx.getLeaderboardGroups() != null) {
|
||||
callback.onSuccess(ctx.getLeaderboardGroups());
|
||||
return;
|
||||
}
|
||||
|
||||
final EventViewDTO eventDTO = ctx.getEventDTO();
|
||||
|
||||
getSailingService().getLeaderboardGroupsByEventId(eventDTO.getId(),
|
||||
new AsyncCallback<ArrayList<LeaderboardGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<LeaderboardGroupDTO> leaderboardGroups) {
|
||||
ctx.withLeaderboardGroups(leaderboardGroups);
|
||||
callback.onSuccess(leaderboardGroups);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO @FM: extract error message
|
||||
ErrorView errorView = clientFactory.createErrorView(
|
||||
"Error while loading the leaderboard structure with service getLeaderboardGroupsByEventId()", caught);
|
||||
getView().showErrorInCurrentTab(errorView);
|
||||
// TODO: notify callback of failure?
|
||||
// callback.onFailure(caught);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ensureMedia(final AsyncCallback<MediaDTO> callback) {
|
||||
if (ctx.getMedia() != null) {
|
||||
callback.onSuccess(ctx.getMedia());
|
||||
return;
|
||||
}
|
||||
|
||||
getHomeService().getMediaForEvent(ctx.getEventDTO().getId(), new AsyncCallback<MediaDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO @FM: extract error message
|
||||
ErrorView errorView = clientFactory.createErrorView("Load media failure for event", caught);
|
||||
getView().showErrorInCurrentTab(errorView);
|
||||
// TODO: notify callback of failure?
|
||||
// callback.onFailure(caught);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(MediaDTO result) {
|
||||
ctx.withMedia(result);
|
||||
callback.onSuccess(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMedia() {
|
||||
if (showRegattaMetadata()) {
|
||||
return false;
|
||||
}
|
||||
return ctx.getEventDTO().isHasMedia();
|
||||
}
|
||||
|
||||
protected abstract EventView<PLACE, ?> getView();
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
/**
|
||||
* A base class for a content composite related to an sailing event
|
||||
* @author Frank
|
||||
*
|
||||
*/
|
||||
public class AbstractEventComposite extends Composite {
|
||||
private final EventDTO event;
|
||||
private final EventPlaceNavigator pageNavigator;
|
||||
|
||||
public AbstractEventComposite(EventDTO event, EventPlaceNavigator pageNavigator) {
|
||||
this.event = event;
|
||||
this.pageNavigator = pageNavigator;
|
||||
}
|
||||
|
||||
public EventDTO getEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
public EventPlaceNavigator getPageNavigator() {
|
||||
return pageNavigator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.sap.sailing.gwt.common.client.AbstractMapTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
|
||||
|
||||
public abstract class AbstractEventPlace extends Place {
|
||||
private final EventContext ctx;
|
||||
|
||||
protected AbstractEventPlace(EventContext ctx) {
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public EventContext getCtx() {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
public AbstractEventPlace(String eventUuidAsString) {
|
||||
this.ctx = new EventContext();
|
||||
ctx.withId(eventUuidAsString);
|
||||
}
|
||||
|
||||
public String getTitle(String eventName) {
|
||||
return TextMessages.INSTANCE.sapSailing() + " - " + eventName;
|
||||
}
|
||||
|
||||
public String getEventUuidAsString() {
|
||||
return ctx.getEventId();
|
||||
}
|
||||
|
||||
public String getRegattaId() {
|
||||
return ctx.getRegattaId();
|
||||
}
|
||||
|
||||
public static abstract class Tokenizer<PLACE extends AbstractEventPlace> extends AbstractMapTokenizer<PLACE> {
|
||||
private final static String PARAM_EVENTID = "eventId";
|
||||
private final static String PARAM_REGATTAID = "regattaId";
|
||||
protected PLACE getPlaceFromParameters(Map<String, String> parameters) {
|
||||
return getRealPlace(new EventContext().withId(parameters.get(PARAM_EVENTID)).withRegattaId(parameters.get(PARAM_REGATTAID)));
|
||||
}
|
||||
|
||||
protected Map<String, String> getParameters(PLACE place) {
|
||||
Map<String, String> parameters = new HashMap<>();
|
||||
EventContext context = place.getCtx();
|
||||
parameters.put(PARAM_EVENTID, context.getEventId());
|
||||
if(context.getEventDTO() == null || context.getEventDTO().getType() == EventType.MULTI_REGATTA) {
|
||||
parameters.put(PARAM_REGATTAID, context.getRegattaId());
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
|
||||
protected abstract PLACE getRealPlace(EventContext context);
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.activity.shared.AbstractActivity;
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.client.shared.placeholder.Placeholder;
|
||||
import com.sap.sailing.gwt.ui.regattaoverview.RegattaRaceStatesSettings;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
import com.sap.sse.gwt.client.async.MarkedAsyncCallback;
|
||||
import com.sap.sse.gwt.client.mvp.ErrorView;
|
||||
import com.sap.sse.gwt.client.player.TimeListener;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
import com.sap.sse.gwt.client.player.Timer.PlayModes;
|
||||
|
||||
public class EventActivity extends AbstractActivity {
|
||||
private final EventClientFactory clientFactory;
|
||||
|
||||
private final EventPlace eventPlace;
|
||||
private final Timer timerForClientServerOffset;
|
||||
|
||||
private final long serverUpdateRateInMs = 10000;
|
||||
private final Timer serverUpdateTimer;
|
||||
private final RegattaRaceStatesSettings raceStatesSettings;
|
||||
|
||||
private EventView view;
|
||||
private EventDTO event;
|
||||
|
||||
public EventActivity(EventPlace place, EventClientFactory clientFactory) {
|
||||
this.clientFactory = clientFactory;
|
||||
this.eventPlace = place;
|
||||
|
||||
this.view = null;
|
||||
this.event = null;
|
||||
|
||||
timerForClientServerOffset = new Timer(PlayModes.Replay);
|
||||
serverUpdateTimer = new Timer(PlayModes.Live, serverUpdateRateInMs);
|
||||
|
||||
raceStatesSettings = new RegattaRaceStatesSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
|
||||
panel.setWidget(new Placeholder());
|
||||
|
||||
final long clientTimeWhenRequestWasSent = System.currentTimeMillis();
|
||||
try {
|
||||
final UUID eventUUID = UUID.fromString(eventPlace.getEventUuidAsString());
|
||||
clientFactory.getSailingService().getEventById(eventUUID, true, new AsyncCallback<EventDTO>() {
|
||||
@Override
|
||||
public void onSuccess(final EventDTO event) {
|
||||
if(event != null) {
|
||||
loadRegattaStructureAndCreateEventView(panel, clientTimeWhenRequestWasSent, event);
|
||||
} else {
|
||||
createErrorView("No such event with UUID " + eventUUID, null, panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
createErrorView("Error while loading the event with service getEventById()", caught, panel);
|
||||
}
|
||||
});
|
||||
} catch (IllegalArgumentException e) {
|
||||
createErrorView("Could not parse a valid UUID from the parameter 'eventID'.", null, panel);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadRegattaStructureAndCreateEventView(final AcceptsOneWidget panel, final long clientTimeWhenRequestWasSent, final EventDTO event) {
|
||||
this.event = event;
|
||||
|
||||
if(event.getLeaderboardGroups().size() > 0) {
|
||||
clientFactory.getSailingService().getRegattaStructureOfEvent(event.id, new AsyncCallback<List<RaceGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RaceGroupDTO> raceGroups) {
|
||||
if(raceGroups.size() > 0) {
|
||||
for(LeaderboardGroupDTO leaderboardGroupDTO: event.getLeaderboardGroups()) {
|
||||
final long clientTimeWhenResponseWasReceived = System.currentTimeMillis();
|
||||
if (leaderboardGroupDTO.getAverageDelayToLiveInMillis() != null) {
|
||||
timerForClientServerOffset.setLivePlayDelayInMillis(leaderboardGroupDTO.getAverageDelayToLiveInMillis());
|
||||
}
|
||||
timerForClientServerOffset.adjustClientServerOffset(clientTimeWhenRequestWasSent, leaderboardGroupDTO.getCurrentServerTime(), clientTimeWhenResponseWasReceived);
|
||||
}
|
||||
createEventView(event, raceGroups, panel);
|
||||
|
||||
if(event.isRunning()) {
|
||||
// create update time for race states only for running events
|
||||
serverUpdateTimer.addTimeListener(new TimeListener() {
|
||||
@Override
|
||||
public void timeChanged(Date newTime, Date oldTime) {
|
||||
loadAndUpdateEventRaceStatesLog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
createEventWithoutRegattasView(event, panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
createErrorView("Error while loading the regatta structure with service getRegattaStructureOfEvent()", caught, panel);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createEventWithoutRegattasView(event, panel);
|
||||
}
|
||||
}
|
||||
|
||||
private void createErrorView(String errorMessage, Throwable errorReason, AcceptsOneWidget panel) {
|
||||
ErrorView view = clientFactory.createErrorView(errorMessage, errorReason);
|
||||
panel.setWidget(view.asWidget());
|
||||
}
|
||||
|
||||
private void createEventView(EventDTO event, List<RaceGroupDTO> raceGroups, AcceptsOneWidget panel) {
|
||||
view = clientFactory.createEventView(event, eventPlace.getNavigationTab(), raceGroups, eventPlace.getLeaderboardIdAsNameString(), timerForClientServerOffset);
|
||||
panel.setWidget(view.asWidget());
|
||||
Window.setTitle(eventPlace.getTitle(event.getName()));
|
||||
}
|
||||
|
||||
private void createEventWithoutRegattasView(EventDTO event, AcceptsOneWidget panel) {
|
||||
// no leaderboard groups defined yet -> show a teaser page
|
||||
EventWithoutRegattasView view = clientFactory.createEventWithoutRegattasView(event);
|
||||
panel.setWidget(view.asWidget());
|
||||
Window.setTitle(eventPlace.getTitle(event.getName()));
|
||||
}
|
||||
|
||||
protected void loadAndUpdateEventRaceStatesLog() {
|
||||
if(view != null && event != null) {
|
||||
final long clientTimeWhenRequestWasSent = System.currentTimeMillis();
|
||||
|
||||
clientFactory.getSailingService().getRaceStateEntriesForRaceGroup(event.id, raceStatesSettings.getVisibleCourseAreas(),
|
||||
raceStatesSettings.getVisibleRegattas(), raceStatesSettings.isShowOnlyCurrentlyRunningRaces(), raceStatesSettings.isShowOnlyRacesOfSameDay(),
|
||||
new MarkedAsyncCallback<List<RegattaOverviewEntryDTO>>(
|
||||
new AsyncCallback<List<RegattaOverviewEntryDTO>>() {
|
||||
@Override
|
||||
public void onFailure(Throwable cause) {
|
||||
Window.setStatus("Error while loading the race states with service getRaceStateEntriesForRaceGroup()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<RegattaOverviewEntryDTO> result) {
|
||||
final long clientTimeWhenResponseWasReceived = System.currentTimeMillis();
|
||||
Date serverTimeDuringRequest = null;
|
||||
for (RegattaOverviewEntryDTO entryDTO : result) {
|
||||
if (entryDTO.currentServerTime != null) {
|
||||
serverTimeDuringRequest = entryDTO.currentServerTime;
|
||||
}
|
||||
}
|
||||
view.updateEventRaceStates(result);
|
||||
timerForClientServerOffset.adjustClientServerOffset(clientTimeWhenRequestWasSent, serverTimeDuringRequest, clientTimeWhenResponseWasReceived);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +1,138 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaRegattasPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.EventRegattaActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
|
||||
import com.sap.sse.gwt.client.mvp.AbstractActivityProxy;
|
||||
|
||||
public class EventActivityProxy extends AbstractActivityProxy {
|
||||
|
||||
private final EventClientFactory clientFactory;
|
||||
private final EventPlace place;
|
||||
private AbstractEventPlace place;
|
||||
private EventContext ctx;
|
||||
private EventClientFactory clientFactory;
|
||||
private HomePlacesNavigator homePlacesNavigator;
|
||||
|
||||
public EventActivityProxy(EventPlace place, EventClientFactory clientFactory) {
|
||||
public EventActivityProxy(AbstractEventPlace place, EventClientFactory clientFactory,
|
||||
HomePlacesNavigator homePlacesNavigator) {
|
||||
this.place = place;
|
||||
this.homePlacesNavigator = homePlacesNavigator;
|
||||
this.ctx = this.place.getCtx();
|
||||
this.clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startAsync() {
|
||||
if (ctx.getEventDTO() != null) {
|
||||
afterEventLoad();
|
||||
} else {
|
||||
final UUID eventUUID = UUID.fromString(ctx.getEventId());
|
||||
|
||||
clientFactory.getHomeService().getEventViewById(eventUUID, new AsyncCallback<EventViewDTO>() {
|
||||
@Override
|
||||
public void onSuccess(final EventViewDTO event) {
|
||||
ctx.updateContext(event);
|
||||
afterEventLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO @FM: extract text?
|
||||
ErrorPlace errorPlace = new ErrorPlace("Error while loading the event with service getEventViewById()");
|
||||
// TODO @FM: reload sinnvoll hier?
|
||||
errorPlace.setComingFrom(place);
|
||||
clientFactory.getPlaceController().goTo(errorPlace);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void afterEventLoad() {
|
||||
if(place instanceof EventDefaultPlace) {
|
||||
place = getRealPlace();
|
||||
}
|
||||
place = verifyAndAdjustPlace();
|
||||
afterLoad();
|
||||
}
|
||||
|
||||
private void afterLoad() {
|
||||
GWT.runAsync(new AbstractRunAsyncCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
super.onSuccess(new EventActivity(place, clientFactory));
|
||||
if(place instanceof AbstractEventRegattaPlace) {
|
||||
super.onSuccess(new EventRegattaActivity((AbstractEventRegattaPlace) place, clientFactory,
|
||||
homePlacesNavigator));
|
||||
}
|
||||
if(place instanceof AbstractMultiregattaEventPlace) {
|
||||
super.onSuccess(new EventMultiregattaActivity((AbstractMultiregattaEventPlace) place,
|
||||
clientFactory, homePlacesNavigator));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private AbstractEventPlace getRealPlace() {
|
||||
EventViewDTO event = ctx.getEventDTO();
|
||||
|
||||
if(event.getType() == EventType.SERIES_EVENT || event.getType() == EventType.SINGLE_REGATTA) {
|
||||
if (event.isFinished()) {
|
||||
return new RegattaLeaderboardPlace(new EventContext(ctx).withRegattaId(null));
|
||||
} else {
|
||||
return new RegattaOverviewPlace(new EventContext(ctx).withRegattaId(null));
|
||||
}
|
||||
}
|
||||
return new MultiregattaOverviewPlace(place.getCtx());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the place is valid for the given event.
|
||||
* If not, the place is automatically being adjusted.
|
||||
*/
|
||||
private AbstractEventPlace verifyAndAdjustPlace() {
|
||||
EventContext contextWithoutRegatta = new EventContext(ctx).withRegattaId(null);
|
||||
// TODO check if regatta ID is valid
|
||||
if(place instanceof AbstractMultiregattaEventPlace && ctx.getEventDTO().getType() != EventType.MULTI_REGATTA) {
|
||||
// Events with a type other than multi regatta only have regatta level pages
|
||||
if(place instanceof MultiregattaRegattasPlace) {
|
||||
return new RegattaRacesPlace(contextWithoutRegatta);
|
||||
}
|
||||
if(place instanceof MultiregattaMediaPlace) {
|
||||
return new RegattaMediaPlace(contextWithoutRegatta);
|
||||
}
|
||||
return new RegattaOverviewPlace(contextWithoutRegatta);
|
||||
}
|
||||
|
||||
if(place instanceof AbstractEventRegattaPlace) {
|
||||
boolean regattaKnown = ctx.getEventDTO().isRegattaIDKnown(ctx.getRegattaId());
|
||||
if(ctx.getEventDTO().getType() != EventType.MULTI_REGATTA && ctx.getRegattaId() != null && !regattaKnown) {
|
||||
// Regatta ID unknown but unnecessary ...
|
||||
ctx.withRegattaId(null);
|
||||
} else if(ctx.getEventDTO().getType() == EventType.MULTI_REGATTA && !regattaKnown) {
|
||||
return new MultiregattaRegattasPlace(contextWithoutRegatta);
|
||||
}
|
||||
}
|
||||
|
||||
if(place instanceof RegattaMediaPlace && ctx.getEventDTO().getType() == EventType.MULTI_REGATTA) {
|
||||
// The media page for multi regatta events is on event level only but not on regatta level
|
||||
return new MultiregattaMediaPlace(new EventContext(ctx).withRegattaId(null));
|
||||
}
|
||||
// no adjustment necessary
|
||||
return place;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,6 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.ui.client.SailingClientFactory;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public interface EventClientFactory extends SailingClientFactory {
|
||||
EventView createEventView(EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName, Timer timerForClientServerOffset);
|
||||
|
||||
EventWithoutRegattasView createEventWithoutRegattasView(EventDTO event);
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.RegattaAnalyticsDataManager;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO.EventType;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.RegattaMetadataDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
|
||||
/**
|
||||
* Common context used by the different tabs in the event place.
|
||||
*
|
||||
* @author pgtaboada
|
||||
*
|
||||
*/
|
||||
public class EventContext {
|
||||
|
||||
private String eventId;
|
||||
private String regattaId;
|
||||
private List<RaceGroupDTO> raceGroups;
|
||||
private List<LeaderboardGroupDTO> leaderboardGroups;
|
||||
|
||||
private RegattaAnalyticsDataManager regattaAnalyticsManager;
|
||||
|
||||
/**
|
||||
* Common state required by all tabs/ places in event
|
||||
*/
|
||||
private EventViewDTO eventDTO;
|
||||
private MediaDTO media;
|
||||
|
||||
|
||||
public EventContext() {
|
||||
}
|
||||
|
||||
public EventContext(EventContext ctx) {
|
||||
updateContext(ctx.getEventDTO());
|
||||
withRaceGroups(ctx.raceGroups);
|
||||
withLeaderboardGroups(ctx.leaderboardGroups);
|
||||
withMedia(ctx.media);
|
||||
withRegattaId(ctx.regattaId);
|
||||
withRegattaAnalyticsManager(ctx.regattaAnalyticsManager);
|
||||
}
|
||||
|
||||
public EventContext withId(String eventId) {
|
||||
this.eventId = eventId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventContext withRegattaId(String regattaId) {
|
||||
this.regattaId = regattaId;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Used to update context with dto instance
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public EventContext updateContext(EventViewDTO dto) {
|
||||
this.eventDTO = dto;
|
||||
if (eventDTO == null) {
|
||||
withId(null);
|
||||
} else {
|
||||
withId(dto.getId().toString());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventViewDTO getEventDTO() {
|
||||
return eventDTO;
|
||||
}
|
||||
|
||||
public String getEventId() {
|
||||
return eventId;
|
||||
}
|
||||
|
||||
public String getRegattaId() {
|
||||
if(regattaId != null) {
|
||||
return regattaId;
|
||||
}
|
||||
if(eventDTO != null && (eventDTO.getType() == EventType.SINGLE_REGATTA || eventDTO.getType() == EventType.SERIES_EVENT)) {
|
||||
return eventDTO.getRegattas().get(0).getDisplayName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public RegattaMetadataDTO getRegatta() {
|
||||
if(regattaId == null || eventDTO == null) {
|
||||
return null;
|
||||
}
|
||||
for (RegattaMetadataDTO regatta : eventDTO.getRegattas()) {
|
||||
if(regattaId.equals(regatta.getId())) {
|
||||
return regatta;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<RaceGroupDTO> getRaceGroups() {
|
||||
return raceGroups;
|
||||
}
|
||||
|
||||
public EventContext withRaceGroups(List<RaceGroupDTO> raceGroups) {
|
||||
this.raceGroups = raceGroups;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<LeaderboardGroupDTO> getLeaderboardGroups() {
|
||||
return leaderboardGroups;
|
||||
}
|
||||
|
||||
public EventContext withLeaderboardGroups(List<LeaderboardGroupDTO> leaderboardGroups) {
|
||||
this.leaderboardGroups = leaderboardGroups;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RegattaAnalyticsDataManager getRegattaAnalyticsManager() {
|
||||
return regattaAnalyticsManager;
|
||||
}
|
||||
|
||||
public EventContext withRegattaAnalyticsManager(RegattaAnalyticsDataManager regattaAnalyticsManager) {
|
||||
this.regattaAnalyticsManager = regattaAnalyticsManager;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MediaDTO getMedia() {
|
||||
return media;
|
||||
}
|
||||
|
||||
public EventContext withMedia(MediaDTO mediaDTO) {
|
||||
this.media = mediaDTO;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.place.shared.Prefix;
|
||||
|
||||
public class EventDefaultPlace extends AbstractEventPlace {
|
||||
|
||||
public EventDefaultPlace(EventContext ctx) {
|
||||
super(ctx);
|
||||
}
|
||||
|
||||
public EventDefaultPlace(String eventUuidAsString) {
|
||||
super(eventUuidAsString);
|
||||
}
|
||||
|
||||
@Prefix(EventPrefixes.EventDefault)
|
||||
public static class Tokenizer extends AbstractEventPlace.Tokenizer<EventDefaultPlace> {
|
||||
@Override
|
||||
protected EventDefaultPlace getRealPlace(EventContext context) {
|
||||
return new EventDefaultPlace(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public interface EventPlaceNavigator {
|
||||
void goToOverview();
|
||||
void goToRegattas();
|
||||
void goToSchedule();
|
||||
void goToMedia();
|
||||
void goToRegattaRaces(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard, RaceGroupDTO raceGroup);
|
||||
String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race);
|
||||
void openOverallLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup);
|
||||
void openLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
|
||||
public class EventPrefixes {
|
||||
|
||||
public static final String EventDefault = "/event/";
|
||||
public static final String MultiregattaOverview = "/multiregatta/overview/";
|
||||
public static final String MultiregattaRegattas = "/multiregatta/regattas/";
|
||||
public static final String MultiregattaMedia = "/multiregatta/media/";
|
||||
public static final String RegattaOverview = "/regatta/overview/";
|
||||
public static final String RegattaRaces = "/regatta/races/";
|
||||
public static final String RegattaLeaderboard = "/regatta/leaderboard/";
|
||||
public static final String RegattaCompetitorAnalytics = "/regatta/competitoranalytics/";
|
||||
public static final String RegattaMedia = "/regatta/media/";
|
||||
public static final String SeriesDefault = "/series/";
|
||||
public static final String SeriesOverview = "/series/overview/";
|
||||
public static final String SeriesEvents = "/series/events/";
|
||||
public static final String EventSeriesCompetitorAnalytics = "/series/competitoranalytics/";
|
||||
public static final String EventSeriesOverallLeaderboard = "/series/overallleaderboard/";
|
||||
public static final String EventSeriesLeaderboards = "/series/leaderboards/";
|
||||
public static final String EventSeriesMedia = "/series/media/";
|
||||
}
|
||||
@@ -2,11 +2,83 @@ package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
import com.google.gwt.place.shared.Place;
|
||||
import com.google.gwt.safehtml.shared.SafeUri;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.HomeServiceAsync;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.AbstractEventRegattaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.events.EventsPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.start.StartPlace;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.HasRegattaMetadata;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public interface EventView {
|
||||
Widget asWidget();
|
||||
public interface EventView<PLACE extends AbstractEventPlace, PRES extends EventView.Presenter> extends IsWidget {
|
||||
|
||||
public interface Presenter {
|
||||
EventContext getCtx();
|
||||
|
||||
void handleTabPlaceSelection(TabView<?, ? extends Presenter> selectedActivity);
|
||||
|
||||
SafeUri getUrl(AbstractEventPlace place);
|
||||
void navigateTo(Place place);
|
||||
boolean needsSelectionInHeader();
|
||||
void forPlaceSelection(PlaceCallback callback);
|
||||
Timer getTimerForClientServerOffset();
|
||||
SailingServiceAsync getSailingService();
|
||||
HomeServiceAsync getHomeService();
|
||||
|
||||
AbstractEventRegattaPlace getPlaceForRegatta(String regattaId);
|
||||
AbstractEventRegattaPlace getPlaceForRegattaRaces(String regattaId);
|
||||
|
||||
PlaceNavigation<StartPlace> getHomeNavigation();
|
||||
PlaceNavigation<EventsPlace> getEventsNavigation();
|
||||
PlaceNavigation<EventDefaultPlace> getCurrentEventNavigation();
|
||||
PlaceNavigation<SeriesDefaultPlace> getCurrentEventSeriesNavigation();
|
||||
|
||||
boolean showRegattaMetadata();
|
||||
HasRegattaMetadata getRegattaMetadata();
|
||||
|
||||
String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race);
|
||||
|
||||
PlaceNavigation<RegattaRacesPlace> getRegattaRacesNavigation(String regattaName);
|
||||
PlaceNavigation<AbstractEventRegattaPlace> getRegattaNavigation(String regattaName);
|
||||
|
||||
void ensureRegattaStructure(AsyncCallback<List<RaceGroupDTO>> callback);
|
||||
void ensureLeaderboardGroups(AsyncCallback<List<LeaderboardGroupDTO>> callback);
|
||||
void ensureMedia(AsyncCallback<MediaDTO> asyncCallback);
|
||||
|
||||
boolean hasMedia();
|
||||
}
|
||||
|
||||
void updateEventRaceStates(List<RegattaOverviewEntryDTO> racesStateEntries);
|
||||
public interface PlaceCallback {
|
||||
void forPlace(AbstractEventPlace place, String title, boolean active);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the presenter the view can talk to.
|
||||
*
|
||||
* @param currentPresenter
|
||||
*/
|
||||
void registerPresenter(PRES currentPresenter);
|
||||
|
||||
/**
|
||||
* Tell the view to process tabbar place navigation
|
||||
*
|
||||
* @param place
|
||||
*/
|
||||
void navigateTabsTo(PLACE place);
|
||||
|
||||
void showErrorInCurrentTab(IsWidget errorView);
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
public interface EventWithoutRegattasView {
|
||||
Widget asWidget();
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.Window;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.common.dto.RaceDTO;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace.EventNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.EventHeader;
|
||||
import com.sap.sailing.gwt.home.client.place.event.media.EventMedia;
|
||||
import com.sap.sailing.gwt.home.client.place.event.overview.EventOverview;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattalist.EventRegattaList;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regattaraces.EventRegattaRaces;
|
||||
import com.sap.sailing.gwt.home.client.place.event.schedule.EventSchedule;
|
||||
import com.sap.sailing.gwt.home.client.shared.eventsponsors.EventSponsors;
|
||||
import com.sap.sailing.gwt.ui.client.EntryPointLinkFactory;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.raceboard.RaceBoardViewConfiguration;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RegattaOverviewEntryDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.common.Util.Triple;
|
||||
import com.sap.sse.gwt.client.player.Timer;
|
||||
|
||||
public class TabletAndDesktopEventView extends Composite implements EventView, EventPlaceNavigator {
|
||||
private static EventViewUiBinder uiBinder = GWT.create(EventViewUiBinder.class);
|
||||
|
||||
interface EventViewUiBinder extends UiBinder<Widget, TabletAndDesktopEventView> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) EventHeader eventHeader;
|
||||
@UiField(provided=true) EventOverview eventOverview;
|
||||
@UiField(provided=true) EventSchedule eventSchedule;
|
||||
@UiField(provided=true) EventMedia eventMedia;
|
||||
@UiField(provided=true) EventRegattaList eventRegattaList;
|
||||
@UiField(provided=true) EventRegattaRaces eventRegattaRaces;
|
||||
|
||||
@UiField EventSponsors eventSponsors;
|
||||
|
||||
private final List<Widget> pageElements;
|
||||
private final EventDTO event;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private EventPlace currentInternalPlace;
|
||||
|
||||
public TabletAndDesktopEventView(SailingServiceAsync sailingService, EventDTO event, EventNavigationTabs navigationTab, List<RaceGroupDTO> raceGroups, String leaderboardName,
|
||||
Timer timerForClientServerOffset, HomePlacesNavigator navigator) {
|
||||
this.event = event;
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> regattaStructure = getRegattaStructure(event, raceGroups);
|
||||
|
||||
eventHeader = new EventHeader(event, navigator, this);
|
||||
eventRegattaList = new EventRegattaList(event, regattaStructure, timerForClientServerOffset, navigator, this);
|
||||
eventRegattaRaces = new EventRegattaRaces(event, timerForClientServerOffset, navigator, this);
|
||||
eventOverview = new EventOverview(event, this);
|
||||
eventSchedule = new EventSchedule(event, this);
|
||||
eventMedia = new EventMedia(event, this);
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
pageElements = Arrays.asList(new Widget[] { eventOverview, eventRegattaList, eventRegattaRaces, eventMedia, eventSchedule });
|
||||
|
||||
Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO> selectedRegatta = null;
|
||||
if(leaderboardName != null) {
|
||||
selectedRegatta = regattaStructure.get(leaderboardName);
|
||||
}
|
||||
|
||||
// in case we only have one regatta/leaderboard we go directly to the 'races' page
|
||||
if(selectedRegatta == null && regattaStructure.size() == 1) {
|
||||
selectedRegatta = regattaStructure.get(0);
|
||||
}
|
||||
|
||||
if(selectedRegatta != null && (navigationTab == EventNavigationTabs.Regatta || !event.isFakeSeries())) {
|
||||
goToRegattaRaces(selectedRegatta.getC(), selectedRegatta.getB(), selectedRegatta.getA());
|
||||
} else {
|
||||
goToRegattas();
|
||||
}
|
||||
if(event.getSponsorImageURLs() != null && event.getSponsorImageURLs().size() > 0) {
|
||||
eventSponsors.setVisible(false);
|
||||
eventSponsors.setEventSponsors(event.getSponsorImageURLs());
|
||||
} else {
|
||||
eventSponsors.setVisible(false);
|
||||
eventSponsors.setEventSponsors(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEventRaceStates(List<RegattaOverviewEntryDTO> racesStateEntries) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToOverview() {
|
||||
setVisibleEventElement(eventOverview);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Overview, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToRegattas() {
|
||||
setVisibleEventElement(eventRegattaList);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Regattas, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToRegattaRaces(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard, RaceGroupDTO raceGroup) {
|
||||
eventRegattaRaces.setRaces(leaderboardGroup, false, leaderboard, raceGroup);
|
||||
eventHeader.setCompactHeader();
|
||||
setVisibleEventElement(eventRegattaRaces);
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Regatta, leaderboard.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToSchedule() {
|
||||
setVisibleEventElement(eventSchedule);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Schedule, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToMedia() {
|
||||
setVisibleEventElement(eventMedia);
|
||||
eventHeader.setFullsizeHeader();
|
||||
|
||||
currentInternalPlace = new EventPlace(event.id.toString(), EventNavigationTabs.Media, null);
|
||||
}
|
||||
|
||||
public String getRaceViewerURL(StrippedLeaderboardDTO leaderboard, RaceDTO race) {
|
||||
RegattaAndRaceIdentifier raceIdentifier = race.getRaceIdentifier();
|
||||
return EntryPointLinkFactory.createRaceBoardLink(createRaceBoardLinkParameters(leaderboard.name, raceIdentifier));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard) {
|
||||
String link = EntryPointLinkFactory.createLeaderboardLink(createLeaderboardLinkParameters(leaderboardGroup, leaderboard));
|
||||
Window.open(link, "_blank", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openOverallLeaderboardViewer(LeaderboardGroupDTO leaderboardGroup) {
|
||||
String link = EntryPointLinkFactory.createLeaderboardLink(createOverallLeaderboardLinkParameters(leaderboardGroup));
|
||||
Window.open(link, "_blank", "");
|
||||
}
|
||||
|
||||
private Map<String, String> createOverallLeaderboardLinkParameters(LeaderboardGroupDTO leaderboardGroup) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("name", leaderboardGroup.getName() + " " + LeaderboardNameConstants.OVERALL);
|
||||
linkParams.put("showRaceDetails", "true");
|
||||
if(leaderboardGroup.getDisplayName() != null) {
|
||||
linkParams.put("displayName", leaderboardGroup.getDisplayName());
|
||||
}
|
||||
linkParams.put("leaderboardGroupName", leaderboardGroup.getName());
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
private Map<String, String> createRaceBoardLinkParameters(String leaderboardName, RegattaAndRaceIdentifier raceIdentifier) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("leaderboardName", leaderboardName);
|
||||
linkParams.put("raceName", raceIdentifier.getRaceName());
|
||||
// TODO this must only be forwarded if there is a logged-on user
|
||||
// linkParams.put(RaceBoardViewConfiguration.PARAM_CAN_REPLAY_DURING_LIVE_RACES, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_MAPCONTROLS, "true");
|
||||
linkParams.put(RaceBoardViewConfiguration.PARAM_VIEW_SHOW_NAVIGATION_PANEL, "true");
|
||||
linkParams.put("regattaName", raceIdentifier.getRegattaName());
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
private Map<String, String> createLeaderboardLinkParameters(LeaderboardGroupDTO leaderboardGroup, StrippedLeaderboardDTO leaderboard) {
|
||||
Map<String, String> linkParams = new HashMap<String, String>();
|
||||
linkParams.put("eventId", event.id.toString());
|
||||
linkParams.put("name", leaderboard.name);
|
||||
linkParams.put("showRaceDetails", "true");
|
||||
if (leaderboard.displayName != null) {
|
||||
linkParams.put("displayName", leaderboard.displayName);
|
||||
}
|
||||
if(leaderboardGroup != null) {
|
||||
linkParams.put("leaderboardGroupName", leaderboardGroup.getName());
|
||||
}
|
||||
return linkParams;
|
||||
}
|
||||
|
||||
private void setVisibleEventElement(Widget visibleWidget) {
|
||||
for (Widget element : pageElements) {
|
||||
element.setVisible(element == visibleWidget);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> getRegattaStructure(EventDTO event, List<RaceGroupDTO> raceGroups) {
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> result = new HashMap<>();
|
||||
Map<String, RaceGroupDTO> raceGroupsMap = new HashMap<>();
|
||||
for (RaceGroupDTO raceGroup: raceGroups) {
|
||||
raceGroupsMap.put(raceGroup.getName(), raceGroup);
|
||||
}
|
||||
|
||||
for (LeaderboardGroupDTO leaderboardGroup : event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
String leaderboardName = leaderboard.name;
|
||||
result.put(leaderboardName, new Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>(raceGroupsMap.get(leaderboardName),
|
||||
leaderboard, leaderboardGroup));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
|
||||
<g:HTMLPanel>
|
||||
<p:header.EventHeader ui:field='eventHeader'/>
|
||||
<p:overview.EventOverview ui:field='eventOverview'/>
|
||||
<p:regattalist.EventRegattaList ui:field='eventRegattaList'/>
|
||||
<p:regattaraces.EventRegattaRaces ui:field='eventRegattaRaces'/>
|
||||
<p:schedule.EventSchedule ui:field='eventSchedule'/>
|
||||
<p:media.EventMedia ui:field='eventMedia'/>
|
||||
<s:eventsponsors.EventSponsors ui:field='eventSponsors'/>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
|
||||
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.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.header.EventHeader;
|
||||
import com.sap.sailing.gwt.ui.client.SailingServiceAsync;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class TabletAndDesktopEventWithoutRegattasView extends Composite implements EventWithoutRegattasView {
|
||||
private static EventViewUiBinder uiBinder = GWT.create(EventViewUiBinder.class);
|
||||
|
||||
interface EventViewUiBinder extends UiBinder<Widget, TabletAndDesktopEventWithoutRegattasView> {
|
||||
}
|
||||
|
||||
@UiField(provided=true) EventHeader eventHeader;
|
||||
|
||||
public TabletAndDesktopEventWithoutRegattasView(SailingServiceAsync sailingService, EventDTO event, HomePlacesNavigator placeNavigator) {
|
||||
eventHeader = new EventHeader(event, placeNavigator);
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:s="urn:import:com.sap.sailing.gwt.home.client.shared"
|
||||
xmlns:p="urn:import:com.sap.sailing.gwt.home.client.place.event"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui">
|
||||
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
|
||||
<ui:style>
|
||||
.infoPanel {
|
||||
height: 300px;
|
||||
padding-top: 2em;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<p:header.EventHeader ui:field='eventHeader'/>
|
||||
<div class="{res.mainCss.grid} {style.infoPanel}">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
There is no information available about the regattas of this event yet.
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -1,104 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.header;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.ImageElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public class CompactEventHeader extends Composite {
|
||||
private static CompactHeaderUiBinder uiBinder = GWT.create(CompactHeaderUiBinder.class);
|
||||
|
||||
interface CompactHeaderUiBinder extends UiBinder<Widget, CompactEventHeader> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
@UiField Anchor regattaLink;
|
||||
@UiField Anchor regattaLink2;
|
||||
@UiField ImageElement eventLogo;
|
||||
@UiField SpanElement eventNameSpan;
|
||||
|
||||
private final EventDTO event;
|
||||
private final HomePlacesNavigator placeNavigator;
|
||||
private final PlaceNavigation<EventPlace> regattaNavigation;
|
||||
|
||||
public CompactEventHeader(EventDTO event, String leaderboardName, HomePlacesNavigator placeNavigator) {
|
||||
this.event = event;
|
||||
this.placeNavigator = placeNavigator;
|
||||
|
||||
EventHeaderResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
regattaNavigation = placeNavigator.getRegattaNavigation(event.id.toString(), leaderboardName, event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattaLink.setHref(regattaNavigation.getTargetUrl());
|
||||
regattaLink2.setHref(regattaNavigation.getTargetUrl());
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private StrippedLeaderboardDTO findLeaderboardWithSameCourseArea(EventDTO event) {
|
||||
for(LeaderboardGroupDTO leaderboardGroup: event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
for(CourseAreaDTO courseArea: event.venue.getCourseAreas()) {
|
||||
if(leaderboard.defaultCourseAreaId != null && leaderboard.defaultCourseAreaId.equals(courseArea.id)) {
|
||||
return leaderboard;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
boolean isSeries = event.isFakeSeries();
|
||||
|
||||
String eventName = event.getName();
|
||||
if(isSeries) {
|
||||
LeaderboardGroupDTO leaderboardGroupDTO = event.getLeaderboardGroups().get(0);
|
||||
eventName = leaderboardGroupDTO.getDisplayName() != null ? leaderboardGroupDTO.getDisplayName() : leaderboardGroupDTO.getName();
|
||||
|
||||
StrippedLeaderboardDTO leaderboardFittingToEvent = findLeaderboardWithSameCourseArea(event);
|
||||
if(leaderboardFittingToEvent != null) {
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
}
|
||||
eventNameSpan.setInnerText(eventName);
|
||||
String logoUrl = event.getLogoImageURL() != null ? event.getLogoImageURL() : EventHeaderResources.INSTANCE.defaultEventLogoImage().getSafeUri().asString();
|
||||
eventLogo.setSrc(logoUrl);
|
||||
}
|
||||
|
||||
@UiHandler("regattaLink")
|
||||
void gotoRegattaClicked(ClickEvent event) {
|
||||
handleClickEvent(event, regattaNavigation);
|
||||
}
|
||||
|
||||
@UiHandler("regattaLink2")
|
||||
void gotoRegatta2Clicked(ClickEvent event) {
|
||||
handleClickEvent(event, regattaNavigation);
|
||||
}
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
placeNavigator.goToPlace(placeNavigation);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<!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.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.client.place.event.header.EventHeaderResources" />
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- event navigation-->
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompact}">
|
||||
<div class="{res.mainCss.grid}" style="margin-left:5rem;margin-right:5rem;">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
<g:Anchor ui:field="regattaLink">
|
||||
<img ui:field="eventLogo" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img>
|
||||
</g:Anchor>
|
||||
<g:Anchor ui:field="regattaLink2" styleName="{res.mainCss.button} {local_res.css.eventnavigation_link}">
|
||||
<span ui:field='eventNameSpan' />
|
||||
</g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -1,241 +0,0 @@
|
||||
.dropdown {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
width: 20em;
|
||||
max-width: 100%;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown_head {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
.dropdown_head_title {
|
||||
cursor: pointer;
|
||||
background: #f8f8f8;
|
||||
color: #666;
|
||||
height: 2.733333333333333em;
|
||||
line-height: 2.666666666666667em;
|
||||
padding-left: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dropdown_head_titlebutton {
|
||||
float: right;
|
||||
}
|
||||
.dropdown_content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
background: #f6f9fc;
|
||||
display: none;
|
||||
width: 20em;
|
||||
height: auto;
|
||||
max-height: 23.333333333333332em;
|
||||
overflow: auto;
|
||||
-webkit-box-shadow: 0 0.066666666666667em 0.266666666666667em #ccc;
|
||||
box-shadow: 0 0.066666666666667em 0.266666666666667em #ccc;
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
.dropdown_content_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1.333333333333333em 1em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.dropdown_content_link:hover,
|
||||
.dropdown_content_link:focus {
|
||||
background: #f8f8f8;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dropdown_content_link:hover .dropdown_content_link_title,
|
||||
.dropdown_content_link:focus .dropdown_content_link_title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.dropdown_content_link_title {
|
||||
color: #008fcc;
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.dropdown_content_link_subtitle {
|
||||
color: #666;
|
||||
font-size: 1.066666666666667em;
|
||||
}
|
||||
.leaderboardquickaccess {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
text-align: right;
|
||||
}
|
||||
.eventheaderwrapper {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='compact'] .eventheader,
|
||||
.eventheaderwrapper[data-navigationtype='compact'] .eventnavigationnormal {
|
||||
display: none;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='normal'] .eventnavigationcompact {
|
||||
display: none;
|
||||
}
|
||||
.eventheaderwrapper[data-navigationtype='normal'] .eventnavigationcompactfloating {
|
||||
-webkit-transition: top 0.4s;
|
||||
-moz-transition: top 0.4s;
|
||||
-o-transition: top 0.4s;
|
||||
-ms-transition: top 0.4s;
|
||||
transition: top 0.4s;
|
||||
}
|
||||
.eventheader {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
background: #f2f2f2;
|
||||
padding: 2em 0;
|
||||
border-bottom: 1px solid darkgray;
|
||||
}
|
||||
.eventheader_intro {
|
||||
padding-left: 10.333333333333334em;
|
||||
min-height: 9.333333333333334em;
|
||||
position: relative;
|
||||
}
|
||||
.eventheader_intro_description {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventheader_intro_logo {
|
||||
-webkit-box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
max-width: 140px;
|
||||
max-height: 140px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.eventheader_intro_logo_image {
|
||||
border: solid 5px #fff;
|
||||
max-height: 100%;
|
||||
}
|
||||
.eventheader_intro_name {
|
||||
display: inline-block;
|
||||
margin: 0 0.333333333333333em 0 0;
|
||||
}
|
||||
.eventheader_intro_details {
|
||||
margin-bottom: 0.666666666666667em;
|
||||
padding-bottom: 0.666666666666667em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
.eventheader_intro_details_item {
|
||||
display: inline-block;
|
||||
border-right: 1px solid #ddd;
|
||||
padding: 0.266666666666667em 0.666666666666667em 0.266666666666667em 0;
|
||||
margin-right: 0.666666666666667em;
|
||||
}
|
||||
.eventheader_intro_details_itemlink {
|
||||
color: inherit;
|
||||
}
|
||||
.eventheader_intro_details_item:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
.eventheader_intro_details_item:nth-child(2) {
|
||||
border: none;
|
||||
}
|
||||
.eventheader_intro_details_item:last-child {
|
||||
display: block;
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
@media (min-width: 50em) {
|
||||
.eventheader_intro_details_item:nth-child(2) {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.eventheader_intro_details_item:last-child {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.eventheader_sharing {
|
||||
text-align: right;
|
||||
}
|
||||
.eventheader_sharing_item {
|
||||
display: inline-block;
|
||||
height: 2.666666666666667em;
|
||||
width: 2.666666666666667em;
|
||||
margin-left: 0.333333333333333em;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.eventheader_sharing_itememail {
|
||||
background-color: #f0ab00;
|
||||
background-image: url("images/home/email-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itememail:hover,
|
||||
.eventheader_sharing_itememail:focus {
|
||||
background-color: #d89a00;
|
||||
}
|
||||
.eventheader_sharing_itemtwitter {
|
||||
background-color: #32b5e2;
|
||||
background-image: url("images/home/twitter-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itemtwitter:hover,
|
||||
.eventheader_sharing_itemtwitter:focus {
|
||||
background-color: #1faada;
|
||||
}
|
||||
.eventheader_sharing_itemfacebook {
|
||||
background-color: #3b5998;
|
||||
background-image: url("images/home/facebook-icon.png");
|
||||
}
|
||||
.eventheader_sharing_itemfacebook:hover,
|
||||
.eventheader_sharing_itemfacebook:focus {
|
||||
background-color: #355089;
|
||||
}
|
||||
.locationicon {
|
||||
vertical-align: text-bottom;
|
||||
margin-right: 0.333333333333333em;
|
||||
}
|
||||
.eventnavigation {
|
||||
font-size: 15px;
|
||||
/* @alternate */ font-size: 1rem;
|
||||
}
|
||||
.eventnavigationnormal {
|
||||
position: relative;
|
||||
}
|
||||
.eventnavigationcompact,
|
||||
.eventnavigationcompactfloating {
|
||||
background: #f2f2f2;
|
||||
margin: 0;
|
||||
padding: 1em 0;
|
||||
}
|
||||
.eventnavigationcompact_logo,
|
||||
.eventnavigationcompactfloating_logo {
|
||||
border: solid 2px #fff;
|
||||
-webkit-box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
box-shadow: 0 0 5px rgba(204,204,204,0.25);
|
||||
margin-right: 0.666666666666667em;
|
||||
}
|
||||
.eventnavigationcompactfloating {
|
||||
position: fixed;
|
||||
top: -8em;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
.eventnavigationcompactfloating.eventnavigationfixed {
|
||||
top: 0;
|
||||
}
|
||||
.eventnavigation_link {
|
||||
text-transform: uppercase;
|
||||
margin-right: 0.625em;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.eventnavigation_link:hover,
|
||||
.eventnavigation_link:focus {
|
||||
background-color: #b8b8b8;
|
||||
}
|
||||
.eventnavigation_linkactive {
|
||||
background-color: #f0ab00;
|
||||
}
|
||||
.eventnavigation_linkactive:hover,
|
||||
.eventnavigation_linkactive:focus {
|
||||
background-color: #d89a00;
|
||||
}
|
||||
@@ -1,354 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.header;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.ImageElement;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
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.Event;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.impl.HyperlinkImpl;
|
||||
import com.sap.sailing.domain.common.LeaderboardNameConstants;
|
||||
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.series.SeriesPlace.SeriesNavigationTabs;
|
||||
import com.sap.sailing.gwt.home.client.shared.EventDatesFormatterUtil;
|
||||
import com.sap.sailing.gwt.ui.shared.CourseAreaDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
|
||||
public class EventHeader extends AbstractEventComposite {
|
||||
private static EventHeaderUiBinder uiBinder = GWT.create(EventHeaderUiBinder.class);
|
||||
|
||||
interface EventHeaderUiBinder extends UiBinder<Widget, EventHeader> {
|
||||
}
|
||||
|
||||
private static final HyperlinkImpl HYPERLINK_IMPL = GWT.create(HyperlinkImpl.class);
|
||||
|
||||
// @UiField Anchor overviewLink;
|
||||
@UiField Anchor regattasLink;
|
||||
// @UiField Anchor scheduleLink;
|
||||
// @UiField Anchor mediaLink;
|
||||
//
|
||||
// @UiField Anchor overviewLink2;
|
||||
@UiField Anchor regattasLink2;
|
||||
// @UiField Anchor scheduleLink2;
|
||||
// @UiField Anchor mediaLink2;
|
||||
//
|
||||
// @UiField Anchor overviewLink3;
|
||||
// @UiField Anchor regattasLink3;
|
||||
// @UiField Anchor scheduleLink3;
|
||||
// @UiField Anchor mediaLink3;
|
||||
@UiField Anchor officalWebsiteAnchor;
|
||||
@UiField Anchor twitterAnchor;
|
||||
@UiField Anchor facebookAnchor;
|
||||
@UiField DivElement seriesLeaderboardDiv;
|
||||
@UiField Anchor seriesLeaderboardAnchor;
|
||||
|
||||
@UiField DivElement eventHeaderWrapperDiv;
|
||||
@UiField DivElement regattaNameInSeriesDiv;
|
||||
@UiField SpanElement eventNameSpan;
|
||||
@UiField SpanElement eventName2Span;
|
||||
// @UiField SpanElement eventName3;
|
||||
@UiField DivElement eventDateDiv;
|
||||
@UiField DivElement eventDescriptionDiv;
|
||||
@UiField SpanElement venueNameSpan;
|
||||
@UiField DivElement isLiveDiv;
|
||||
@UiField DivElement isFinishedDiv;
|
||||
|
||||
@UiField ImageElement eventLogo;
|
||||
@UiField ImageElement eventLogo2;
|
||||
// @UiField ImageElement eventLogo3;
|
||||
|
||||
// private final List<Anchor> links1;
|
||||
// private final List<Anchor> links2;
|
||||
// private final List<Anchor> links3;
|
||||
|
||||
private final HomePlacesNavigator placeNavigator;
|
||||
private PlaceNavigation<SeriesPlace> seriesAnalyticsNavigation = null;
|
||||
private PlaceNavigation<EventPlace> regattasNavigation = null;
|
||||
|
||||
public EventHeader(EventDTO event, HomePlacesNavigator placeNavigator, EventPlaceNavigator pageNavigator) {
|
||||
super(event, pageNavigator);
|
||||
|
||||
this.placeNavigator = placeNavigator;
|
||||
initResources();
|
||||
|
||||
// links1 = Arrays.asList(new Anchor[] { overviewLink, regattasLink, scheduleLink, mediaLink });
|
||||
// links2 = Arrays.asList(new Anchor[] { overviewLink2, regattasLink2, scheduleLink2, mediaLink2 });
|
||||
// links3 = Arrays.asList(new Anchor[] { overviewLink3, regattasLink3, scheduleLink3, mediaLink3 });
|
||||
// setActiveLink(links1, overviewLink);
|
||||
// setActiveLink(links2, overviewLink2);
|
||||
// setActiveLink(links3, overviewLink3);
|
||||
|
||||
if(event.isRunning()) {
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else if (event.isFinished()) {
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
} else {
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
setFullsizeHeader();
|
||||
updateUI();
|
||||
}
|
||||
|
||||
public EventHeader(EventDTO event, HomePlacesNavigator placeNavigator) {
|
||||
super(event, null);
|
||||
|
||||
this.placeNavigator = placeNavigator;
|
||||
initResources();
|
||||
|
||||
isFinishedDiv.getStyle().setDisplay(Display.NONE);
|
||||
isLiveDiv.getStyle().setDisplay(Display.NONE);
|
||||
|
||||
setFullsizeHeader();
|
||||
updateUI();
|
||||
}
|
||||
|
||||
private void initResources() {
|
||||
EventHeaderResources.INSTANCE.css().ensureInjected();
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
public void setFullsizeHeader() {
|
||||
eventHeaderWrapperDiv.setAttribute("data-navigationtype", "normal");
|
||||
}
|
||||
|
||||
public void setCompactHeader() {
|
||||
eventHeaderWrapperDiv.setAttribute("data-navigationtype", "compact");
|
||||
EventDTO event = getEvent();
|
||||
|
||||
PlaceNavigation<EventPlace> regattaDetailsNavigation = placeNavigator.getEventNavigation(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
regattasLink.setHref(regattaDetailsNavigation.getTargetUrl());
|
||||
regattasLink2.setHref(regattaDetailsNavigation.getTargetUrl());
|
||||
}
|
||||
|
||||
private StrippedLeaderboardDTO findLeaderboardWithSameCourseArea(EventDTO event) {
|
||||
for(LeaderboardGroupDTO leaderboardGroup: event.getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
for(CourseAreaDTO courseArea: event.venue.getCourseAreas()) {
|
||||
if(leaderboard.defaultCourseAreaId != null && leaderboard.defaultCourseAreaId.equals(courseArea.id)) {
|
||||
return leaderboard;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
EventDTO event = getEvent();
|
||||
boolean isSeries = event.isFakeSeries();
|
||||
|
||||
String eventName = event.getName();
|
||||
|
||||
regattasNavigation = placeNavigator.getEventNavigation(event.id.toString(), event.getBaseURL(), event.isOnRemoteServer());
|
||||
if(isSeries) {
|
||||
LeaderboardGroupDTO leaderboardGroupDTO = event.getLeaderboardGroups().get(0);
|
||||
eventName = leaderboardGroupDTO.getDisplayName() != null ? leaderboardGroupDTO.getDisplayName() : leaderboardGroupDTO.getName();
|
||||
|
||||
String overallLeaderboardName = leaderboardGroupDTO.getName() + " " + LeaderboardNameConstants.OVERALL;
|
||||
seriesAnalyticsNavigation = placeNavigator.getSeriesAnalyticsNavigation(event.id.toString(), SeriesNavigationTabs.OverallLeaderboard, overallLeaderboardName, event.getBaseURL(), event.isOnRemoteServer());
|
||||
seriesLeaderboardAnchor.setHref(seriesAnalyticsNavigation.getTargetUrl());
|
||||
|
||||
StrippedLeaderboardDTO leaderboardFittingToEvent = findLeaderboardWithSameCourseArea(event);
|
||||
if (leaderboardFittingToEvent != null) {
|
||||
regattaNameInSeriesDiv.setInnerText(leaderboardFittingToEvent.displayName);
|
||||
} else {
|
||||
regattaNameInSeriesDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
} else {
|
||||
seriesLeaderboardDiv.getStyle().setDisplay(Display.NONE);
|
||||
regattaNameInSeriesDiv.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
eventNameSpan.setInnerHTML(eventName);
|
||||
eventName2Span.setInnerHTML(eventName);
|
||||
// eventName3.setInnerHTML(event.getName());
|
||||
venueNameSpan.setInnerHTML(event.venue.getName());
|
||||
eventDateDiv.setInnerHTML(EventDatesFormatterUtil.formatDateRangeWithYear(event.startDate, event.endDate));
|
||||
|
||||
if(event.getDescription() != null) {
|
||||
eventDescriptionDiv.setInnerHTML(event.getDescription());
|
||||
}
|
||||
if(event.getOfficialWebsiteURL() != null) {
|
||||
String title = event.getOfficialWebsiteURL();
|
||||
if(title.startsWith("http://")) {
|
||||
title = title.substring("http://".length(), title.length());
|
||||
}
|
||||
if(title.length() > 35) {
|
||||
title = TextMessages.INSTANCE.officalEventWebsite();
|
||||
}
|
||||
officalWebsiteAnchor.setText(title);
|
||||
officalWebsiteAnchor.setHref(event.getOfficialWebsiteURL());
|
||||
} else {
|
||||
officalWebsiteAnchor.setVisible(false);
|
||||
}
|
||||
if(event.getTwitterURL() != null) {
|
||||
twitterAnchor.setHref(event.getTwitterURL());
|
||||
} else {
|
||||
twitterAnchor.setVisible(false);
|
||||
}
|
||||
if(event.getFacebookURL() != null) {
|
||||
facebookAnchor.setHref(event.getFacebookURL());
|
||||
} else {
|
||||
facebookAnchor.setVisible(false);
|
||||
}
|
||||
|
||||
String logoUrl = event.getLogoImageURL() != null ? event.getLogoImageURL() : EventHeaderResources.INSTANCE.defaultEventLogoImage().getSafeUri().asString();;
|
||||
eventLogo.setSrc(logoUrl);
|
||||
eventLogo2.setSrc(logoUrl);
|
||||
// eventLogo3.setSrc(logoUrl);
|
||||
}
|
||||
|
||||
// @UiHandler("overviewLink")
|
||||
// void overviewClicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("overviewLink2")
|
||||
// void overview2Clicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("overviewLink3")
|
||||
// void overview3Clicked(ClickEvent event) {
|
||||
// showOverview();
|
||||
// }
|
||||
|
||||
// private void showOverview() {
|
||||
// pageNavigator.goToOverview();
|
||||
// setActiveLink(links1, overviewLink);
|
||||
// setActiveLink(links2, overviewLink2);
|
||||
// setActiveLink(links3, overviewLink3);
|
||||
// }
|
||||
|
||||
@UiHandler("regattasLink")
|
||||
void regattasClicked(ClickEvent event) {
|
||||
showRegattas(event);
|
||||
}
|
||||
|
||||
@UiHandler("regattasLink2")
|
||||
void regattas2Clicked(ClickEvent event) {
|
||||
showRegattas(event);
|
||||
}
|
||||
|
||||
@UiHandler("seriesLeaderboardAnchor")
|
||||
void seriesLeaderboardClicked(ClickEvent e) {
|
||||
EventDTO event = getEvent();
|
||||
if(event.isFakeSeries()) {
|
||||
handleClickEvent(e, seriesAnalyticsNavigation);
|
||||
}
|
||||
}
|
||||
|
||||
// @UiHandler("regattasLink3")
|
||||
// void regattas3Clicked(ClickEvent event) {
|
||||
// showRegattas();
|
||||
// }
|
||||
//
|
||||
private void showRegattas(ClickEvent e) {
|
||||
handleClickEvent(e, regattasNavigation);
|
||||
// setActiveLink(links1, regattasLink);
|
||||
// setActiveLink(links2, regattasLink2);
|
||||
// setActiveLink(links3, regattasLink3);
|
||||
}
|
||||
|
||||
// @UiHandler("scheduleLink")
|
||||
// void scheduleClicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("scheduleLink2")
|
||||
// void schedule2Clicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("scheduleLink3")
|
||||
// void schedule3Clicked(ClickEvent event) {
|
||||
// showSchedule();
|
||||
// }
|
||||
//
|
||||
// private void showSchedule() {
|
||||
// pageNavigator.goToSchedule();
|
||||
// setActiveLink(links1, scheduleLink);
|
||||
// setActiveLink(links2, scheduleLink2);
|
||||
// setActiveLink(links3, scheduleLink3);
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink")
|
||||
// void mediaClicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink2")
|
||||
// void media2Clicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// @UiHandler("mediaLink3")
|
||||
// void media3Clicked(ClickEvent event) {
|
||||
// showMedia();
|
||||
// }
|
||||
//
|
||||
// private void showMedia() {
|
||||
// pageNavigator.goToMedia();
|
||||
// setActiveLink(links1, mediaLink);
|
||||
// setActiveLink(links2, mediaLink2);
|
||||
// setActiveLink(links3, mediaLink3);
|
||||
// }
|
||||
|
||||
private void handleClickEvent(ClickEvent e, PlaceNavigation<?> placeNavigation) {
|
||||
if (HYPERLINK_IMPL.handleAsClick((Event) e.getNativeEvent())) {
|
||||
placeNavigator.goToPlace(placeNavigation);
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLoad() {
|
||||
super.onLoad();
|
||||
|
||||
initNormalNavigation();
|
||||
}
|
||||
|
||||
private void initNormalNavigation() {
|
||||
// Window.addWindowScrollHandler(new Window.ScrollHandler() {
|
||||
// public void onWindowScroll(Window.ScrollEvent event) {
|
||||
// int scrollY = Math.max(0, Window.getScrollTop());
|
||||
// int navNormalOffset = eventNavigationNormalDiv.getOffsetTop();
|
||||
//
|
||||
// if (scrollY > navNormalOffset) {
|
||||
// eventNavigationFloatingDiv.addClassName(EventHeaderResources.INSTANCE.css().eventnavigationfixed());
|
||||
// } else {
|
||||
// eventNavigationFloatingDiv.removeClassName(EventHeaderResources.INSTANCE.css()
|
||||
// .eventnavigationfixed());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
// private void setActiveLink(List<Anchor> linksToSet, Anchor link) {
|
||||
// final String activeStyle = EventHeaderResources.INSTANCE.css().eventnavigation_linkactive();
|
||||
// for (Anchor l : linksToSet) {
|
||||
// if (l == link) {
|
||||
// l.addStyleName(activeStyle);
|
||||
// } else {
|
||||
// l.removeStyleName(activeStyle);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<!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.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.client.place.event.header.EventHeaderResources" />
|
||||
<ui:style>
|
||||
.action {
|
||||
float: right;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.action_link {
|
||||
background-color: #008FCC;
|
||||
color: white;
|
||||
}
|
||||
.action_link:hover {
|
||||
background-color: #0177ab;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
|
||||
<!-- The header of an event including the event navigation-->
|
||||
<div ui:field="eventHeaderWrapperDiv" data-navigationtype="normal" class="{local_res.css.eventheaderwrapper}">
|
||||
<div class="{local_res.css.eventheader}">
|
||||
<div class="{res.mainCss.grid}">
|
||||
<div class="{res.mediaCss.small9} {res.mediaCss.large8} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventheader_intro}">
|
||||
<div class="{local_res.css.eventheader_intro_logo}"><img ui:field="eventLogo" alt="" class="{local_res.css.eventheader_intro_logo_image}"></img></div>
|
||||
<h3 class="{local_res.css.eventheader_intro_name}"><span ui:field='eventNameSpan' /></h3>
|
||||
<div ui:field="isLiveDiv" data-labeltype="live" class="{res.mainCss.label}"><ui:text from='{i18n.live}'/></div>
|
||||
<div ui:field="isFinishedDiv" data-labeltype="finished" class="{res.mainCss.label}"><ui:text from='{i18n.finished}'/></div>
|
||||
<div class="{local_res.css.eventheader_intro_details}">
|
||||
<div ui:field="regattaNameInSeriesDiv" class="{local_res.css.eventheader_intro_details_item}"></div>
|
||||
<div ui:field="eventDateDiv" class="{local_res.css.eventheader_intro_details_item}"></div>
|
||||
<div class="{local_res.css.eventheader_intro_details_item}">
|
||||
<img src="images/home/location-icon.png" class="{local_res.css.locationicon}"></img>
|
||||
<span ui:field='venueNameSpan' />
|
||||
</div>
|
||||
<g:Anchor ui:field="officalWebsiteAnchor" href="javascript:;" target="_blank" styleName="{local_res.css.eventheader_intro_details_item} {local_res.css.eventheader_intro_details_itemlink}" />
|
||||
</div>
|
||||
<div ui:field="eventDescriptionDiv" class="{local_res.css.eventheader_intro"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{res.mediaCss.small3} {res.mediaCss.large4} {res.mediaCss.columns}">
|
||||
<div class="{local_res.css.eventheader_sharing}">
|
||||
<g:Anchor ui:field="twitterAnchor" title="{i18n.sharingTwitter}" target="_blank" styleName="{local_res.css.eventheader_sharing_item} {local_res.css.eventheader_sharing_itemtwitter}"></g:Anchor>
|
||||
<g:Anchor ui:field="facebookAnchor" title="{i18n.sharingFacebook}" target="_blank" styleName="{local_res.css.eventheader_sharing_item} {local_res.css.eventheader_sharing_itemfacebook}"></g:Anchor>
|
||||
</div>
|
||||
<div ui:field="seriesLeaderboardDiv" class="{local_res.css.eventheader_sharing}">
|
||||
<div class="{style.action}">
|
||||
<g:Anchor ui:field="seriesLeaderboardAnchor" styleName="{res.mainCss.button} {style.action_link}"><ui:text from='{i18n.overallLeaderboard}'/></g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompact}">
|
||||
<div class="{res.mainCss.grid}">
|
||||
<div class="{res.mediaCss.columns}">
|
||||
<g:Anchor ui:field="regattasLink">
|
||||
<img ui:field='eventLogo2' alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img>
|
||||
</g:Anchor>
|
||||
<g:Anchor ui:field="regattasLink2" styleName="{res.mainCss.button} {local_res.css.eventnavigation_link}">
|
||||
<span ui:field='eventName2Span' />
|
||||
</g:Anchor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="{local_res.css.eventnavigation} {local_res.css.eventnavigationcompactfloating}">
|
||||
<div class="{res.mainCss.grid}">
|
||||
<div class="{res.mediaCss.columns}">{#if navigation.isEvent}<a href="event-overview.html"><img src="images/{event.logo}" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img></a><a href="event-overview.html" class="{res.mainCss.button} {local_res.css.eventnavigation_link}">{event.name}</a>{/if navigation.isEvent}{#if navigation.isSeries}<a href="series-overview.html"><img src="images/{event.logo}" alt="" height="41" width="41" class="{local_res.css.eventnavigationcompact_logo}"></img></a><a href="series-overview.html" class="{res.mainCss.button} {local_res.css.eventnavigation_link}">{event.name}</a>
|
||||
</div></s>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event;
|
||||
package com.sap.sailing.gwt.home.client.place.event.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.regatta;
|
||||
package com.sap.sailing.gwt.home.client.place.event.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.legacy;
|
||||
|
||||
import com.sap.sailing.gwt.ui.client.SailingClientFactory;
|
||||
|
||||
public interface SeriesClientFactory extends SailingClientFactory {
|
||||
|
||||
// SeriesAnalyticsView createSeriesAnalyticsView(EventDTO event, String leaderboardName, SeriesNavigationTabs
|
||||
// navigationTab, Timer timerForClientServerOffset);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.sap.sailing.gwt.home.client.place.series;
|
||||
package com.sap.sailing.gwt.home.client.place.event.legacy;
|
||||
|
||||
import com.google.gwt.place.shared.PlaceTokenizer;
|
||||
import com.sap.sailing.gwt.common.client.AbstractBasePlace;
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.media;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventComposite;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPlaceNavigator;
|
||||
import com.sap.sailing.gwt.ui.shared.EventDTO;
|
||||
|
||||
public class EventMedia extends AbstractEventComposite {
|
||||
private static EventMediaUiBinder uiBinder = GWT.create(EventMediaUiBinder.class);
|
||||
|
||||
interface EventMediaUiBinder extends UiBinder<Widget, EventMedia> {
|
||||
}
|
||||
|
||||
public EventMedia(EventDTO event, EventPlaceNavigator placeNavigator) {
|
||||
super(event, placeNavigator);
|
||||
|
||||
EventMediaResources.INSTANCE.css().ensureInjected();
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<!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.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.client.place.event.media.EventMediaResources" />
|
||||
<g:HTMLPanel>
|
||||
Event Media
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.media;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
public interface EventMediaResources extends ClientBundle {
|
||||
public static final EventMediaResources INSTANCE = GWT.create(EventMediaResources.class);
|
||||
|
||||
@Source("com/sap/sailing/gwt/home/client/place/event/media/EventMedia.css")
|
||||
LocalCss css();
|
||||
|
||||
public interface LocalCss extends CssResource {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
|
||||
public abstract class AbstractMultiregattaEventPlace extends AbstractEventPlace {
|
||||
|
||||
public AbstractMultiregattaEventPlace(EventContext ctx) {
|
||||
super(ctx);
|
||||
}
|
||||
|
||||
public AbstractMultiregattaEventPlace(String eventUuidAsString) {
|
||||
super(eventUuidAsString);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
|
||||
|
||||
import com.google.gwt.event.shared.EventBus;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.sap.sailing.gwt.home.client.app.HomePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventActivity;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventClientFactory;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView.PlaceCallback;
|
||||
|
||||
public class EventMultiregattaActivity extends AbstractEventActivity<AbstractMultiregattaEventPlace> implements EventMultiregattaView.Presenter {
|
||||
|
||||
private EventMultiregattaView currentView = new TabletAndDesktopEventView();
|
||||
|
||||
public EventMultiregattaActivity(AbstractMultiregattaEventPlace place, EventClientFactory clientFactory,
|
||||
HomePlacesNavigator homePlacesNavigator) {
|
||||
super(place, clientFactory, homePlacesNavigator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
|
||||
currentView.registerPresenter(this);
|
||||
panel.setWidget(currentView);
|
||||
currentView.navigateTabsTo(currentPlace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needsSelectionInHeader() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forPlaceSelection(PlaceCallback callback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showRegattaMetadata() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected EventView<AbstractMultiregattaEventPlace, ?> getView() {
|
||||
return currentView;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
|
||||
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventView;
|
||||
|
||||
public interface EventMultiregattaView extends EventView<AbstractMultiregattaEventPlace, EventMultiregattaView.Presenter> {
|
||||
|
||||
public interface Presenter extends EventView.Presenter {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
|
||||
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
|
||||
public interface MultiregattaTabView<PLACE extends AbstractMultiregattaEventPlace> extends
|
||||
TabView<PLACE, EventMultiregattaView.Presenter> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta;
|
||||
|
||||
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.uibinder.client.UiHandler;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabPanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabPanelPlaceSelectionEvent;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.common.client.i18n.TextMessages;
|
||||
import com.sap.sailing.gwt.home.client.app.ApplicationHistoryMapper;
|
||||
import com.sap.sailing.gwt.home.client.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.client.place.event.partials.header.EventHeader;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
|
||||
public class TabletAndDesktopEventView extends Composite implements EventMultiregattaView {
|
||||
private static final ApplicationHistoryMapper historyMapper = GWT
|
||||
.<ApplicationHistoryMapper> create(ApplicationHistoryMapper.class);
|
||||
|
||||
private static MyBinder uiBinder = GWT.create(MyBinder.class);
|
||||
|
||||
private Presenter currentPresenter;
|
||||
|
||||
interface MyBinder extends UiBinder<Widget, TabletAndDesktopEventView> {
|
||||
}
|
||||
|
||||
@UiField StringMessages i18n;
|
||||
|
||||
@UiField(provided = true)
|
||||
TabPanel<EventMultiregattaView.Presenter> tabPanelUi;
|
||||
|
||||
@UiField(provided = true)
|
||||
EventHeader eventHeader;
|
||||
|
||||
public TabletAndDesktopEventView() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPresenter(final Presenter currentPresenter) {
|
||||
this.currentPresenter = currentPresenter;
|
||||
tabPanelUi = new TabPanel<>(currentPresenter, historyMapper);
|
||||
|
||||
eventHeader = new EventHeader(currentPresenter);
|
||||
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
initBreadCrumbs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigateTabsTo(AbstractMultiregattaEventPlace place) {
|
||||
tabPanelUi.activatePlace(place);
|
||||
StringBuilder titleBuilder = new StringBuilder(TextMessages.INSTANCE.sapSailing()).append(" - ");
|
||||
|
||||
titleBuilder.append(currentPresenter.showRegattaMetadata() ? currentPresenter.getRegattaMetadata()
|
||||
.getDisplayName() : currentPresenter.getCtx().getEventDTO().getDisplayName());
|
||||
String currentTabTitle = tabPanelUi.getCurrentTabTitle();
|
||||
if (currentTabTitle != null && !currentTabTitle.isEmpty()) {
|
||||
titleBuilder.append(" - ").append(currentTabTitle);
|
||||
}
|
||||
Window.setTitle(titleBuilder.toString());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@UiHandler("tabPanelUi")
|
||||
public void onTabSelection(TabPanelPlaceSelectionEvent e) {
|
||||
currentPresenter.handleTabPlaceSelection((TabView<?, EventMultiregattaView.Presenter>) e.getSelectedActivity());
|
||||
}
|
||||
|
||||
private void initBreadCrumbs() {
|
||||
addBreadCrumbItem(i18n.home(), currentPresenter.getHomeNavigation());
|
||||
addBreadCrumbItem(i18n.events(), currentPresenter.getEventsNavigation());
|
||||
addBreadCrumbItem(currentPresenter.getCtx().getEventDTO().getDisplayName(), currentPresenter.getCurrentEventNavigation());
|
||||
}
|
||||
|
||||
private void addBreadCrumbItem(String label, final PlaceNavigation<?> placeNavigation) {
|
||||
tabPanelUi.addBreadcrumbItem(label, placeNavigation.getTargetUrl(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
placeNavigation.goToPlace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showErrorInCurrentTab(IsWidget errorView) {
|
||||
tabPanelUi.overrideCurrentContentInTab(errorView);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<!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:c="urn:import:com.sap.sailing.gwt.common.client.controls.tabbar"
|
||||
xmlns:tabs="urn:import:com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs"
|
||||
xmlns:h="urn:import:com.sap.sailing.gwt.home.client.place.event.partials.header">
|
||||
<ui:with field="i18n" type="com.sap.sailing.gwt.ui.client.StringMessages" />
|
||||
<ui:style>
|
||||
.header {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mainHeader {
|
||||
width: 66.6666666666667%;
|
||||
}
|
||||
|
||||
.sharingHeader {
|
||||
width: 33.3333333333333%;
|
||||
float: right;
|
||||
padding: 0 1rem;
|
||||
position:
|
||||
relative;
|
||||
padding: 1.333333333333333em 0;
|
||||
text-align: right;
|
||||
|
||||
background-color: maroon;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.breadcrumb, .intro {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
font-size: 0.866666666666667em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.intro {
|
||||
height: 5em;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<c:TabPanel ui:field="tabPanelUi">
|
||||
<c:header>
|
||||
<h:EventHeader ui:field="eventHeader" />
|
||||
</c:header>
|
||||
<c:tabcontent title="{i18n.overview}">
|
||||
<tabs:MultiregattaOverviewTabView />
|
||||
</c:tabcontent>
|
||||
<c:tabcontent title="{i18n.regattas}">
|
||||
<tabs:MultiregattaRegattasTabView />
|
||||
</c:tabcontent>
|
||||
<c:tabcontent title="{i18n.media}">
|
||||
<tabs:MultiregattaMediaTabView />
|
||||
</c:tabcontent>
|
||||
</c:TabPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import com.google.gwt.place.shared.Prefix;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
|
||||
|
||||
public class MultiregattaMediaPlace extends AbstractMultiregattaEventPlace {
|
||||
public MultiregattaMediaPlace(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public MultiregattaMediaPlace(EventContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Prefix(EventPrefixes.MultiregattaMedia)
|
||||
public static class Tokenizer extends AbstractEventPlace.Tokenizer<MultiregattaMediaPlace> {
|
||||
@Override
|
||||
protected MultiregattaMediaPlace getRealPlace(EventContext context) {
|
||||
return new MultiregattaMediaPlace(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
|
||||
import com.sap.sailing.gwt.home.client.shared.media.MediaPage;
|
||||
import com.sap.sailing.gwt.ui.shared.media.MediaDTO;
|
||||
|
||||
/**
|
||||
* Created by pgtaboada on 25.11.14.
|
||||
*/
|
||||
public class MultiregattaMediaTabView extends Composite implements MultiregattaTabView<MultiregattaMediaPlace> {
|
||||
|
||||
public MultiregattaMediaTabView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<MultiregattaMediaPlace> getPlaceClassForActivation() {
|
||||
return MultiregattaMediaPlace.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TabView.State getState() {
|
||||
return TabView.State.INVISIBLE;
|
||||
// TODO return currentPresenter.hasMedia() ? TabView.State.VISIBLE : TabView.State.INVISIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(MultiregattaMediaPlace myPlace, AcceptsOneWidget contentArea) {
|
||||
final MediaPage mediaPage = new MediaPage();
|
||||
|
||||
currentPresenter.ensureMedia(new AsyncCallback<MediaDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(MediaDTO media) {
|
||||
mediaPage.setMedia(media);
|
||||
}
|
||||
});
|
||||
|
||||
initWidget(mediaPage);
|
||||
|
||||
// TODO do we need UiBinder here?
|
||||
// initWidget(ourUiBinder.createAndBindUi(this));
|
||||
|
||||
contentArea.setWidget(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
}
|
||||
|
||||
// TODO delete UiBinder if we do not need it for the new media page implementation
|
||||
interface MyBinder extends UiBinder<HTMLPanel, MultiregattaMediaTabView> {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static MyBinder ourUiBinder = GWT.create(MyBinder.class);
|
||||
private Presenter currentPresenter;
|
||||
|
||||
@Override
|
||||
public MultiregattaMediaPlace placeToFire() {
|
||||
return new MultiregattaMediaPlace(currentPresenter.getCtx());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPresenter(EventMultiregattaView.Presenter currentPresenter) {
|
||||
this.currentPresenter = currentPresenter;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
|
||||
<g:HTMLPanel>
|
||||
<p>This is MEDIA tab</p>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import com.google.gwt.place.shared.Prefix;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
|
||||
|
||||
public class MultiregattaOverviewPlace extends AbstractMultiregattaEventPlace {
|
||||
public MultiregattaOverviewPlace(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public MultiregattaOverviewPlace(EventContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Prefix(EventPrefixes.MultiregattaOverview)
|
||||
public static class Tokenizer extends AbstractEventPlace.Tokenizer<MultiregattaOverviewPlace> {
|
||||
@Override
|
||||
protected MultiregattaOverviewPlace getRealPlace(EventContext context) {
|
||||
return new MultiregattaOverviewPlace(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
|
||||
|
||||
/**
|
||||
* Created by pgtaboada on 25.11.14.
|
||||
*/
|
||||
public class MultiregattaOverviewTabView extends Composite implements MultiregattaTabView<MultiregattaOverviewPlace> {
|
||||
|
||||
private Presenter currentPresenter;
|
||||
|
||||
public MultiregattaOverviewTabView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<MultiregattaOverviewPlace> getPlaceClassForActivation() {
|
||||
return MultiregattaOverviewPlace.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPresenter(EventMultiregattaView.Presenter currentPresenter) {
|
||||
this.currentPresenter = currentPresenter;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TabView.State getState() {
|
||||
// TODO activate
|
||||
return TabView.State.NOT_AVAILABLE_SHOW_NEXT_AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(MultiregattaOverviewPlace myPlace, AcceptsOneWidget contentArea) {
|
||||
|
||||
initWidget(ourUiBinder.createAndBindUi(this));
|
||||
|
||||
contentArea.setWidget(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
}
|
||||
|
||||
interface MyBinder extends UiBinder<HTMLPanel, MultiregattaOverviewTabView> {
|
||||
}
|
||||
|
||||
private static MyBinder ourUiBinder = GWT.create(MyBinder.class);
|
||||
|
||||
@Override
|
||||
public MultiregattaOverviewPlace placeToFire() {
|
||||
return new MultiregattaOverviewPlace(currentPresenter.getCtx());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
|
||||
<g:HTMLPanel>
|
||||
<p>This is multiregatta overview tab</p>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import com.google.gwt.place.shared.Prefix;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventPrefixes;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.AbstractMultiregattaEventPlace;
|
||||
|
||||
public class MultiregattaRegattasPlace extends AbstractMultiregattaEventPlace {
|
||||
public MultiregattaRegattasPlace(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public MultiregattaRegattasPlace(EventContext context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Prefix(EventPrefixes.MultiregattaRegattas)
|
||||
public static class Tokenizer extends AbstractEventPlace.Tokenizer<MultiregattaRegattasPlace> {
|
||||
@Override
|
||||
protected MultiregattaRegattasPlace getRealPlace(EventContext context) {
|
||||
return new MultiregattaRegattasPlace(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTMLPanel;
|
||||
import com.sap.sailing.gwt.common.client.controls.tabbar.TabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.EventMultiregattaView.Presenter;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.MultiregattaTabView;
|
||||
import com.sap.sailing.gwt.home.client.place.event.partials.eventregatta.EventRegattaList;
|
||||
import com.sap.sailing.gwt.ui.shared.LeaderboardGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.RaceGroupDTO;
|
||||
import com.sap.sailing.gwt.ui.shared.StrippedLeaderboardDTO;
|
||||
import com.sap.sse.common.Util.Triple;
|
||||
|
||||
/**
|
||||
* Created by pgtaboada on 25.11.14.
|
||||
*/
|
||||
public class MultiregattaRegattasTabView extends Composite implements MultiregattaTabView<MultiregattaRegattasPlace> {
|
||||
|
||||
@UiField FlowPanel content;
|
||||
private Presenter currentPresenter;
|
||||
|
||||
public MultiregattaRegattasTabView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<MultiregattaRegattasPlace> getPlaceClassForActivation() {
|
||||
return MultiregattaRegattasPlace.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPresenter(EventMultiregattaView.Presenter currentPresenter) {
|
||||
this.currentPresenter = currentPresenter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TabView.State getState() {
|
||||
return TabView.State.VISIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(final MultiregattaRegattasPlace myPlace, final AcceptsOneWidget contentArea) {
|
||||
|
||||
// TODO: understand, and than move this into appropiate place (probably context)
|
||||
currentPresenter.ensureRegattaStructure(new AsyncCallback<List<RaceGroupDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RaceGroupDTO> raceGroups) {
|
||||
if (raceGroups.size() > 0) {
|
||||
initView(contentArea);
|
||||
} else {
|
||||
// createEventWithoutRegattasView(event, panel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// createErrorView(
|
||||
// "Error while loading the regatta structure with service getRegattaStructureOfEvent()",
|
||||
// caught, panel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void initView(AcceptsOneWidget contentArea) {
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> regattaStructure = getRegattaStructure();
|
||||
EventRegattaList eventRegattaList = new EventRegattaList(regattaStructure, currentPresenter);
|
||||
// initWidget(ourUiBinder.createAndBindUi(this));
|
||||
// contentArea.setWidget(this);
|
||||
contentArea.setWidget(eventRegattaList);
|
||||
}
|
||||
|
||||
private Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> getRegattaStructure() {
|
||||
Map<String, Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>> result = new HashMap<>();
|
||||
Map<String, RaceGroupDTO> raceGroupsMap = new HashMap<>();
|
||||
for (RaceGroupDTO raceGroup: currentPresenter.getCtx().getRaceGroups()) {
|
||||
raceGroupsMap.put(raceGroup.getName(), raceGroup);
|
||||
}
|
||||
|
||||
for (LeaderboardGroupDTO leaderboardGroup : currentPresenter.getCtx().getLeaderboardGroups()) {
|
||||
for(StrippedLeaderboardDTO leaderboard: leaderboardGroup.getLeaderboards()) {
|
||||
String leaderboardName = leaderboard.name;
|
||||
result.put(leaderboardName, new Triple<RaceGroupDTO, StrippedLeaderboardDTO, LeaderboardGroupDTO>(raceGroupsMap.get(leaderboardName),
|
||||
leaderboard, leaderboardGroup));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
}
|
||||
|
||||
interface MyBinder extends UiBinder<HTMLPanel, MultiregattaRegattasTabView> {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static MyBinder ourUiBinder = GWT.create(MyBinder.class);
|
||||
|
||||
@Override
|
||||
public MultiregattaRegattasPlace placeToFire() {
|
||||
return new MultiregattaRegattasPlace(currentPresenter.getCtx());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
|
||||
<g:HTMLPanel>
|
||||
<g:FlowPanel ui:field="content" />
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
@@ -5,9 +5,16 @@
|
||||
<ui:with field="i18n" 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.client.place.event.regattaleaderboard.EventRegattaLeaderboardResources" />
|
||||
<ui:with field="local_res2" type="com.sap.sailing.gwt.home.client.place.event.regattaanalytics.RegattaAnalyticsResources" />
|
||||
<ui:style>
|
||||
.marginFix {
|
||||
margin-top: 2rem;
|
||||
|
||||
}
|
||||
</ui:style>
|
||||
|
||||
|
||||
<g:HTMLPanel>
|
||||
<div class="{res.mainCss.grid}" style="margin-left:5rem;margin-right:5rem;">
|
||||
<div class="{res.mediaCss.grid} {style.marginFix}" >
|
||||
<div class="{res.mediaCss.small6} {res.mediaCss.column} {local_res.css.regattaleaderboard_meta_scoring}">
|
||||
<h3><ui:text from="{i18n.competitorsAnalytics}" /></h3>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.oldLeaderboardPanel {
|
||||
background-color:#f8f8f8;
|
||||
/* background-color:#f8f8f8; */
|
||||
padding: 0 10px 10px 10px;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -105,7 +105,14 @@ public class OldLeaderboard extends Composite {
|
||||
lastScoringUpdateTimeDiv.setInnerText("");
|
||||
lastScoringUpdateTextDiv.setInnerText("");
|
||||
}
|
||||
|
||||
lastScoringUpdateTextDiv.getStyle().setVisibility(!hasLiveRace ? Visibility.VISIBLE : Visibility.HIDDEN);
|
||||
lastScoringUpdateTimeDiv.getStyle().setVisibility(!hasLiveRace ? Visibility.VISIBLE : Visibility.HIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
public void hideRefresh() {
|
||||
autoRefreshAnchor.setVisible(false);
|
||||
lastScoringUpdateTimeDiv.getStyle().setVisibility(Visibility.HIDDEN);
|
||||
}
|
||||
}
|
||||