remove angular from views
This commit is contained in:
@@ -221,6 +221,7 @@ $(document).ready(function() {
|
||||
case challengeTypes.ZIPLINE:
|
||||
var didCompleteWith = $('#completed-with').val() || null;
|
||||
var publicURL = $('#public-url').val() || null;
|
||||
console.log("debug", didCompleteWith, publicURL);
|
||||
$.post(
|
||||
'/completed-zipline-or-basejump/',
|
||||
{
|
||||
|
@@ -266,7 +266,7 @@ module.exports = function(app) {
|
||||
origChallengeName +
|
||||
'` Please double check the name.'
|
||||
});
|
||||
return Observable.just('/challenges');
|
||||
return Observable.just('/map');
|
||||
}
|
||||
|
||||
if (dasherize(challenge.name) !== origChallengeName) {
|
||||
|
@@ -38,12 +38,8 @@ block content
|
||||
.form-group.text-center.negative-10
|
||||
.col-xs-12
|
||||
// extra field to distract password tools like lastpass from injecting css into our username field
|
||||
input.form-control(ng-show="false")
|
||||
input.form-control#completed-with(name="existingUser", placeholder="Your pair's username if pairing", existing-username='', ng-model="existingUser")
|
||||
.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
|
||||
input.form-control.hidden
|
||||
input.form-control#completed-with(name="existingUser", placeholder="Your pair's username if pairing")
|
||||
label.negative-10.btn.btn-primary.btn-block.btn-lg#submitButton
|
||||
i.fa.fa-play
|
||||
| Run tests (ctrl + enter)
|
||||
|
@@ -73,21 +73,16 @@ block content
|
||||
.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
|
||||
// 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")
|
||||
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
|
||||
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", 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
|
||||
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")
|
||||
input.form-control#completed-with(name="existingUser", placeholder="If you paired, enter your pair's username here")
|
||||
|
||||
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
|
||||
script.
|
||||
$('#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
|
||||
a(href='/' + user.username)
|
||||
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