From 629919667bf2d2c52c6a9a85cbc13397d38ac815 Mon Sep 17 00:00:00 2001 From: hallgren Date: Sun, 6 Mar 2011 10:19:17 +0000 Subject: [PATCH] gfse: minor layout/formatting variation --- src/editor/simple/TODO | 4 +++- src/editor/simple/editor.css | 7 +++++-- src/editor/simple/editor.js | 11 ++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/editor/simple/TODO b/src/editor/simple/TODO index 05f5160ac..f0a1dd144 100644 --- a/src/editor/simple/TODO +++ b/src/editor/simple/TODO @@ -19,6 +19,8 @@ - 5. rule-to-rule type checking and guidance (e.g. with library oper suggestions) + Try grammars in the Translation Quiz ++ Show lincat and lin before params and opers below +- Create a new concrete syntax by copying an existing one. + compile only the uploaded grammar even if other grammars are present + 'flags startcat' is needed for grammars with only one category (since the @@ -28,4 +30,4 @@ the old fun, the corresponding lin will have the wrong lhs. + Bug! The startcat menu shows the first category by default, but the startcat - flag is actually not set until a selection is made from the menu. \ No newline at end of file + flag is actually not set until a selection is made from the menu. diff --git a/src/editor/simple/editor.css b/src/editor/simple/editor.css index 56cfd5adb..a1f48d32c 100644 --- a/src/editor/simple/editor.css +++ b/src/editor/simple/editor.css @@ -27,9 +27,10 @@ td.right { text-align: right; } div.indent { padding-left: 1em; min-width: 1em; min-height: 1em; } +/* div.fun, div.param, div.lincat, div.oper, div.lin { padding-left: 2em; text-indent: -2em; } - +*/ .more, .delete { font-weight: bold; font-family: sans-serif; } .more, .delete, .edit { cursor: pointer; } @@ -71,4 +72,6 @@ table.tabs input[type=button] { font-size: inherit; font-weight: bold; /*text-decoration: underline;*/ -} \ No newline at end of file +} + +input.string_edit { font-family: inherit; font-size: inherit; } \ No newline at end of file diff --git a/src/editor/simple/editor.js b/src/editor/simple/editor.js index fe2c5f0b2..7154a6261 100644 --- a/src/editor/simple/editor.js +++ b/src/editor/simple/editor.js @@ -417,10 +417,10 @@ function draw_concrete(g,i) { [kw("concrete "),ident(g.basename+conc.langcode), kw(" of "),ident(g.basename),sep(" = "), indent([extensible([kw("open "),draw_opens(g,i)])]), - indent([extensible([kw("param"),draw_params(g,i)])]), indent([kw("lincat"),draw_lincats(g,i)]), - indent([extensible([kw("oper"),draw_opers(g,i)])]), - indent([kw("lin"),draw_lins(g,i)]) + indent([kw("lin"),draw_lins(g,i)]), + indent([extensible([kw("param"),draw_params(g,i)])]), + indent([extensible([kw("oper"),draw_opers(g,i)])]) ]) } @@ -809,12 +809,13 @@ function string_editor(el,init,ok) { function start(msg) { el.style.display="none"; m.innerHTML=msg; - p.insertBefore(e,el); + insertAfter(e,el); e.it.focus(); } var m=empty_class("span","error_message"); - var i=node("input",{name:"it",value:init},[]); + var i=node("input",{"class":"string_edit",name:"it",value:init},[]); if(init.length>10) i.size=init.length+5; +// var i=node("textarea",{name:"it",rows:"2",cols:"60"},[text(init)]); var e=node("form",{}, [i, node("input",{type:"submit",value:"OK"},[]),