summaryrefslogtreecommitdiff
path: root/src/www/gfse/editor.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-02-10 17:26:02 +0000
committerhallgren <hallgren@chalmers.se>2012-02-10 17:26:02 +0000
commit73827b9bf7ed18ed9437b1214e9a01f81e227923 (patch)
tree635923f0fb1ef4ad710e0c610a4102474bfa4b99 /src/www/gfse/editor.js
parent6b29296060a0fcbc32ddb27fe56325bccff144e0 (diff)
gfse: stay on the same page when compiling grammars
The link to the minibar (or compiler errors) are now shown below the grammar on the same page. If you go to the minibar, you only have to press the back button once to get back to the editor. Also some output formatting changes in GFServer.hs.
Diffstat (limited to 'src/www/gfse/editor.js')
-rw-r--r--src/www/gfse/editor.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js
index d2c41f30f..885a6871c 100644
--- a/src/www/gfse/editor.js
+++ b/src/www/gfse/editor.js
@@ -120,7 +120,12 @@ function open_grammar(i) {
edit_grammar(g);
}
-function close_grammar(g) { save_grammar(g); draw_grammar_list(); }
+function close_grammar(g) {
+ var o=element("compiler_output");
+ if(o) o.innerHTML="";
+ save_grammar(g);
+ draw_grammar_list();
+}
function reload_grammar(g) { save_grammar(g); edit_grammar(g); }
function save_grammar(g) {
@@ -143,8 +148,8 @@ function draw_grammar(g) {
function draw_namebar(g,files) {
return div_class("namebar",
[table([tr([td(draw_name(g)),
- td_right([draw_plainbutton(g,files),
- upload_button(g),
+ td_right([upload_button(g),
+ draw_plainbutton(g,files),
draw_closebutton(g)])])])])
}