From 883a561d7313b11270fed8e274c723cd0b2b5662 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Fri, 19 Jun 2015 21:24:04 -0700 Subject: [PATCH] finishing touches on calculator --- public/js/calculator.js | 4 ++++ public/js/main_0.0.2.js | 2 -- seed/challenges/basic-html5-and-css.json | 2 +- server/views/resources/calculator.jade | 11 +++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/public/js/calculator.js b/public/js/calculator.js index 8786b78bea2..9cd991a9e79 100644 --- a/public/js/calculator.js +++ b/public/js/calculator.js @@ -154,6 +154,10 @@ $(document).ready(function () { }, 1000); }); + d3.selectAll("#chart").on("click", function () { + change(); + }); + function change() { if ($("body").data("state") === "stacked") { transitionGrouped(); diff --git a/public/js/main_0.0.2.js b/public/js/main_0.0.2.js index 7fce4bdaba6..65ec9f170c0 100644 --- a/public/js/main_0.0.2.js +++ b/public/js/main_0.0.2.js @@ -331,8 +331,6 @@ $(document).ready(function() { $('#story-submit').on('click', storySubmitButtonHandler); - $('#reset-button').on('click', resetEditor); - var commentSubmitButtonHandler = function commentSubmitButtonHandler() { $('#comment-button').unbind('click'); var data = $('#comment-box').val(); diff --git a/seed/challenges/basic-html5-and-css.json b/seed/challenges/basic-html5-and-css.json index 24b1c719395..7fdae6da097 100644 --- a/seed/challenges/basic-html5-and-css.json +++ b/seed/challenges/basic-html5-and-css.json @@ -1541,7 +1541,7 @@ ], "tests": [ "assert($('input[placeholder]').length > 0, 'Add a placeholder attribute text input element.')", - "assert($('input').attr('placeholder').match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".')" + "assert($('input') && $('input').attr('placeholder') && $('input').attr('placeholder').match(/cat\\s+photo\\s+URL/gi), 'Set the value of your placeholder attribute to \"cat photo URL\".')" ], "challengeSeed": [ "", diff --git a/server/views/resources/calculator.jade b/server/views/resources/calculator.jade index 5e253521396..43736531408 100644 --- a/server/views/resources/calculator.jade +++ b/server/views/resources/calculator.jade @@ -3,6 +3,7 @@ block content script(src="../../../js/calculator.js") .row .col-xs-12.col-sm-10.col-md-8.col-lg-6.col-sm-offset-1.col-md-offset-2.col-lg-offset-3 + h1.text-center Coding Bootcamp Cost Calculator h3.text-center.text-primary#chosen Coming from _______, and making $_______, your true costs will be: #city-buttons .spacer @@ -102,3 +103,13 @@ block content a(href='https://en.wikipedia.org/wiki/Economic_cost' target='_blank') here | . li.large-li Free Code Camp. We don't charge tuition or garnish wages. We're fully online so you don't have to move. We're self-paced so you don't have to quit your job. Thus, your true cost of attending Free Code Camp will be $0. + .spacer + .row + .col-xs-12.col-sm-4.col-md-3 + img.img-responsive.testimonial-image(src='https://www.evernote.com/l/AHRIBndcq-5GwZVnSy1_D7lskpH4OcJcUKUB/image.png') + .col-xs-12.col-sm-8.col-md-9 + h3 Built by Suzanne Atkinson + p.large-p Suzanne is an emergency medicine physician, triathlon coach and web developer from Pittsburgh. You should   + a(href='https://twitter.com/intent/user?screen_name=SteelCityCoach' target='_blank') follow her on Twitter + | . + .spacer