Skip to content

Commit 34d776b

Browse files
extraneous " while editing chart
1 parent f4d6b0e commit 34d776b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

classes/Visualizer/Render/Page/Update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function updateEditorAndSettings() {
8787

8888
$sidebar = apply_filters( 'visualizer_get_sidebar', '', $this->id );
8989

90-
return 'win.updateHTML(\'' . json_encode( $editor ) . '\', \'' . json_encode( $sidebar ) . '\');';
90+
return 'win.updateHTML(' . json_encode( array( 'html' => $editor ) ) . ', ' . json_encode( array( 'html' => $sidebar ) ) . ');';
9191
}
9292

9393
}

js/preview.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55

66
$(document).ready(function() {
77
// when data is impported using csv/url, update the hidden data and the advanced settings sidebar.
8+
// editor and sidebar are both JSON objects
89
window.updateHTML = function( editor, sidebar ) {
910
$('.viz-simple-editor').remove();
10-
$('#content').append(editor);
11+
$('#content').append(editor.html);
1112
$('#settings-form .viz-group').remove();
12-
$('#settings-form').append(sidebar);
13+
$('#settings-form').append(sidebar.html);
1314

1415
$('#settings-form .control-text').change(updateChart).keyup(updateChart);
1516
$('#settings-form .control-select, #settings-form .control-checkbox, #settings-form .control-check').change(updateChart);

0 commit comments

Comments
 (0)