From 0bade642a9307e72c11df5dd6cf10a9b3c429dba Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Tue, 26 May 2015 13:09:07 -0700 Subject: [PATCH 1/2] fix some aspects of zipline/basejump submission --- controllers/resources.js | 4 ++-- seed_data/challenges/basic-html5-and-css.json | 2 +- views/account/show.jade | 5 +++-- views/coursewares/showZiplineOrBasejump.jade | 17 ++++++++--------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/controllers/resources.js b/controllers/resources.js index d12e04c6d00..7ccc73e9a8f 100644 --- a/controllers/resources.js +++ b/controllers/resources.js @@ -622,12 +622,12 @@ module.exports = { var userName = req.user.profile.username; var challenge = req.body.payload.challenge; slack.send({ - text: "Anyone want to pair with *" + userName + "* on " + challenge + + text: "Anyone want to pair with @" + userName + " on " + challenge + "?\nMake sure you install Screen Hero here:" + "http://freecodecamp.com/field-guide/how-do-i-install-screenhero\n" + "Then start your pair program session with *" + userName + "* by typing \"/hero @" + userName + "\" into Slack.\n And *"+ userName + - "*, be sure to launch Screen Hero, then keep coding." + + "*, be sure to launch Screen Hero, then keep coding. " + "Another camper may pair with you soon.", channel: '#letspair', username: "Companion Cube", diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index f4d0098c3f3..053975c49ae 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -1069,7 +1069,7 @@ "You can create one like this: <input type='text'>" ], "tests": [ - "assert($('input[type=\"text\"').length > 0, 'Your webpage should have an text field input element.')" + "assert($('input').length > 0, 'Your app should have an text field input element.')" ], "challengeSeed": [ "", diff --git a/views/account/show.jade b/views/account/show.jade index b4887d84d4c..821aa3aac19 100644 --- a/views/account/show.jade +++ b/views/account/show.jade @@ -147,10 +147,11 @@ block content th.col-xs-6 Link for challenge in challenges tr - td.col-xs-4= challenge.name + td.col-xs-4 + a(href='/challenges/' + challenge.name, target='_blank')= challenge.name td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-6 - a(href="http://" + challenge.solution, target='_blank') View my solution + a(href=challenge.solution, target='_blank') View my solution br - if (bonfires.length > 0) diff --git a/views/coursewares/showZiplineOrBasejump.jade b/views/coursewares/showZiplineOrBasejump.jade index dbf5c103a15..a114e96d0ea 100644 --- a/views/coursewares/showZiplineOrBasejump.jade +++ b/views/coursewares/showZiplineOrBasejump.jade @@ -33,7 +33,7 @@ block content .button-spacer script. var userLoggedIn = true; - - else + else a.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress script. var userLoggedIn = false; @@ -73,32 +73,31 @@ block content form.form-horizontal(novalidate='novalidate', name='completedWithForm') .form-group.text-center .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2.animated.fadeIn - // extra field to distract password tools like lastpass from injecting css into our username field input.form-control(ng-show="false") if (challengeType === 3) - input.form-control#public-url(name="codepenUrl", placeholder="http://codepen.io/your-pen-here", autofocus) + input.form-control#public-url(type='url', name="solutionUrl", placeholder="http://codepen.io/your-pen-here", autofocus, required, ng-minlength="10", ng-model="deploymentUrl") else - input.form-control#public-url(name="depoloymentUrl", placeholder="http://yourapp.com", autofocus) - input.form-control#github-url(name="githubUrl", placeholder="http://github.com/camper/project") + input.form-control#public-url(type='url', name="solutionUrl", placeholder="http://yourapp.com", autofocus, required, ng-minlength="10", ng-model="deploymentUrl") + input.form-control#github-url(name="githubUrl", placeholder="http://github.com/camper/project", ng-model="githubUrl") - input.form-control#completed-with(name="existingUser", placeholder="If you paired, enter your pair's username here", existing-username='', ng-model="existingUser") + input.form-control#completed-with(name="existingUser", ng-minlength placeholder="If you paired, enter your pair's username here", existing-username='', ng-model="existingUser") .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2(ng-cloak, ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine && existingUser.length > 0") alert(type='danger') span.ion-close-circled | Username not found if (user) - a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Go to my next challenge (ctrl + enter) + a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid') Go to my next challenge (ctrl + enter) script. $('#complete-zipline-or-basejump-dialog').on('keypress', modalControlEnterHandler); - - if (user.progressTimestamps.length > 2) + if (user.progressTimestamps.length > 2) .button-spacer a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank") i.fa.fa-twitter   = phrase - - else + else a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress script. $('body').on('keypress', controlEnterHandler); From 8a737a992eee657690608514aba4fab1cf2474b4 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Tue, 26 May 2015 13:31:34 -0700 Subject: [PATCH 2/2] update firefox instructions --- views/home.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/home.jade b/views/home.jade index b968ed12b0c..9cc4414cdba 100644 --- a/views/home.jade +++ b/views/home.jade @@ -6,9 +6,9 @@ block content .embed-responsive.embed-responsive-16by9 iframe.embed-responsive-item(src='//player.vimeo.com/video/128853855') br + h3 Note: If you're using Firefox and the buttons aren't working, do a full refresh (control + f5 on Windows and command + shift + r on Mac). We're working on this. h3 Note: If you've already completed the HTML, CSS, Bootstrap Waypoints, you do not need to do these new Waypoints. h3 Note: If you were already doing full stack JavaScript Waypoints (Node.js, Angular.js), go ahead and start the Bonfires (Basic Algorithm Scripting). - h3 Note: If you're using Firefox and the buttons aren't working, do a full refresh (control/apple + f5). We're working on this. h3 Thanks for your patience everyone! We're confident these curriculum improvements will better prepare you for your nonprofit projects and for the workplace. br br