mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
gfse: example-based: remove target language from the example language menu
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Editor improvements for example-based grammar writing:
|
Editor improvements for example-based grammar writing:
|
||||||
- Remove the same language from the example language menu
|
+ Remove the same language from the example language menu
|
||||||
- Send the other language environment to getNext
|
- Send the other language environment to getNext
|
||||||
- Compile a new .pgf automatically when needed
|
- Compile a new .pgf automatically when needed
|
||||||
- Update buttons automatically when functions are added or removed
|
- Update buttons automatically when functions are added or removed
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ function exb_extra(g,ci) {
|
|||||||
|
|
||||||
function exblangmenu() {
|
function exblangmenu() {
|
||||||
function opt(conc) { return option(conc.langcode,conc.langcode); }
|
function opt(conc) { return option(conc.langcode,conc.langcode); }
|
||||||
// skip target language
|
function skip_target(c) { return c.langcode!=conc.langcode; }
|
||||||
var m =node("select",{},map(opt,g.concretes));
|
var m =node("select",{},map(opt,filter(skip_target,g.concretes)));
|
||||||
if(conc.example_lang) m.value=conc.example_lang;
|
if(conc.example_lang) m.value=conc.example_lang;
|
||||||
m.onchange=function() { conc.example_lang=m.value; save_grammar(g); }
|
m.onchange=function() { conc.example_lang=m.value; save_grammar(g); }
|
||||||
return m
|
return m
|
||||||
|
|||||||
Reference in New Issue
Block a user