mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 18:22:50 -06:00
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.
This commit is contained in:
@@ -7,13 +7,6 @@ var online_options={
|
||||
//grammar_list: ["Foods.pgf"], // leave undefined to get list from server
|
||||
}
|
||||
|
||||
|
||||
if(/^\?\/tmp\//.test(location.search)) {
|
||||
online_options.grammars_url=location.search.substr(1);
|
||||
}
|
||||
|
||||
var server=pgf_online(online_options);
|
||||
|
||||
var minibar_options= {
|
||||
show_abstract: true,
|
||||
show_trees: true,
|
||||
@@ -22,4 +15,12 @@ var minibar_options= {
|
||||
//feedback_url: "feedback.html",
|
||||
try_google: true
|
||||
}
|
||||
|
||||
if(/^\?\/tmp\//.test(location.search)) {
|
||||
var args=decodeURIComponent(location.search.substr(1)).split(" ")
|
||||
if(args[0]) online_options.grammars_url=args[0];
|
||||
if(args[1]) minibar_options.initial_grammar=args[1];
|
||||
}
|
||||
|
||||
var server=pgf_online(online_options);
|
||||
var minibar=new Minibar(server,minibar_options);
|
||||
|
||||
Reference in New Issue
Block a user