Remove manual JSON parsing because it is not needed.

This commit is contained in:
Jeremy Goecks
2013-05-30 16:57:03 -04:00
parent 51f8c4b2ec
commit 758189ca9e
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ ${render_trackster_js_files()}
container: $("#browser-container"),
name: $("#new-title").val(),
dbkey: $("#new-dbkey").val()
}, JSON.parse('${ h.to_json_string( viewport_config ) }'));
}, ${ h.to_json_string( viewport_config ) } );
view.editor = true;
init_editor();
set_up_router({view: view});
@@ -94,9 +94,9 @@
vis_id: "${config.get('vis_id')}",
dbkey: "${config.get('dbkey')}"
},
JSON.parse('${ h.to_json_string( config.get( 'viewport', dict() ) ) }'),
JSON.parse('${ h.to_json_string( config['tracks'] ).replace("'", "\\'") }'),
JSON.parse('${ h.to_json_string( config.get('bookmarks') ) }')
${ h.to_json_string( config.get( 'viewport', dict() ) ) },
${ h.to_json_string( config['tracks'] ) },
${ h.to_json_string( config.get('bookmarks') ) }
);
// Set up keyboard navigation.
@@ -168,9 +168,9 @@
};
$(function firstVizLoad(){ // calls when viz is loaded for the first time
var config = JSON.parse( '${ h.to_json_string( config )}');
var config = ${ h.to_json_string( config )};
window.config = config;
var data = JSON.parse('${h.to_json_string(data)}');
var data = ${h.to_json_string(data)};
window.data = data;
initPhyloViz(data, config);
});