summaryrefslogtreecommitdiff
path: root/src/www/minibar/minibar.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-02-10 15:24:59 +0000
committerhallgren <hallgren@chalmers.se>2012-02-10 15:24:59 +0000
commit6b29296060a0fcbc32ddb27fe56325bccff144e0 (patch)
treeab2a0233332fe3dbbd8a635303c9b068a88d2cd7 /src/www/minibar/minibar.js
parentd8958ed68d1b315d9a49ca45f4db3a7472d36cbb (diff)
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.
Diffstat (limited to 'src/www/minibar/minibar.js')
-rw-r--r--src/www/minibar/minibar.js7
1 files changed, 5 insertions, 2 deletions
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);
}
}