Skip to content

Commit

Permalink
Minor js changes
Browse files Browse the repository at this point in the history
  • Loading branch information
okonomiyaki3000 committed Nov 2, 2016
1 parent f9b40a1 commit f0f3407
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ function makeMarker()
// Initialize any CodeMirrors on page load and when a subform is added
$(function ($) {
initCodeMirror(null, $('body'));
initCodeMirror();
$('body').on('subform-row-add', initCodeMirror);
});
function initCodeMirror(event, container)
{
$('textarea.codemirror-source', container).each(function () {
container = container || document;
$(container).find('textarea.codemirror-source').each(function () {
var input = $(this).removeClass('codemirror-source');
var id = input.prop('id');
Expand Down

0 comments on commit f0f3407

Please sign in to comment.