From 75663ac0b6ba0a93a1dff225fe5f451cb7df7d88 Mon Sep 17 00:00:00 2001 From: jordanmccullough Date: Mon, 29 Dec 2014 13:10:17 -0700 Subject: [PATCH 1/8] Update Timer with Bootstrap modal, styling --- _javascript/curriculum.js | 14 +++---- _layouts/curriculum.html | 31 +++++++++------- _stylesheets/curriculum.scss | 71 +++++++++--------------------------- 3 files changed, 40 insertions(+), 76 deletions(-) diff --git a/_javascript/curriculum.js b/_javascript/curriculum.js index f506ad70f..244204a8d 100644 --- a/_javascript/curriculum.js +++ b/_javascript/curriculum.js @@ -138,24 +138,18 @@ $(function(){ //Time toggle keybinding $(".timer-label").click(function(){ - $(".timer-wrapper").toggleClass("fade-out"); - $(".timer-amount").show(); - resetTimer(); - }); - $(".timer-exit").click(function(){ - $(".timer-wrapper").toggleClass("fade-out"); - $("#timer-check").removeAttr("checked"); - // $(".timer-amount").(); resetTimer(); }); $("#start-stop").click(function(){ + var timeLeftDisplay = $("#time-left") var min = $("#minutes").attr("value"); var duration = min*60; resetTimer(); - $(".timer-amount").hide(); + $(".time-amount").hide(); + $("#start-stop").hide(); timeLeftInterval = setInterval(function(){ timeLeftDisplay.html( Math.floor((duration)/60) + ":" + (duration%60 < 10 ? "0"+duration%60:duration%60) ); @@ -168,6 +162,8 @@ $(function(){ }); function resetTimer(){ clearInterval(timeLeftInterval); + $("#start-stop").show(); + $(".time-amount").show(); $("#time-left").html(""); } diff --git a/_layouts/curriculum.html b/_layouts/curriculum.html index be8a78429..bbaf67978 100644 --- a/_layouts/curriculum.html +++ b/_layouts/curriculum.html @@ -4,12 +4,12 @@ --- -