Skip to content

Commit

Permalink
Show only the resuts on the homepage #58
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Feb 14, 2016
1 parent 1b0d805 commit 8cf8cfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
16 changes: 0 additions & 16 deletions application/views/home/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@
</div>


<div id="demo-first-step" class="form-group">
<div class="col-sm-offset-1 col-sm-4">
<center>
<br />
<br />
<br />
<a
style="display:none; background-color:#1763A5"
id="sync-button"
class="btn btn-primary btn-lg" disabled="disabled">
</a>
</center>
</div>
</div>


<div style="margin-top:90px;" id="demo-second-step" class="col-sm-5" >
<div class="col-sm-12">
<h1>Congratulations!</h1> <br/> <p class="accuracy-subtitle"> The accuracy of your <strong><span class="watch-brand">watch</span></strong> is </p>
Expand Down
44 changes: 2 additions & 42 deletions assets/js/home.logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,57 +24,17 @@ $( document ).ready(function() {
});

initSize();
initDemo();

$('video,audio').mediaelementplayer({
enableAutosize: true,
features: []
});



$(".watch-accuracy").html(delta.toFixed(1));
$("#demo-second-step").show();

});

var timeoutClick;

function initDemo(){

$("#sync-button").html("<span>"
+ "Press this button when <br /> the second-hand <br /><br />​​"
+ '<img src="../../assets/img/stepnew.png" style="width:30%;" />'
+ "<br /><br />"
+ "reaches <i><b>exactly</b></i>&nbsp; the twelve <br /> o'clock position </span> <br />"
);

$("#sync-button").show();
$("#demo-first-step").show();
$("#demo-second-step").hide();

var d = new Date();
var seconds = d.getSeconds();

timeoutClick = setTimeout(
function(){$( "#sync-button" ).click()},
(60 - seconds+1) * 1000);

$( "#sync-button" ).click(function() {

clearInterval(timeoutClick);

var result = delta;

$("#demo-first-step").hide();
$("#demo-second-step").fadeToggle();
$(".watch-accuracy").html(result.toFixed(1));

setTimeout(
function(){initDemo();},
10 * 1000);
});

}

function initSize(){

var windowHeight = $(window).height();
Expand Down

0 comments on commit 8cf8cfe

Please sign in to comment.