2015-02-13 21:07:56 -05:00
|
|
|
|
extends ../layout-wide
|
2015-02-13 20:55:49 -05:00
|
|
|
|
block content
|
|
|
|
|
.row
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-4.bonfire-top
|
2016-01-15 04:03:31 -08:00
|
|
|
|
h4.text-center= name
|
|
|
|
|
hr
|
|
|
|
|
ol
|
|
|
|
|
for step, index in description
|
|
|
|
|
.row.checklist-element(id="#{dashedName + index}")
|
2016-02-03 18:27:23 -08:00
|
|
|
|
.col-xs-2.col-sm-1.col-md-2.padded-ionic-icon.text-right
|
2016-01-15 04:03:31 -08:00
|
|
|
|
input(type='checkbox' class='challenge-list-checkbox')
|
2016-02-03 18:27:23 -08:00
|
|
|
|
.col-xs-10.col-sm-11.col-md-10
|
2016-01-15 04:03:31 -08:00
|
|
|
|
li.step-text.wrappable!= step
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-8
|
|
|
|
|
.embed-responsive.embed-responsive-16by9
|
|
|
|
|
iframe.embed-responsive-item(src='//player.vimeo.com/video/#{video}')
|
2015-09-09 19:51:24 -07:00
|
|
|
|
.spacer
|
2015-05-26 02:36:29 -07:00
|
|
|
|
if (user)
|
2015-09-08 23:47:00 -07:00
|
|
|
|
a.btn.btn-primary.btn-big.btn-block#completed-courseware-editorless I've completed this challenge (ctrl + enter)
|
2015-09-09 19:51:24 -07:00
|
|
|
|
else
|
2016-01-11 22:47:49 -08:00
|
|
|
|
a.btn.btn-big.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) I've completed this challenge (ctrl + enter)
|
2015-02-13 20:55:49 -05:00
|
|
|
|
script.
|
2015-02-13 18:40:39 -08:00
|
|
|
|
var userLoggedIn = true;
|
2015-09-09 19:51:24 -07:00
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
2016-01-15 04:03:31 -08:00
|
|
|
|
.btn.btn-primary.btn-big#challenge-help-btn Get help
|
|
|
|
|
.btn.btn-primary.btn-big#trigger-issue-modal Report a bug
|
2015-09-09 19:51:24 -07:00
|
|
|
|
if (!user)
|
2015-09-08 23:47:00 -07:00
|
|
|
|
.button-spacer
|
2015-03-29 17:09:12 -07:00
|
|
|
|
a.btn.btn-big.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
2015-02-13 18:40:39 -08:00
|
|
|
|
script.
|
|
|
|
|
var userLoggedIn = false;
|
|
|
|
|
br
|
2015-05-25 18:00:45 -07:00
|
|
|
|
|
2015-03-29 17:09:12 -07:00
|
|
|
|
script(type="text/javascript").
|
2015-05-20 21:50:31 -04:00
|
|
|
|
|
2015-05-28 16:18:04 -07:00
|
|
|
|
#complete-courseware-editorless-dialog.modal(tabindex='-1')
|
2015-09-09 18:55:20 -07:00
|
|
|
|
.modal-dialog.animated.fadeIn.fast-animation
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header= compliment
|
2015-03-21 14:28:00 +09:00
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
2015-12-04 18:24:09 -08:00
|
|
|
|
.modal-body
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.text-center
|
2015-09-14 00:02:42 -07:00
|
|
|
|
.animated.zoomInDown
|
2015-02-13 18:40:39 -08:00
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
2015-05-28 16:18:04 -07:00
|
|
|
|
if (user)
|
2015-09-09 19:54:13 -07:00
|
|
|
|
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) I've completed this challenge (ctrl + enter)
|
2015-05-28 16:18:04 -07:00
|
|
|
|
else
|
2016-01-11 22:47:49 -08:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) I've completed this challenge (ctrl + enter)
|
2015-11-06 16:35:57 -08:00
|
|
|
|
|
|
|
|
|
include ../partials/challenge-modals
|
2015-05-20 21:50:31 -04:00
|
|
|
|
script.
|
2015-11-17 21:25:16 -08:00
|
|
|
|
var common = window.common || { init: [] };
|
2015-11-06 16:35:57 -08:00
|
|
|
|
|
2016-01-11 22:47:49 -08:00
|
|
|
|
common.challengeId = !{JSON.stringify(id)};
|
2015-11-06 16:35:57 -08:00
|
|
|
|
common.challengeName = !{JSON.stringify(name)};
|
|
|
|
|
common.challengeType = !{JSON.stringify(challengeType)};
|
|
|
|
|
common.dashedName = !{JSON.stringify(dashedName)};
|
2016-01-30 00:13:41 -08:00
|
|
|
|
common.gaName = !{JSON.stringify(gaName)};
|
2015-11-17 21:25:16 -08:00
|
|
|
|
common.init.push(function($) {
|
|
|
|
|
function controlEnterHandler(e) {
|
|
|
|
|
if (
|
|
|
|
|
e.keyCode === 13 &&
|
2015-11-23 17:50:09 -08:00
|
|
|
|
(e.ctrlKey || e.metaKey)
|
2015-11-17 21:25:16 -08:00
|
|
|
|
) {
|
|
|
|
|
$('body').unbind('keydown');
|
|
|
|
|
$('#complete-courseware-editorless-dialog').modal('show');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function modalControlEnterHandler(e) {
|
|
|
|
|
if (
|
|
|
|
|
e.keyCode === 13 &&
|
2015-11-23 17:50:09 -08:00
|
|
|
|
(e.ctrlKey || e.metaKey)
|
2015-11-17 21:25:16 -08:00
|
|
|
|
) {
|
|
|
|
|
$('#complete-courseware-editorless-dialog').unbind('keydown');
|
|
|
|
|
$('#next-courseware-button').click();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
if (!{JSON.stringify(user && user.username ? true : false)}) {
|
|
|
|
|
$('#complete-courseware-editorless-dialog').bind('keydown', modalControlEnterHandler);
|
|
|
|
|
}
|
|
|
|
|
$('body').bind('keydown', controlEnterHandler);
|
|
|
|
|
|
|
|
|
|
$('#completed-courseware-editorless').on('click', function() {
|
|
|
|
|
$('#complete-courseware-editorless-dialog').modal('show');
|
|
|
|
|
});
|
|
|
|
|
});
|
2015-11-06 16:35:57 -08:00
|
|
|
|
|
|
|
|
|
include ../partials/challenge-footer
|