diff --git a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js index 137425f318..89dc0d9dd6 100644 --- a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js +++ b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js @@ -198,9 +198,8 @@ codeStorage.isAlive = function() { return val !== 'null' && val !== 'undefined' && (val && val.length > 0); -} +}; codeStorage.updateStorage = function(){ - //document.getElementById('scroll-locker').dispatchEvent(new CustomEvent('previewUpdateSpy', {'detail': $('.scroll-locker').scrollTop()})); if(typeof(Storage) !== undefined) { var value = editor.getValue(); localStorage.setItem(codeStorage.keyValue, value); @@ -257,7 +256,6 @@ editor.setValue(editorValue.replace((/fccss/gi), '')); updatePreview(); codeStorage.updateStorage(); diff --git a/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js b/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js index ce34d777be..ddeb9519f4 100644 --- a/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js +++ b/public/js/lib/coursewares/coursewaresJSFramework_0.0.6.js @@ -330,7 +330,6 @@ codeStorage.isAlive = function() { (val && val.length > 0); } codeStorage.updateStorage = function(){ - document.getElementById('scroll-locker').dispatchEvent(new CustomEvent('previewUpdateSpy', {'detail': $('.scroll-locker').scrollTop()})); if(typeof(Storage) !== undefined) { var value = editor.getValue(); localStorage.setItem(codeStorage.keyValue, value); diff --git a/public/js/main_0.0.3.js b/public/js/main_0.0.3.js index e52469bb2c..cd126faaf6 100644 --- a/public/js/main_0.0.3.js +++ b/public/js/main_0.0.3.js @@ -59,44 +59,11 @@ $(document).ready(function() { function reBindModals(){ - $('#i-want-help').unbind('click'); - $('#i-want-help').on('click', function() { - $('#help-modal').modal('hide'); - var editorValue = editor.getValue(); - var currentLocation = window.location.href; - $.post( - '/get-help', - { - payload: { - code: editorValue, - challenge: currentLocation - } - }, - function(res) { - if (res) { - window.open('https://gitter.im/FreeCodeCamp/Help', '_blank') - } - } - ); - }); - - $('#i-want-help-editorless').unbind('click'); - $('#i-want-help-editorless').on('click', function() { - $('#help-editorless-modal').modal('hide'); - var currentLocation = window.location.href; - $.post( - '/get-help', - { - payload: { - challenge: currentLocation - } - }, - function(res) { - if (res) { - window.open('https://gitter.im/FreeCodeCamp/Help', '_blank') - } - } - ); + $('.close-modal').unbind('click'); + $('.close-modal').on('click', function(){ + setTimeout(function() { + $('#issue-modal').modal('hide'); + }, 2000); }); $('#report-issue').unbind('click'); @@ -105,25 +72,6 @@ $(document).ready(function() { window.open('https://github.com/freecodecamp/freecodecamp/issues/new?&body=Challenge '+ window.location.href +' has an issue. Please describe how to reproduce it, and include links to screenshots if possible.', '_blank') }); - $('#i-want-help').unbind('click'); - $('#i-want-to-pair').on('click', function() { - $('#pair-modal').modal('hide'); - var currentLocation = window.location.href; - $.post( - '/get-pair', - { - payload: { - challenge: currentLocation - } - }, - function(res) { - if (res) { - window.open('https://gitter.im/FreeCodeCamp/LetsPair', '_blank') - } - } - ); - }); - $('#completed-courseware').unbind('click'); $('#completed-courseware').on('click', function() { $('#complete-courseware-dialog').modal('show'); diff --git a/server/views/partials/challenge-modals.jade b/server/views/partials/challenge-modals.jade index 399cb4aab1..4046a74c54 100644 --- a/server/views/partials/challenge-modals.jade +++ b/server/views/partials/challenge-modals.jade @@ -30,11 +30,11 @@ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') × .modal-body.text-center h3 Remember to use   - a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank') Read-Search-Ask + a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck', target='_blank') Read-Search-Ask | . h3 If you've already read the errors and searched Google, you should ask for help. h3 This will take you to our help room. - a.btn.btn-lg.btn-primary.btn-block(href='https://gitter.im/FreeCodeCamp/help', data-dismiss='modal', aria-hidden='true' target='_blank') Take me to the help room + a.btn.btn-lg.btn-primary.btn-block.close-modal(href='https://gitter.im/FreeCodeCamp/help', target='_blank') Take me to the help room a.btn.btn-lg.btn-info.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel #reset-modal.modal(tabindex='-1')