From 6b29296060a0fcbc32ddb27fe56325bccff144e0 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 10 Feb 2012 15:24:59 +0000 Subject: gfse&minibar: select the right grammar in minibar when invoked from gfse The grammar that the user is currently working is now the one shown initially in minibar, instead of the first grammar in alphabetical order. Also GFServer.hs now removes absolute paths to the grammar files on the server in error messages from GF returned to to gfse. --- src/www/minibar/minibar.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/www/minibar/minibar.js') diff --git a/src/www/minibar/minibar.js b/src/www/minibar/minibar.js index a94cc5629..e37b33a7c 100644 --- a/src/www/minibar/minibar.js +++ b/src/www/minibar/minibar.js @@ -32,7 +32,8 @@ function Minibar(server,opts) { target: "minibar", try_google: true, feedback_url: null, - help_url: null + help_url: null, + initial_grammar: null } // Apply supplied options @@ -81,7 +82,9 @@ Minibar.prototype.show_grammarlist=function(grammars) { } if(options.help_url) menubar.appendChild(button("Help",bind(open_help,this))); - select_grammar(grammars[0]); + var grammar0=options.initial_grammar || grammars[0]; + grammar_menu.value=grammar0; + select_grammar(grammar0); } } -- cgit v1.2.3