mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-30 06:52:49 -06:00
minibar: can now switch back to the minibar after switching to the syntax editor
This is done by including a lin_action when starting the syntax editor from the minibar. Also: added some minibar options in the syntax editor for consistency...
This commit is contained in:
@@ -39,11 +39,8 @@ function Input(server,translations,opts) { // Input object constructor
|
||||
buttons.appendChild(button("Random",bind(generate_random,t),"R"));
|
||||
|
||||
var o=options;
|
||||
if(o.initial_grammar && o.initial && o.initial.from && o.initial.input){
|
||||
t.local=mi_local(o.initial_grammar)
|
||||
t.local.put("from",o.initial.from)
|
||||
t.local.put("current",o.initial)
|
||||
}
|
||||
if(o.initial_grammar && o.initial && o.initial.from && o.initial.input)
|
||||
t.set_input_for(o.initial_grammar,o.initial.from,o.initial.input)
|
||||
}
|
||||
|
||||
/* --- Input client state initialization --- */
|
||||
@@ -92,6 +89,13 @@ Input.prototype.change_language=function () {
|
||||
this.add_words(new_input)
|
||||
}
|
||||
|
||||
Input.prototype.set_input_for=function(grammar_url,from,new_input) {
|
||||
var t=this
|
||||
var local=mi_local(grammar_url)
|
||||
local.put("from",from)
|
||||
local.put("current",{from:from,input:new_input})
|
||||
}
|
||||
|
||||
Input.prototype.clear_all2=function() {
|
||||
with(this) {
|
||||
current.input=[];
|
||||
|
||||
Reference in New Issue
Block a user