remove angular from views
This commit is contained in:
@@ -221,6 +221,7 @@ $(document).ready(function() {
|
|||||||
case challengeTypes.ZIPLINE:
|
case challengeTypes.ZIPLINE:
|
||||||
var didCompleteWith = $('#completed-with').val() || null;
|
var didCompleteWith = $('#completed-with').val() || null;
|
||||||
var publicURL = $('#public-url').val() || null;
|
var publicURL = $('#public-url').val() || null;
|
||||||
|
console.log("debug", didCompleteWith, publicURL);
|
||||||
$.post(
|
$.post(
|
||||||
'/completed-zipline-or-basejump/',
|
'/completed-zipline-or-basejump/',
|
||||||
{
|
{
|
||||||
|
@@ -266,7 +266,7 @@ module.exports = function(app) {
|
|||||||
origChallengeName +
|
origChallengeName +
|
||||||
'` Please double check the name.'
|
'` Please double check the name.'
|
||||||
});
|
});
|
||||||
return Observable.just('/challenges');
|
return Observable.just('/map');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dasherize(challenge.name) !== origChallengeName) {
|
if (dasherize(challenge.name) !== origChallengeName) {
|
||||||
|
@@ -38,12 +38,8 @@ block content
|
|||||||
.form-group.text-center.negative-10
|
.form-group.text-center.negative-10
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
// extra field to distract password tools like lastpass from injecting css into our username field
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
||||||
input.form-control(ng-show="false")
|
input.form-control.hidden
|
||||||
input.form-control#completed-with(name="existingUser", placeholder="Your pair's username if pairing", existing-username='', ng-model="existingUser")
|
input.form-control#completed-with(name="existingUser", placeholder="Your pair's username if pairing")
|
||||||
.col-xs-12(ng-cloak, ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine && existingUser.length > 0")
|
|
||||||
alert(type='danger')
|
|
||||||
span.ion-close-circled
|
|
||||||
| Username not found
|
|
||||||
label.negative-10.btn.btn-primary.btn-block.btn-lg#submitButton
|
label.negative-10.btn.btn-primary.btn-block.btn-lg#submitButton
|
||||||
i.fa.fa-play
|
i.fa.fa-play
|
||||||
| Run tests (ctrl + enter)
|
| Run tests (ctrl + enter)
|
||||||
|
@@ -73,21 +73,16 @@ block content
|
|||||||
.form-group.text-center
|
.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
|
.col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2
|
||||||
// extra field to distract password tools like lastpass from injecting css into our username field
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
||||||
input.form-control(ng-show="false")
|
input.form-control.hidden
|
||||||
if (challengeType === "3")
|
if (challengeType === "3")
|
||||||
input.form-control#public-url(type='url', name="solutionUrl", placeholder="http://codepen.io/your-pen-here", autofocus, required, ng-minlength="10", ng-model="deploymentUrl")
|
input.form-control#public-url(type="url", name="solutionUrl", placeholder="http://codepen.io/your-pen-here", autofocus, required)
|
||||||
else
|
else
|
||||||
input.form-control#public-url(type='url', name="solutionUrl", placeholder="http://yourapp.com", autofocus, required, ng-minlength="10", ng-model="deploymentUrl")
|
input.form-control#public-url(type="url", name="solutionUrl", placeholder="http://yourapp.com", autofocus, required)
|
||||||
input.form-control#github-url(name="githubUrl", placeholder="http://github.com/camper/project", ng-model="githubUrl")
|
input.form-control#github-url(name="githubUrl", placeholder="http://github.com/camper/project")
|
||||||
|
input.form-control#completed-with(name="existingUser", placeholder="If you paired, enter your pair's username here")
|
||||||
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)
|
if (user)
|
||||||
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid') Go to my next challenge
|
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) Go to my next challenge
|
||||||
.button-spacer
|
.button-spacer
|
||||||
script.
|
script.
|
||||||
$('#complete-zipline-or-basejump-dialog').on('keypress', modalControlEnterHandler);
|
$('#complete-zipline-or-basejump-dialog').on('keypress', modalControlEnterHandler);
|
||||||
|
@@ -27,3 +27,19 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
|
|||||||
.hidden-xs.hidden-sm
|
.hidden-xs.hidden-sm
|
||||||
a(href='/' + user.username)
|
a(href='/' + user.username)
|
||||||
img.profile-picture.float-right(src='#{user.picture}')
|
img.profile-picture.float-right(src='#{user.picture}')
|
||||||
|
script.
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.learn-btn').click(function(e) {
|
||||||
|
var challengeDashedName = null;
|
||||||
|
e.preventDefault();
|
||||||
|
if (typeof dashedName === "string") {
|
||||||
|
return location.reload();
|
||||||
|
}
|
||||||
|
if (typeof localStorage !== 'undefined') {
|
||||||
|
challengeDashedName = localStorage.getItem('currentDashedName');
|
||||||
|
}
|
||||||
|
window.location = challengeDashedName ?
|
||||||
|
'/challenges/' + challengeDashedName :
|
||||||
|
'/map';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user