From def375e58808ea431ef0d786ae0abb9de0a67155 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 26 Nov 2012 15:08:16 +0000 Subject: [PATCH] gfse: add Prelude to the list of RGL modules that can be opened --- src/www/gfse/editor.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index 059c0715a..a731279ab 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -1111,7 +1111,9 @@ function draw_concrete(g,i) { } var rgl_modules=["Syntax","Lexicon","Paradigms","Extra","Symbolic"]; +var common_modules=["Prelude"]; var rgl_info = { + Prelude: "Some facilities usable in all grammars", Paradigms: "Lexical categories (A, N, V, ...) and smart paradigms (mkA, mkN, mkV, ...) for turning raw strings into new dictionary entries.", Syntax: "Syntactic categories (Utt, Cl, V, NP, CN, AP, ...), structural words (this_Det, few_Det, ...) and functions for building phrases (mkUtt, mkCl, mkCN, mkVP, mkAP, ...)", Lexicon: "A multilingual lexicon with ~350 common words.", @@ -1126,8 +1128,7 @@ function add_open(g,ci) { var ds={}; for(var i in os) ds[os[i]]=true; var list=[] - for(var i in rgl_modules) { - var b=rgl_modules[i], m=b+conc.langcode; + function add_module(b,m) { if(!ds[m]) { var info=rgl_info[b]; var infotext=info ? text(" - "+info) : text(""); @@ -1135,6 +1136,14 @@ function add_open(g,ci) { [text(m)]),infotext])); } } + for(var i in rgl_modules) { + var b=rgl_modules[i]; + add_module(b,b+conc.langcode) + } + for(var i in common_modules) { + var b=common_modules[i]; + add_module(b,b) + } if(list.length>0) { var file=element("file"); clear(file) @@ -1186,7 +1195,7 @@ function draw_opens(g,ci) { if(!first) es.push(sep(", ")) var m=os[i]; var b=m.substr(0,m.length-conc.langcode.length); - var info=rgl_info[b]; + var info=rgl_info[m] || rgl_info[b]; var id=ident(m); if(info) id.title=info; id.onclick=show_opers(m)