mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-03 02:43:53 +00:00
Fixed design and other stuff
This commit is contained in:
1 parent
f689967f7f
commit
f4f0689e38
8 files changed
+56
-27
No files matched your search
@@ -79,7 +79,7 @@ class LiveDataReceiver(threading.Thread):
|
||||
time.sleep(5)
|
||||
|
||||
# avoid hammering java server - can occur if call does not block correctly
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
|
||||
log.info('STOP listener for %s:%s (%s, %s)' % (self.host, self.port, self.eventname, self.racename))
|
||||
|
||||
|
||||
@@ -592,7 +592,7 @@ def moderatorLiveData(context, request):
|
||||
dc.update({'name': competitor.name[:9], 'raceranks': racedata, 'markranks': markranks, 'legvalues': legvalues,
|
||||
'nationality': competitor.nationality, 'global_rank': competitor.total, 'current_race': '', 'current_legs' : [],
|
||||
'current_rank' : competitor.current_rank, 'total_points' : getattr(competitor, 'total_points', 0),
|
||||
'net_points': getattr(competitor, 'net_points', 0)})
|
||||
'net_points': getattr(competitor, 'net_points', 0), 'races_shown' : range(race_start_index, race_end_index)})
|
||||
|
||||
try:
|
||||
dc.update({'current_legs': [lg+1 for lg in current_legs], 'current_race': current_race+1})
|
||||
|
||||
@@ -40,14 +40,20 @@ function liveRefresh() {
|
||||
function toggleListener() {
|
||||
$('#refresh-button').toggleClass('refresh');
|
||||
if (!$('#refresh-button').hasClass('refresh')) {
|
||||
$('#refresh-button').css('background-image', 'url(/moderator-static/freeze.png)');
|
||||
listener_paused = true;
|
||||
} else {
|
||||
$('#refresh-button').css('background-image', 'url(/moderator-static/pause-btn.png)');
|
||||
listener_paused = false;
|
||||
} else {
|
||||
listener_paused = true;
|
||||
$('#refresh-button').css('background-image', 'url(/moderator-static/refresh-icon.png)');
|
||||
}
|
||||
}
|
||||
|
||||
function toggleRace(raceid) {
|
||||
$(".leg-wrap").hide();
|
||||
$("#race-"+raceid+" .leg-wrap").toggle();
|
||||
$('body').attr('class', 'race-'+raceid);
|
||||
}
|
||||
|
||||
function displayRaceAndLeg(raceindex, legs) {
|
||||
// disabled upon request from Marcus Baur
|
||||
//$('.pause-btn').html('<div style="padding: 8px 4px 5px 15px; color: white; font-size: 23px;font-weight: bold;">R'+raceindex+' : '+legs+'</div>');
|
||||
@@ -73,8 +79,8 @@ function showOverallWrap(caller) {
|
||||
});
|
||||
}
|
||||
|
||||
function switchRaceBlock(block) {
|
||||
loadLeaderboard(block, param, global_competitors, global_direction, global_colmode);
|
||||
function switchRace(block) {
|
||||
loadLeaderboard(block, global_sortkey, global_competitors, global_direction, global_colmode);
|
||||
}
|
||||
|
||||
function sortBy(param, element) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 252 B |
Binary file not shown.
|
After Width: | Height: | Size: 179 B |
@@ -16,12 +16,21 @@
|
||||
.c-race-3-lila {
|
||||
background: #9c277b !important; }
|
||||
|
||||
.c-race-3-2-lila {
|
||||
background: #a76394 !important; }
|
||||
|
||||
.c-race-4-green {
|
||||
background: #9ab12a !important; }
|
||||
|
||||
.c-race-4-2-green {
|
||||
background: #b1be72 !important; }
|
||||
|
||||
.c-race-5-red {
|
||||
background: #d83c3c !important; }
|
||||
|
||||
.c-race-5-2-red {
|
||||
background: #da8585 !important; }
|
||||
|
||||
.c-table-odd {
|
||||
background: #484848 !important; }
|
||||
|
||||
@@ -117,6 +126,7 @@ body {
|
||||
height: 115px;
|
||||
background: url(/moderator-static/sap-logo.png) no-repeat 0 0;
|
||||
font-size: 14px;
|
||||
font-style: italic;
|
||||
font-weight: bold; }
|
||||
#header ul.systeminfo {
|
||||
float: right;
|
||||
@@ -226,7 +236,7 @@ span.race-count {
|
||||
#main-interface .blue-table .pause-btn {
|
||||
display: block;
|
||||
height: 39px;
|
||||
background: url(/moderator-static/pause-icon.png) right center no-repeat #484848; }
|
||||
background: url(/moderator-static/pause-btn.png) right center no-repeat #484848; }
|
||||
#main-interface .blue-table .sort-rank {
|
||||
display: block;
|
||||
height: 39px;
|
||||
@@ -244,7 +254,7 @@ span.race-count {
|
||||
background: url(/moderator-static/arrow-top.png) no-repeat right center #484848; }
|
||||
#main-interface #overall-clipping {
|
||||
border-collapse: collapse;
|
||||
width: 170px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
vertical-align: middle; }
|
||||
#main-interface #overall-clipping td {
|
||||
@@ -253,8 +263,8 @@ span.race-count {
|
||||
background: #484848; }
|
||||
#main-interface .race {
|
||||
height: 100%;
|
||||
margin: 0 8px 0 0;
|
||||
font-size: 14px; }
|
||||
font-size: 14px;
|
||||
display: inline; }
|
||||
#main-interface .race div {
|
||||
color: #151515;
|
||||
font-size: 24px;
|
||||
@@ -298,11 +308,13 @@ span.race-count {
|
||||
font-size: 14px;
|
||||
width: 39px; }
|
||||
#main-interface .race div.leg-box span {
|
||||
padding: 14px 0 0 10px;
|
||||
padding: 15px 0 0 0;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0; }
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center; }
|
||||
#main-interface .race div.leg-box .sort-asc {
|
||||
background: url(/moderator-static/sort-none.png) center bottom no-repeat; }
|
||||
#main-interface .race div.leg-box .sort-desc {
|
||||
@@ -429,16 +441,24 @@ body.race-1 #race-1 div.leg-box {
|
||||
background: #dea464; }
|
||||
|
||||
body.race-2 #race-2 table th {
|
||||
background: #fec631; }
|
||||
background: #d9b85e; }
|
||||
body.race-2 #race-2 div.leg-box {
|
||||
background: #d9b85e; }
|
||||
|
||||
body.race-3 #race-3 table th {
|
||||
background: #9c277b; }
|
||||
background: #a76394; }
|
||||
body.race-3 #race-3 div.leg-box {
|
||||
background: #a76394; }
|
||||
|
||||
body.race-4 #race-4 table th {
|
||||
background: #95aa31; }
|
||||
background: #b1be72; }
|
||||
body.race-4 #race-4 div.leg-box {
|
||||
background: #b1be72; }
|
||||
|
||||
body.race-5 #race-5 table th {
|
||||
background: #d83c3c; }
|
||||
background: #da8585; }
|
||||
body.race-5 #race-5 div.leg-box {
|
||||
background: #da8585; }
|
||||
|
||||
.border-activity {
|
||||
background: url(/moderator-static/border-activity.png) 0 0 no-repeat; }
|
||||
@@ -46,6 +46,9 @@ When <i>stopping listener</i> it will trigger two methods: If you select a race
|
||||
<select name="paramURLselect" onchange="$('input[name=paramURL]').val($('select[name=paramURLselect] option:selected').val())">
|
||||
<option value=""></option>
|
||||
<option value="http://sapsimulation.tracdev.dk/simulateconf/j80race12.txt">J80 Race 12</option>
|
||||
<option value="http://germanmaster.traclive.dk/events/event_20110505_SailingTea/clientparams.php?event=event_20110505_SailingTea&race=cce678c8-97e6-11e0-9aed-406186cbf87c">Kiwo1</option>
|
||||
<option value="http://germanmaster.traclive.dk/events/event_20110505_SailingTea/clientparams.php?event=event_20110505_SailingTea&race=11290bd6-97e7-11e0-9aed-406186cbf87c">Kiwo2</option>
|
||||
<option value="http://germanmaster.traclive.dk/events/event_20110505_SailingTea/clientparams.php?event=event_20110505_SailingTea&race=39635b24-97e7-11e0-9aed-406186cbf87c">Kiwo3</option>
|
||||
</select>
|
||||
<pre style="background-color: #ececec; font-size: 12px;padding: 2px;">
|
||||
<tal:for repeat="eventurl view.raceUrlHistory()"> ${eventurl}</tal:for></pre>
|
||||
@@ -81,7 +84,7 @@ When <i>stopping listener</i> it will trigger two methods: If you select a race
|
||||
|
||||
<div class="field">
|
||||
<input type="checkbox" name="drop_db" />
|
||||
<span>Drop Database before connect</span><br/>
|
||||
<span>Drop Database before connect (Dangerous!! Better use the selective DROP in DB tab)</span><br/>
|
||||
</div>
|
||||
|
||||
<input type="submit" name="listener-start" value="Start listener"/>
|
||||
|
||||
@@ -56,12 +56,12 @@
|
||||
<!-- / THE LEFT BAR -->
|
||||
<div id='left-systembar'>
|
||||
<tal:for repeat="bundle firstbundle">
|
||||
<a class='slide-backward' href='hallo'>
|
||||
<a class='slide-backward' href='javascript:;' onclick='switchRace("${event.races.index(bundle[0])+1}:${event.races.index(bundle[-1])+1}");'>
|
||||
<span class='race-count'>
|
||||
<ul class='race-bundle-${repeat["bundle"].number}'>
|
||||
<tal:for repeat="race bundle">
|
||||
<!-- XXX fix this to show current race -->
|
||||
<li class='race-${event.races.index(race)+1}' onclick='switchRace("${event.races.index(race)+1}")'>
|
||||
<li class='race-${event.races.index(race)+1}'>
|
||||
${event.races.index(race)+1}
|
||||
</li>
|
||||
</tal:for>
|
||||
@@ -75,9 +75,9 @@
|
||||
</div>
|
||||
<!-- / THE RIGHT BAR -->
|
||||
<div id='right-systembar'>
|
||||
<a class='slide-forward' href='javascript:;'>
|
||||
<tal:for repeat="bundle lastbundle">
|
||||
<a class='slide-forward' href='javascript:;' onclick='switchRace("${event.races.index(bundle[0])+1}:${event.races.index(bundle[-1])+1}");'>
|
||||
<span class='race-count'>
|
||||
<tal:for repeat="bundle lastbundle">
|
||||
<ul class='race-bundle-${repeat["bundle"].number}'>
|
||||
<tal:for repeat="race bundle">
|
||||
<li class='race-${event.races.index(race)+1}'>
|
||||
@@ -85,9 +85,9 @@
|
||||
</li>
|
||||
</tal:for>
|
||||
</ul>
|
||||
</tal:for>
|
||||
</span>
|
||||
</a>
|
||||
</tal:for>
|
||||
</div>
|
||||
<!-- / YIELD THE MAIN INTERFACE -->
|
||||
<!-- / MAIN INTERFACE -->
|
||||
@@ -123,23 +123,23 @@
|
||||
</div>
|
||||
|
||||
<!-- / WRAPPER FOR RACES -->
|
||||
<tal:for repeat='bundle firstbundle[0]'>
|
||||
<tal:for repeat='bundle firstbundle'>
|
||||
<div class='race' id='race-${repeat["bundle"].number}' tal:define='raceid repeat["bundle"].number'>
|
||||
<!-- / FIRST ELEMENT WITH LIST -->
|
||||
<div class='main-box'>
|
||||
<a class='main-box-active' href='javascript:;' onclick='$("#race-${raceid} .leg-wrap").toggle();'>
|
||||
<a class='main-box-active' href='javascript:;' onclick='toggleRace("${raceid}");'>
|
||||
<ul>
|
||||
<tal:for repeat="rankrow range(1,21)">
|
||||
<li id='race-${raceid}-rankrow-${rankrow}'></li>
|
||||
</tal:for>
|
||||
</ul>
|
||||
<span>1</span>
|
||||
<span id="race-">${raceid}</span>
|
||||
</a>
|
||||
<a class='main-box-sort sort-asc' href='javascript:;' onclick='sortBy("${raceid}", $(this))'></a>
|
||||
</div>
|
||||
|
||||
<tal:for repeat="leg event.marks[int(raceid)-1]">
|
||||
<div class='leg-wrap' id="leg-${repeat['leg'].number}" tal:define='markid repeat["leg"].number'>
|
||||
<div class='leg-wrap' id="leg-${repeat['leg'].number}" tal:define='markid repeat["leg"].number' style="display:none;">
|
||||
<!-- / SECOND ELEMENT WITH LIST -->
|
||||
<div class='leg-box'>
|
||||
<span tal:condition="markid != 1">M${markid}</span>
|
||||
|
||||
Reference in new issue
Block a user