completes #17 - live-coder plus text input type
Squashed commit of the following: commit d41cbf66eb2a9ee705ab60bb156eed95881fa193 Author: Mark Moser <mark.moser@perficient.com> Date: Thu Aug 4 19:58:20 2016 -0500 live-coder-text validations commit 866bfeb863516a8656bc26b10f967d0b9b8d8505 Author: Mark Moser <mark.moser@perficient.com> Date: Thu Aug 4 11:57:57 2016 -0500 getting things green again and rebasing develop commit 28a23200f291e30c690b71e9bcae3e1a69eb3093 Author: Derek Montgomery <montgomerygraphics@gmail.com> Date: Thu Aug 4 10:14:23 2016 -0500 Progress on live coder text field
This commit is contained in:
@ -93,7 +93,7 @@ function indentSelection(e){
|
||||
}
|
||||
|
||||
function loadLiveCoders(){
|
||||
$.each($('.answer-sec.live_code-type'), function(index, elem){
|
||||
$.each($('.answer-sec.live_code-type, .answer-sec.live_code_text-type'), function(index, elem){
|
||||
var qid = $(elem).data('qid');
|
||||
$(elem).find("[data-id='live-coder-answer']").load("/live-coder-entry/" + qid, function(){
|
||||
$(elem).find('.js-error').addClass('hidden');
|
||||
@ -112,7 +112,7 @@ $(function(){
|
||||
// wait a half second before updating results
|
||||
// restart the timer if they resume typing
|
||||
$('html').on('keyup', '.code-input textarea', function(){
|
||||
var elem = $(this).closest('.answer-sec.live_code-type');
|
||||
var elem = $(this).closest('.answer-sec.live_code-type, .answer-sec.live_code_text-type');
|
||||
if (timer) { clearTimeout(timer); }
|
||||
timer = setTimeout(updateResults(elem), 500);
|
||||
});
|
||||
|
@ -173,7 +173,7 @@ $('.answer-sec')
|
||||
.on('click', '.button-save', saveClickHandler);
|
||||
|
||||
// Dynamically load in coders
|
||||
$.each($('.answer-sec.live-coder-type'), function(index, elem){
|
||||
$.each($('.answer-sec.live_code-type, .answer-sec.live_code_text-type'), function(index, elem){
|
||||
var qid = $(elem).data('qid');
|
||||
$(elem).find("[data-id='live-coder-answer']").load("/live-coder-entry/" + qid, function(){
|
||||
$(elem).find('.js-error').addClass('hidden');
|
||||
|
Reference in New Issue
Block a user