working on counter
This commit is contained in:
@@ -99,6 +99,8 @@
|
||||
<input type="range" min="0" max="{{ maxtime }}" value="{{ analysis.delay }}"
|
||||
id="myRange">
|
||||
</div>
|
||||
<div id="dataplay"></div>
|
||||
<div id="datastop"></div>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<div id="player"></div>
|
||||
@@ -304,6 +306,7 @@
|
||||
$(document).ready( function() {
|
||||
// lock
|
||||
var lock = document.getElementById("lock");
|
||||
// lock.onchange nog doen
|
||||
var output = document.getElementById("id_delay");
|
||||
{% if locked %}
|
||||
lock.checked = true;
|
||||
@@ -468,7 +471,54 @@
|
||||
} else {
|
||||
output.disabled = false;
|
||||
}
|
||||
}
|
||||
// Slider start stop
|
||||
// moet de buttons pas hieronder definieren en dan in de html
|
||||
// pluggen
|
||||
var timer;
|
||||
|
||||
function clock() {
|
||||
timer = setInterval(myClock, 1000);
|
||||
var c = parseInt(slider.value,10);
|
||||
console.log('starting clock');
|
||||
|
||||
function myClock() {
|
||||
document.getElementById("datatime").innerHTML = c;
|
||||
c = c+1;
|
||||
slider.value = c;
|
||||
|
||||
// update data fields
|
||||
|
||||
if (lock.checked) {
|
||||
player.seekTo(c+parseInt(output.value));
|
||||
}
|
||||
if (c == latitude.length) {
|
||||
clearInterval(timer);
|
||||
c = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// onderstaande alleen als lock.checked
|
||||
var dataplay = document.createElement("input");
|
||||
dataplay.type = "button";
|
||||
dataplay.value = "Play";
|
||||
document.getElementById("dataplay").appendChild(dataplay);
|
||||
|
||||
var datastop = document.createElement("input");
|
||||
datastop.type = "button";
|
||||
datastop.value = "Stop";
|
||||
document.getElementById("datastop").appendChild(datastop)
|
||||
|
||||
dataplay.onclick = function() {
|
||||
clock();
|
||||
}
|
||||
|
||||
datastop.onclick = function() {
|
||||
console.log('stopping');
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="https://bernii.github.io/gauge.js/dist/gauge.js"></script>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if (d.getElementById(id)) return t;
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.async=true;
|
||||
js.async=true;
|
||||
js.src = "https://platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
t.ready = function(f) {
|
||||
t._e.push(f);
|
||||
};
|
||||
|
||||
|
||||
return t;
|
||||
}(document, "script", "twitter-wjs"));</script>
|
||||
|
||||
@@ -94,9 +94,9 @@
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
$(document).ready(function(){
|
||||
var accordionsMenu = $('.cd-accordion-menu');
|
||||
|
||||
|
||||
if( accordionsMenu.length > 0 ) {
|
||||
|
||||
|
||||
accordionsMenu.each(function(){
|
||||
var accordion = $(this);
|
||||
//detect change in the input[type="checkbox"] value
|
||||
@@ -121,7 +121,7 @@
|
||||
</script>
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
|
||||
|
||||
<body data-root="https://webapiv2.navionics.com/dist/webapi/images">
|
||||
<div class="wrapper">
|
||||
|
||||
@@ -184,10 +184,10 @@
|
||||
<side-nav class="side-nav">
|
||||
|
||||
</side-nav>
|
||||
|
||||
|
||||
<nav class="main-nav">
|
||||
<ul>
|
||||
<li id="nav-workouts">
|
||||
<li id="nav-workouts">
|
||||
<a href="/rowers/list-workouts/">
|
||||
<i class="fas fa-clipboard-list"></i> Workouts
|
||||
</a>
|
||||
@@ -233,8 +233,8 @@
|
||||
<li class="grid_4">
|
||||
<p class="successmessage">
|
||||
You have {{ user.rower.planexpires|date_dif|ddays }} days left of your one year subscription. Please renew on or before {{ user.rower.planexpires }} or your plan will be reset to Basic. Click <a href="/rowers/paidplans/">here</a> to renew your membership.</p>
|
||||
</li>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.rower.protrialexpires and user.rower.protrialexpires|is_future_date %}
|
||||
@@ -292,17 +292,17 @@
|
||||
</ul>
|
||||
|
||||
{% block main %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<aside class="side">
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
</aside>
|
||||
|
||||
|
||||
<ad class="ad">
|
||||
{% if request|announcements %}
|
||||
<h1>News</h1>
|
||||
<h2>News</h2>
|
||||
{% for a in request|announcements %}
|
||||
<div class="site-announcement-box">
|
||||
<div class="site-announcement-white">
|
||||
@@ -346,7 +346,7 @@
|
||||
<p>
|
||||
<ul>
|
||||
<li>
|
||||
<h1>Help</h1>
|
||||
<h2>Help</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/rowers/help/">Help</a>
|
||||
@@ -366,7 +366,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h1>About</h1>
|
||||
<h2>About</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/rowers/email/">Contact</a>
|
||||
@@ -386,7 +386,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h1>Paid Plans</h1>
|
||||
<h2>Paid Plans</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/rowers/paidplans/">Paid Plans</a>
|
||||
@@ -394,7 +394,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h1>Legal</h1>
|
||||
<h2>Legal</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/rowers/legal/">Terms and Conditions</a>
|
||||
|
||||
Reference in New Issue
Block a user