File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
classes/Visualizer/Render/Page Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ private function updateEditorAndSettings() {
87
87
88
88
$ sidebar = apply_filters ( 'visualizer_get_sidebar ' , '' , $ this ->id );
89
89
90
- return 'win.updateHTML( \'' . json_encode ( $ editor ) . '\' , \'' . json_encode ( $ sidebar ) . '\ '); ' ;
90
+ return 'win.updateHTML( ' . json_encode ( array ( ' html ' => $ editor ) ) . ', ' . json_encode ( array ( ' html ' => $ sidebar ) ) . '); ' ;
91
91
}
92
92
93
93
}
Original file line number Diff line number Diff line change 5
5
6
6
$ ( document ) . ready ( function ( ) {
7
7
// when data is impported using csv/url, update the hidden data and the advanced settings sidebar.
8
+ // editor and sidebar are both JSON objects
8
9
window . updateHTML = function ( editor , sidebar ) {
9
10
$ ( '.viz-simple-editor' ) . remove ( ) ;
10
- $ ( '#content' ) . append ( editor ) ;
11
+ $ ( '#content' ) . append ( editor . html ) ;
11
12
$ ( '#settings-form .viz-group' ) . remove ( ) ;
12
- $ ( '#settings-form' ) . append ( sidebar ) ;
13
+ $ ( '#settings-form' ) . append ( sidebar . html ) ;
13
14
14
15
$ ( '#settings-form .control-text' ) . change ( updateChart ) . keyup ( updateChart ) ;
15
16
$ ( '#settings-form .control-select, #settings-form .control-checkbox, #settings-form .control-check' ) . change ( updateChart ) ;
You can’t perform that action at this time.
0 commit comments