diff options
| author | hallgren <hallgren@chalmers.se> | 2012-02-17 16:07:28 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-02-17 16:07:28 +0000 |
| commit | 21f657a64a8e286fd779a0fa4aae799342a0fcce (patch) | |
| tree | 97796ea7036afd8384fb504580732fa1e2d1c1ea /src/www/gfse/cloud2.js | |
| parent | f4466495506b32880c169f3326eacccf771527e3 (diff) | |
gfse: when uploading/compiling a grammar, automatically upload inherited grammars as well
Diffstat (limited to 'src/www/gfse/cloud2.js')
| -rw-r--r-- | src/www/gfse/cloud2.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/www/gfse/cloud2.js b/src/www/gfse/cloud2.js index e05d44bc8..8d33315bd 100644 --- a/src/www/gfse/cloud2.js +++ b/src/www/gfse/cloud2.js @@ -49,14 +49,18 @@ function old_upload(g) { } // Upload the grammar to the server and check it for errors -function upload(g,cont) { +function upload_grammars(gs,cont) { function upload2(dir) { var pre="dir="+encodeURIComponent(dir) var form= {command:"make"} - form[encodeURIComponent(g.basename+".gf")]=show_abstract(g) - for(var i in g.concretes) { - var cname=g.basename+g.concretes[i].langcode+".gf"; - form[encodeURIComponent(cname)]=show_concrete(g)(g.concretes[i]); + for(var aix in gs) { + var g=gs[aix] + form[encodeURIComponent(g.basename+".gf")]=show_abstract(g) + var cnc=g.concretes + for(var i in cnc) { + var cname=g.basename+cnc[i].langcode+".gf"; + form[encodeURIComponent(cname)]=show_concrete(g)(cnc[i]); + } } ajax_http_post("/cloud",pre+encodeArgs(form),upload3) } |
