Added the scrolling editor

This commit is contained in:
benmcmahon100
2015-08-01 19:55:40 +01:00
parent 13bb5df68d
commit abfab7389b
3 changed files with 15 additions and 9 deletions

View File

@ -311,6 +311,10 @@ $(document).ready(function() {
$('#story-submit').on('click', storySubmitButtonHandler);
if($('.editorScrollDiv').html() !== 'undefined'){
$('.editorScrollDiv').css("height",$(window).height()-($('.navbar').height()+$('.footer').height()+100) + "px");
}
//fakeiphone positioning hotfix
if($('.iphone-position').html() !==undefined || $('.iphone').html() !== undefined){
var startIphonePosition = parseInt($('.iphone-position').css('top').replace('px', ''));

View File

@ -65,10 +65,11 @@ block content
var challengeType = !{JSON.stringify(challengeType)};
var started = Math.floor(Date.now());
.col-xs-12.col-sm-12.col-md-5.col-lg-6
#mainEditorPanel
form.code
.form-group.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;')
.editorScrollDiv(style = "overflow-y: scroll; overflow-x: hidden;")
#mainEditorPanel
form.code
.form-group.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;')
.col-md-4.col-lg-3
.hidden-xs.hidden-sm
img.iphone-position.iframe-scroll(src="https://s3.amazonaws.com/freecodecamp/iphone6-frame.png")

View File

@ -66,11 +66,12 @@ block content
var _ = R;
var dashed = !{JSON.stringify(dashedName)};
.col-xs-12.col-sm-12.col-md-8
#mainEditorPanel
form.code
.form-group.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;')
script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.6.js')
.editorScrollDiv(style = "overflow-y: scroll; overflow-x: hidden;")
#mainEditorPanel
form.code
.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;')
script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.6.js')
#complete-courseware-dialog.modal(tabindex='-1')
.modal-dialog.animated.zoomIn.fast-animation
.modal-content