diff options
| author | john.j.camilleri <john.j.camilleri@chalmers.se> | 2012-11-23 15:03:36 +0000 |
|---|---|---|
| committer | john.j.camilleri <john.j.camilleri@chalmers.se> | 2012-11-23 15:03:36 +0000 |
| commit | d9867893f83c801b37a4fe0acf0fa7289e857031 (patch) | |
| tree | 33af1fe9716a507a6047148441ae9a749e238def /src/www/syntax-editor/editor_online.js | |
| parent | 9e430184ba5063110e5ec72c6137e4d38f92e206 (diff) | |
Syntax editor: now uses common GrammarManager object
Diffstat (limited to 'src/www/syntax-editor/editor_online.js')
| -rw-r--r-- | src/www/syntax-editor/editor_online.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/www/syntax-editor/editor_online.js b/src/www/syntax-editor/editor_online.js index a519d28ce..5ca81c9fa 100644 --- a/src/www/syntax-editor/editor_online.js +++ b/src/www/syntax-editor/editor_online.js @@ -8,8 +8,7 @@ var editor_options = { // grammar: "http://localhost:41296/grammars/Phrasebook.pgf", // startcat: "Proposition", // languages: ["Eng","Swe","Ita"], - // abstr: "PropOpenDate (SuperlPlace TheMostExpensive School) Tomorrow", - // node_id: null + // abstr: "PropOpenDate (SuperlPlace TheMostExpensive School) Tomorrow" // }, show: { grammar_menu: true, @@ -35,8 +34,6 @@ if(window.Minibar) // Minibar loaded? }, // get us back to the editor! abstract_action: function(tree) { - //var minibar=this; - // how to get hold of new minibar? var editor_options = { target: "editor", initial: { @@ -52,13 +49,14 @@ if(window.Minibar) // Minibar loaded? editor.hide(); editor.minibar=new Minibar(server,minibar_options); //editor.minibar.editor = editor; // :S - editor.minibar.show() + editor.minibar.show(); } if(/^\?\/tmp\//.test(location.search)) { var args=decodeURIComponent(location.search.substr(1)).split(" ") if(args[0]) server_options.grammars_url=args[0]; } var server = pgf_online(server_options); -var editor = new Editor(server, editor_options); - +// var editor = new Editor(server, editor_options); +var gm = new GrammarManager(server); +var editor = new Editor(gm, editor_options); |
