clicking on notes timer now resets it #779

This commit is contained in:
Hakim El Hattab 2014-05-04 08:13:03 +02:00
parent 1b236bdf21
commit fa6187072e

View File

@ -82,6 +82,17 @@
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px 16px; padding: 10px 16px;
padding-bottom: 20px; padding-bottom: 20px;
cursor: pointer;
}
.speaker-controls-time .reset-button {
opacity: 0;
float: right;
color: #666;
text-decoration: none;
}
.speaker-controls-time:hover .reset-button {
opacity: 1;
} }
.speaker-controls-time .timer, .speaker-controls-time .timer,
@ -144,7 +155,7 @@
<div id="upcoming-slide"><span class="label">UPCOMING:</span></div> <div id="upcoming-slide"><span class="label">UPCOMING:</span></div>
<div id="speaker-controls"> <div id="speaker-controls">
<div class="speaker-controls-time"> <div class="speaker-controls-time">
<h4 class="label">Time</h4> <h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
<div class="clock"> <div class="clock">
<span class="clock-value">0:00 AM</span> <span class="clock-value">0:00 AM</span>
</div> </div>
@ -340,6 +351,12 @@
// Then update every second // Then update every second
setInterval( _updateTimer, 1000 ); setInterval( _updateTimer, 1000 );
timeEl.addEventListener( 'click', function() {
start = new Date();
_updateTimer();
return false;
} );
} }
function zeroPadInteger( num ) { function zeroPadInteger( num ) {