mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 13:20:57 +00:00
Merge remote-tracking branch 'server/bug3785' into bug3785
This commit is contained in:
commit
9d9b66ae00
4 files changed
+120
-128
No files matched your search
@@ -155,7 +155,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/dashboards/RibDashboard.html?leaderboardName=$LEADERBOARD_NAME&%{QUERY_STRING}" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/dashboards/RibDashboard.html?leaderboardName=$LEADERBOARD_NAME&%1" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -216,7 +218,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%{QUERY_STRING}#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%1#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -236,7 +240,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html?%{QUERY_STRING}#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html?%1#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -251,7 +257,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%{QUERY_STRING}#/series/:seriesId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%1#/series/:seriesId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -271,7 +279,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html?%{QUERY_STRING}#/series/:seriesId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html?%1#/series/:seriesId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -286,7 +296,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html#/regatta/overview/:eventId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%1#/regatta/overview/:eventId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -316,7 +328,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/Home.html?%1#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite 172.31.30.89 8888
|
||||
</VirtualHost>
|
||||
@@ -336,7 +350,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "https://$HOSTNAME/gwt/Home.html?%1#/event/:eventId=$EVENTUUID" [L,NE]
|
||||
|
||||
Use Rewrite 172.31.30.89 8888
|
||||
</VirtualHost>
|
||||
@@ -352,7 +368,9 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteCond %{REQUEST_URI} "^(/)?$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/RegattaOverview.html?event=$EVENTUUID" [L,NE]
|
||||
# The following matches the query string and captures it in group %1 for the RewriteRule to use before the fragment
|
||||
RewriteCond %{QUERY_STRING} "^(.*)$"
|
||||
RewriteRule ^(/)?$ "http://$HOSTNAME/gwt/RegattaOverview.html?event=$EVENTUUID&%1" [L,NE]
|
||||
|
||||
Use Rewrite $IP $PORT
|
||||
</VirtualHost>
|
||||
@@ -556,4 +574,4 @@
|
||||
|
||||
Use Rewrite 172.31.18.218 8888
|
||||
</VirtualHost>
|
||||
</Macro>
|
||||
</Macro>
|
||||
+71
-33
@@ -26,7 +26,29 @@ import com.sap.sailing.gwt.ui.client.shared.controls.AbstractSortableColumnWithM
|
||||
*/
|
||||
public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableColumnWithMinMax<LeaderboardRowDTO, C> {
|
||||
private boolean enableExpansion;
|
||||
|
||||
/**
|
||||
* Set when the {@link #toggleExpansion()} method begins with its work. Three things can happen:
|
||||
* <ol>
|
||||
* <li>the column is to be collapsed. This can happen synchronously, and the flag is cleared again before the method
|
||||
* returns</li>
|
||||
* <li>the column is to be expanded and all information required for this is already available; again, this type
|
||||
* of request can be handled synchronously, and the flag is cleared before the method returns</li>
|
||||
* <li>the column is to be expanded but not all information required is available yet; it has to be requested using
|
||||
* an asynchronous call; the method returns with the flag still set, and the callback will clear it when done</li>
|
||||
* </ol>
|
||||
*/
|
||||
private boolean togglingInProcess;
|
||||
|
||||
/**
|
||||
* If {@link #togglingInProcess} is {@code true} and a call to {@link #toggleExpansion()} is received,
|
||||
* instead of running the method, the request is "queued" only by incrementing this counter. When the
|
||||
* asynchronous task completes the running toggle action, the counter is decremented by one and
|
||||
* {@link #toggleExpansion()} is called. This way, overlapping asynchronous requests triggered by calls
|
||||
* to {@link #toggleExpansion()} are avoiided.
|
||||
*/
|
||||
private int numberOfQueuedToggleRequests;
|
||||
|
||||
private boolean suppressSortingOnce;
|
||||
private final LeaderboardPanel leaderboardPanel;
|
||||
private final Map<DetailType, AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?>> detailColumnsMap;
|
||||
@@ -145,47 +167,63 @@ public abstract class ExpandableSortableColumn<C> extends LeaderboardSortableCol
|
||||
* <p>
|
||||
*
|
||||
* Precondition: this column must currently be contained in the {@link CellTable} showing the
|
||||
* {@link #leaderboardPanel leaderboard}.
|
||||
* {@link #leaderboardPanel leaderboard}.<p>
|
||||
*
|
||||
* When the method starts to toggle the expansion state, it sets the {@link #togglingInProcess} flag. When the
|
||||
* method returns the {@link #isExpanded()} method yields the new expansion state. However, when the column contents
|
||||
* need to be loaded asynchronously first, the expansion will not have affected the table structure yet and is
|
||||
* still "pending." This state is indicated by the {@link #isTogglingInProcess()} method returning {@code true}
|
||||
* after this method has returned. Only after the asynchronous data loading has happened and the table has
|
||||
* actually been updated to reflect the expanded state, the {@link #isTogglingInProcess()} will then again
|
||||
* return {@code false}.
|
||||
*/
|
||||
public void toggleExpansion() {
|
||||
if (isExpansionEnabled()) {
|
||||
final boolean oldBusyState = getLeaderboardPanel().isBusy();
|
||||
getLeaderboardPanel().setBusyState(true);
|
||||
setTogglingInProcess(true);
|
||||
final CellTable<LeaderboardRowDTO> table = getLeaderboardPanel().getLeaderboardTable();
|
||||
if (isExpanded()) {
|
||||
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
|
||||
getLeaderboardPanel().removeColumn(column); // removes only the children currently displayed
|
||||
}
|
||||
getLeaderboardPanel().setBusyState(false);
|
||||
setTogglingInProcess(false);
|
||||
// important: toggle expanded state after asking for all visible children
|
||||
setExpanded(!isExpanded());
|
||||
if (isTogglingInProcess()) {
|
||||
numberOfQueuedToggleRequests++;
|
||||
} else {
|
||||
// important: toggle expanded state before asking for all visible children
|
||||
setExpanded(!isExpanded());
|
||||
ensureExpansionDataIsLoaded(new Runnable() {
|
||||
public void run() {
|
||||
// column may have been collapsed meanwhile, so that the columns must not be added to the table right now
|
||||
if (isExpanded()) {
|
||||
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
|
||||
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted
|
||||
// asynchronously while toggling the columns.
|
||||
if (insertIndex != -1) {
|
||||
insertIndex++;
|
||||
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
|
||||
column.updateMinMax();
|
||||
if (table.getColumnIndex(column) < 0) {
|
||||
getLeaderboardPanel().insertColumn(insertIndex++, column);
|
||||
final boolean oldBusyState = getLeaderboardPanel().isBusy();
|
||||
getLeaderboardPanel().setBusyState(true);
|
||||
setTogglingInProcess(true);
|
||||
final CellTable<LeaderboardRowDTO> table = getLeaderboardPanel().getLeaderboardTable();
|
||||
if (isExpanded()) {
|
||||
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
|
||||
getLeaderboardPanel().removeColumn(column); // removes only the children currently displayed
|
||||
}
|
||||
getLeaderboardPanel().setBusyState(false);
|
||||
setTogglingInProcess(false);
|
||||
// important: toggle expanded state after asking for all visible children
|
||||
setExpanded(!isExpanded());
|
||||
} else {
|
||||
// important: toggle expanded state before asking for all visible children
|
||||
setExpanded(!isExpanded());
|
||||
ensureExpansionDataIsLoaded(new Runnable() {
|
||||
public void run() {
|
||||
// column may have been collapsed meanwhile, so that the columns must not be added to the table right now
|
||||
if (isExpanded()) {
|
||||
int insertIndex = table.getColumnIndex(ExpandableSortableColumn.this);
|
||||
// The check "insertIndex != -1" is necessary, because the child-columns might be deleted
|
||||
// asynchronously while toggling the columns.
|
||||
if (insertIndex != -1) {
|
||||
insertIndex++;
|
||||
for (AbstractSortableColumnWithMinMax<LeaderboardRowDTO, ?> column : getAllVisibleChildren()) {
|
||||
column.updateMinMax();
|
||||
if (table.getColumnIndex(column) < 0) {
|
||||
getLeaderboardPanel().insertColumn(insertIndex++, column);
|
||||
}
|
||||
}
|
||||
getLeaderboardPanel().getLeaderboardTable().redraw();
|
||||
}
|
||||
getLeaderboardPanel().getLeaderboardTable().redraw();
|
||||
}
|
||||
getLeaderboardPanel().setBusyState(oldBusyState);
|
||||
setTogglingInProcess(false);
|
||||
if (numberOfQueuedToggleRequests > 0) {
|
||||
numberOfQueuedToggleRequests--;
|
||||
toggleExpansion();
|
||||
}
|
||||
}
|
||||
getLeaderboardPanel().setBusyState(oldBusyState);
|
||||
setTogglingInProcess(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-84
@@ -1,94 +1,30 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<title>${title}</title>
|
||||
<style type="text/css">
|
||||
.content {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.buttonContainer {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.linkButton, .linkButton:active, .linkButton:visited {
|
||||
padding: 15px;
|
||||
margin: 10px 10px 0px 0px;
|
||||
display: inline-block;
|
||||
background-color: #337ab7;
|
||||
border-radius: 4px;
|
||||
color: #ffffff;
|
||||
border: 1px solid #2e6da4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.linkButton:hover {
|
||||
background-color: #2b618e;
|
||||
border: 1px solid #204d74;
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: #e3e3e3;
|
||||
color: black;
|
||||
padding: 40px;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 100px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
.main {
|
||||
border: 1px solid black;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: black;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
border-bottom: .2em solid #efaa00;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20px 30px;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin: 30px 10% 200px 10%;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.sapLogo {
|
||||
height: 30px;
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.sailingAnalytics {
|
||||
display: inline-block;
|
||||
line-height: 30px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<style>
|
||||
.linkButton:active{padding:15px;margin:10px 10px 0px 0px;display:inline-block;background-color:#337ab7;border-radius:4px;color:#ffffff;border:1px solid #2e6da4;text-decoration:none}
|
||||
.linkButton:visited{padding:15px;margin:10px 10px 0px 0px;display:inline-block;background-color:#337ab7;border-radius:4px;color:#ffffff;border:1px solid #2e6da4;text-decoration:none}
|
||||
.linkButton:hover{background-color:#2b618e;border:1px solid #204d74}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin: 0px;padding: 0px;">
|
||||
<div class="body">
|
||||
<div class="main">
|
||||
<div class="header">
|
||||
<img src="cid:saplogo" class="sapLogo" alt="SAP "/><span class="sailingAnalytics">Sailing Analytics</span>
|
||||
|
||||
</head>
|
||||
<body marginheight="0" topmargin="0" marginwidth="0" bgcolor="#e3e3e3" offset="0" leftmargin="0" style="background-color: #e3e3e3;">
|
||||
<div class="body" style="background-color:#e3e3e3;color:black;padding:40px;max-width:800px;margin:0 auto;margin-bottom:100px;font-family:'Open Sans', sans-serif">
|
||||
<div class="main" style="border:1px solid black;background-color:white">
|
||||
<div class="header" style="background-color:black;padding:10px;font-size:16px;border-bottom:.2em solid #efaa00;color:white">
|
||||
<img src="cid:saplogo" class="sapLogo" alt="SAP " style="height:30px;width:auto;vertical-align:middle"><span class="sailingAnalytics" style="display:inline-block;line-height:30px;vertical-align:middle">Sailing Analytics</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
${content}
|
||||
<div class="content" style="margin:10px;padding:20px 30px;min-height:200px">
|
||||
${content}
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
</div>
|
||||
<div class="footer" style="margin:30px 10% 200px 10%;text-align:center;font-size:13px">
|
||||
<p>${subscription_information}</p>
|
||||
<p>${site}</p>
|
||||
<p>${footer_links}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -122,7 +122,7 @@ public abstract class NotificationSetNotification<T> implements MailNotification
|
||||
bodyContent.append("<div class=\"buttonContainer\">")
|
||||
.append("<a class=\"linkButton\" href=\"")
|
||||
.append(link.getB())
|
||||
.append("\">")
|
||||
.append("\" style=\"padding:15px;margin:10px 10px 0px 0px;display:inline-block;background-color:#337ab7;border-radius:4px;color:#ffffff;border:1px solid #2e6da4;text-decoration:none;\">")
|
||||
.append(htmlify(link.getA()))
|
||||
.append("</a>")
|
||||
.append("</div>");
|
||||
|
||||
Reference in new issue
Block a user