From 11d7a1685f623d9e0339feba3c6e3f3f9e3adad4 Mon Sep 17 00:00:00 2001 From: Jens Rommel Date: Tue, 7 Oct 2014 11:29:06 +0200 Subject: [PATCH 1/4] Restored "responsive" caption for "Show Video" button - got lost with recent fixes. --- .../raceboard/SideBySideComponentViewer.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/SideBySideComponentViewer.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/SideBySideComponentViewer.java index 9d43c625f37..3d5ce8c54ab 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/SideBySideComponentViewer.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/raceboard/SideBySideComponentViewer.java @@ -3,6 +3,7 @@ package com.sap.sailing.gwt.ui.raceboard; import java.util.ArrayList; import java.util.List; +import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; @@ -80,27 +81,37 @@ public class SideBySideComponentViewer implements ComponentViewer { mediaPlayerManagerComponent.setPlayerChangeListener(new PlayerChangeListener() { public void notifyStateChange(){ + String caption; + String tooltip; switch (mediaPlayerManagerComponent.getAssignedMediaTracks().size()) { case 0: + caption = "No Videos"; + tooltip = caption; mediaSelectionButton.setVisible(false); break; case 1: mediaSelectionButton.setVisible(true); if(mediaPlayerManagerComponent.isPlaying()){ - mediaSelectionButton.setText(stringMessages.mediaHideVideoCaption()); - mediaSelectionButton.setTitle(stringMessages.mediaHideVideoTooltip()); + caption = stringMessages.mediaHideVideoCaption(); + tooltip = stringMessages.mediaHideVideoTooltip(); } else{ - mediaSelectionButton.setText(stringMessages.mediaShowVideoCaption()); - mediaSelectionButton.setTitle(stringMessages.mediaShowVideoTooltip(mediaPlayerManagerComponent.getAssignedMediaTracks().iterator().next().title)); + caption = stringMessages.mediaShowVideoCaption(); + tooltip = stringMessages.mediaShowVideoTooltip(mediaPlayerManagerComponent.getAssignedMediaTracks().iterator().next().title); } break; default: mediaSelectionButton.setVisible(true); - mediaSelectionButton.setText(stringMessages.mediaSelectVideoCaption(mediaPlayerManagerComponent.getAssignedMediaTracks().size())); - mediaSelectionButton.setTitle(stringMessages.mediaSelectVideoTooltip()); + caption = stringMessages.mediaSelectVideoCaption(mediaPlayerManagerComponent.getAssignedMediaTracks().size()); + tooltip = stringMessages.mediaSelectVideoTooltip(); break; } + if (Document.get().getClientWidth() <= 1024) { + mediaSelectionButton.setHTML(" "); + } else { + mediaSelectionButton.setText(caption); + } + mediaSelectionButton.setTitle(tooltip); mediaManagementButton.setVisible(mediaPlayerManagerComponent.allowsEditing()); } From 0ba3dd0cbd086f35cca58ba821714a2dff1e527a Mon Sep 17 00:00:00 2001 From: Jens Rommel Date: Tue, 7 Oct 2014 11:48:21 +0000 Subject: [PATCH 2/4] Updated home (markdown) --- home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.md b/home.md index 8f01fc267da..e9c6e3a71c8 100644 --- a/home.md +++ b/home.md @@ -57,7 +57,7 @@ SAP is at the center of today’s technology revolution, developing innovations * [[Travemünder Woche 2014 event page|wiki/tw2014]] * [[505 worlds Kiel 2014 event page|wiki/505-worlds-kiel-2014]] * Event Content Management - * [[Link Race Videos|wiki/race-video-linking]] + * [[Link Race Videos|wiki/linking-race-videos]] ### Internal services (not related to wiki but useful) From 764e70611d4a948c7f3e406fc1a429d7d1c33ab8 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Tue, 7 Oct 2014 18:27:04 +0200 Subject: [PATCH 3/4] fixing bug 2375 by not synchronizing across the listener notifications in modifying methods of LeaderboardGroupImpl --- .../impl/LeaderboardGroupImpl.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/LeaderboardGroupImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/LeaderboardGroupImpl.java index 7d4a5736602..6cc07c35d9e 100644 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/LeaderboardGroupImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/LeaderboardGroupImpl.java @@ -104,43 +104,47 @@ public class LeaderboardGroupImpl extends LeaderboardGroupBaseImpl implements Le } @Override - public int getIndexOf(Leaderboard leaderboard) { + public synchronized int getIndexOf(Leaderboard leaderboard) { return leaderboards.indexOf(leaderboard); } @Override - public synchronized void addLeaderboard(Leaderboard leaderboard) { + public void addLeaderboard(Leaderboard leaderboard) { addLeaderboardAt(leaderboard, leaderboards.size()); } @Override - public synchronized void addLeaderboardAt(Leaderboard leaderboard, int index) { - leaderboards.add(index, leaderboard); + public void addLeaderboardAt(Leaderboard leaderboard, int index) { + synchronized (this) { + leaderboards.add(index, leaderboard); + } notifyLeaderboardGroupListenersAboutLeaderboardAdded(leaderboard); } @Override - public synchronized void addAllLeaderboards(Collection leaderboards) { + public void addAllLeaderboards(Collection leaderboards) { for (Leaderboard leaderboard : leaderboards) { addLeaderboard(leaderboard); } } @Override - public synchronized void removeLeaderboard(Leaderboard leaderboard) { - leaderboards.remove(leaderboard); + public void removeLeaderboard(Leaderboard leaderboard) { + synchronized (this) { + leaderboards.remove(leaderboard); + } notifyLeaderboardGroupListenersAboutLeaderboardRemoved(leaderboard); } @Override - public synchronized void removeAllLeaderboards(Collection leaderboards) { + public void removeAllLeaderboards(Collection leaderboards) { for (Leaderboard leaderboard : leaderboards) { removeLeaderboard(leaderboard); } } @Override - public synchronized void clearLeaderboards() { + public void clearLeaderboards() { for (Leaderboard leaderboard : getLeaderboards()) { removeLeaderboard(leaderboard); } From bd3cae080532f5e4232975e9d0752cb41f47486d Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Wed, 8 Oct 2014 12:59:13 +0200 Subject: [PATCH 4/4] adjusted start script so it uses the Luna / Equinox launcher --- java/target/start | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/target/start b/java/target/start index 7e40bff2b5c..029993a4bd9 100755 --- a/java/target/start +++ b/java/target/start @@ -76,7 +76,7 @@ APP_PARAMETERS="-Dmongo.host=$MONGODB_HOST -Dmongo.port=$MONGODB_PORT -Dmongo.db REPLICATION_PARAMETERS="-Dreplicate.on.start=$REPLICATE_ON_START -Dreplicate.master.servlet.host=$REPLICATE_MASTER_SERVLET_HOST -Dreplicate.master.servlet.port=$REPLICATE_MASTER_SERVLET_PORT -Dreplicate.master.queue.host=$REPLICATE_MASTER_QUEUE_HOST -Dreplicate.master.queue.port=$REPLICATE_MASTER_QUEUE_PORT -Dreplicate.master.exchange.name=$REPLICATE_MASTER_EXCHANGE_NAME" if [[ $PARAM == "" ]] || [[ $PARAM == "no-update" ]]; then - nohup $JAVA_BINARY -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Dosgi.shell.telnet.port=$TELNET_PORT -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -configuration ./ -clean 2>/dev/null >/dev/null & + nohup $JAVA_BINARY -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Dosgi.shell.telnet.port=$TELNET_PORT -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -configuration ./ -clean 2>/dev/null >/dev/null & JAVA_PID=$! echo "Starting server... (PID: $JAVA_PID)" echo "SERVER_NAME: $SERVER_NAME" @@ -131,10 +131,10 @@ if [[ $PARAM == "" ]] || [[ $PARAM == "no-update" ]]; then fi elif [[ $PARAM == "debug" ]]; then echo "Starting remote debugging session on port 8000 - make sure this port is open and reachable from the outside" - $JAVA_BINARY -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -console -configuration ./ -clean + $JAVA_BINARY -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -console -configuration ./ -clean elif [[ $PARAM == "fg" ]]; then - $JAVA_BINARY -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -console -configuration ./ -clean + $JAVA_BINARY -D$SERVER_NAME $ADDITIONAL_JAVA_ARGS -Dcom.sap.sailing.server.name=$SERVER_NAME $APP_PARAMETERS $REPLICATION_PARAMETERS -Djava.io.tmpdir="$PWD/tmp" -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -console -configuration ./ -clean fi