Skip to content

Commit

Permalink
Merge pull request #455 from Maprunner/dev
Browse files Browse the repository at this point in the history
Release 1.5.7
  • Loading branch information
Maprunner authored Dec 30, 2019
2 parents c59d9af + 29fdb1a commit 76c84bc
Show file tree
Hide file tree
Showing 25 changed files with 416 additions and 347 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Routegadget 2

## Latest news
Version 1.5.6 was released on 29th November 2018 and is installed on all routegadget.co.uk sites.
Version 1.5.7 was released on 30th December 2018 and is installed on all routegadget.co.uk sites.

This is a very minor update which is probably invisible to most users.
This improves the statistics display by adding tabs to reduce some of the scrolling. Double click on a runner on the results tab to see this.

It also fixes an IOF XML V3 results import bug which meant that missing controls were not being handled correctly.

## User Guide and Introductory Videos

Expand Down
12 changes: 11 additions & 1 deletion app/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ public static function tidyTime($in)
if (substr($secs, 0, 1) === ':') {
$t = substr_replace($t, '0', -1, 0);
}
// prevent negative times which can slip through for various reasons
if (substr($t, 0, 1) === "-") {
$t = "0:00";
}
// convert hh:mm:ss to mm:ss for consistency
$bits = explode(":", $t);
if (count($bits) === 3) {
$mins = (intval($bits[0]) * 60) + intval($bits[1]);
$t = $mins.":".$bits[2];
}
return $t;
}

Expand Down Expand Up @@ -188,4 +198,4 @@ public static function encode_rg_output($output_str)
}
return $encoded;
}
}
}
2 changes: 1 addition & 1 deletion css/rg2-1.5.6.min.css → css/rg2-1.5.7.min.css

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion css/rg2.css
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ html, body {
background-color: #eee;
}

.coursemenutable tr, td, th {
.coursemenutable tr, .coursemenutable td, .coursemenutable th {
padding-left: 5px;
padding-right: 5px;
text-align: center;
Expand All @@ -444,6 +444,11 @@ table.resulttable th + th {
text-align: left;
}

table.resulttable td + td + td,
table.resulttable th + th + th {
text-align: center;
}

table.resulttable tbody tr:nth-child(odd) {
background: #eee;
}
Expand Down Expand Up @@ -682,3 +687,10 @@ body {
font-weight: bold;
}

.rg2-results-table-container {
height: 100%;
}

#rg2-results-grid-wrapper {
height: 200px;
}
20 changes: 10 additions & 10 deletions html/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-grid.css">
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-theme-blue.css">
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/dist/styles/ag-theme-balham.css">
<?php if ($debug) { ?>
<link rel="stylesheet" href='<?php echo $source_url ."/css/rg2.css'>"; ?>
<link rel="stylesheet" href='<?php echo $source_url ."/css/rg2.css'>"; ?>
<?php } else { ?>
<link rel="stylesheet" href='<?php echo $source_url ."/css/rg2-".RG2VERSION.".min.css'>"; ?>
<?php } ?>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/<?php echo $ui_theme; ?>/jquery-ui.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href=' <?php echo $source_url ."/css/rg2-".RG2VERSION.".min.css'>"; ?> <?php } ?> <link
rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/<?php echo $ui_theme; ?>/jquery-ui.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<?php if ($manager) { ?>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
crossorigin=""/>
<?php } ?>
</head>
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
crossorigin="" />
<?php } ?>
</head>
35 changes: 24 additions & 11 deletions html/misc.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
<hr>
<p>Routegadget 2 (RG2) is a web application for drawing and comparing orienteering routes. It is based on the
original Routegadget developed by Jarkko Ryyppö.
For further details see the <a href="https://github.com/Maprunner/rg2/wiki/User-guide" target="_blank" rel="noopener">User
For further details see the <a href="https://github.com/Maprunner/rg2/wiki/User-guide" target="_blank"
rel="noopener">User
Guide</a> and the <a href="https://github.com/Maprunner/rg2" target="_blank" rel="noopener">RG2 project page</a>.
The latest version of RG2 is available for download <a href="https://github.com/Maprunner/rg2/archive/master.zip"
target="_blank" rel="noopener">from GitHub</a>.
You can see details of <a href="http://www.maprunner.co.uk/rg2-stats" target="_blank" rel="noopener">all RG2
You can see details of <a href="https://www.maprunner.co.uk/rg2-stats" target="_blank" rel="noopener">all RG2
installations here</a>.
This includes an RSS feed that provides details of new RG2 events when they are added.</p>
<p>
Expand All @@ -36,16 +37,28 @@
</div>
<div id="rg2-splits-table" title="Splits display"></div>
<div id="rg2-stats-table" title="Statistics">
<div id="container">
<h2>Summary</h2>
<div id="rg2-stats-tabs">
<ul>
<li>
<a id="rg2-stats-summary-text" href="#rg2-stats-summary">Summary</a>
</li>
<li>
<a id="rg2-stats-leg-text" href="#rg2-leg-table">Leg times</a>
</li>
<li>
<a id="rg2-stats-cumulative-text" href="#rg2-race-table">Cumulative times</a>
</li>
<li>
<a id="rg2-stats-splits-text" href="#rg2-results-table">Splits</a>
</li>
</ul>
<div id="rg2-stats-summary"></div>
<h2>Leg Times</h2>
<div id="rg2-leg-table" style="width: 900px; height: 100%;" class="ag-theme-blue"></div>
<h2>Cumulative Times</h2>
<div id="rg2-race-table" style="width: 830px; height: 100%;" class="ag-theme-blue"></div>
<h2>Full results</h2>
<div id="rg2-results-table-container">
<div id="rg2-results-table" style="width: 900px; height: 100%;" class="ag-theme-blue"></div>
<div id="rg2-leg-table" style="width: 900px; height: 100%;" class="ag-theme-balham"></div>
<div id="rg2-race-table" style="width: 830px; height: 100%;" class="ag-theme-balham"></div>
<div id="rg2-results-table" class="rg2-results-table-container">
<div id="rg2-results-grid-wrapper">
<div id="rg2-results-grid" style="height: 100%" class="ag-theme-balham"></div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require(dirname(__FILE__) . '/app/utils.php');

// version replaced by Gruntfile as part of release
define('RG2VERSION', '1.5.6');
define('RG2VERSION', '1.5.7');
define("RG_LOG_FILE", dirname(__FILE__)."/log/rg2log.txt");

if (file_exists(dirname(__FILE__) . '/rg2-config.php')) {
Expand Down
2 changes: 1 addition & 1 deletion js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
EVENT_WITHOUT_RESULTS : 2,
SCORE_EVENT : 3,
// version gets set automatically by grunt file during build process
RG2VERSION: '1.5.6',
RG2VERSION: '1.5.7',
TIME_NOT_FOUND : 9999,
// values for evt.which
RIGHT_CLICK : 3,
Expand Down
5 changes: 5 additions & 0 deletions js/courses.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
return this.courses[courseid];
},

getNumberOfControlsOnCourse: function (courseid) {
// codes list includes "S" and "F", so allow for them
return this.courses[courseid].codes.length - 2;
},

incrementTracksCount: function (courseid) {
this.courses[courseid].incrementTracksCount();
this.totaltracks += 1;
Expand Down
Loading

0 comments on commit 76c84bc

Please sign in to comment.