diff --git a/src/editor/simple/Makefile b/src/editor/simple/Makefile index be40c0944..00a97b337 100644 --- a/src/editor/simple/Makefile +++ b/src/editor/simple/Makefile @@ -4,4 +4,4 @@ save: save.hs install:: @make save - rsync -avz P *.html *.css *.js ../../runtime/javascript/minibar/support.js *.cgi *.manifest save www.grammaticalframework.org:/usr/local/www/GF/demos/gfse + rsync -avz --exclude .DS_Store P *.html *.css *.js ../../runtime/javascript/minibar/support.js *.cgi *.manifest save www.grammaticalframework.org:/usr/local/www/GF/demos/gfse diff --git a/src/editor/simple/editor.css b/src/editor/simple/editor.css index ebb0a9baa..d7a415186 100644 --- a/src/editor/simple/editor.css +++ b/src/editor/simple/editor.css @@ -79,4 +79,6 @@ input.string_edit { font-family: inherit; font-size: inherit; } ul.languages { -moz-column-width: 20em; } +li { margin-top: 0.5ex; margin-bottom: 0.5ex; } + #sharing h1, #sharing .footer { display: none; } \ No newline at end of file diff --git a/src/editor/simple/editor.js b/src/editor/simple/editor.js index 90d85274b..5c08078fe 100644 --- a/src/editor/simple/editor.js +++ b/src/editor/simple/editor.js @@ -66,9 +66,9 @@ function draw_grammar_list() { } } if(local.get("count",null)==null) - editor.appendChild(text("You have not created any grammars yet.")); + home.appendChild(text("You have not created any grammars yet.")); else if(local.count==0) - editor.appendChild(text("Your grammar list is empty.")); + home.appendChild(text("Your grammar list is empty.")); home.appendChild(gs); home.appendChild( @@ -866,6 +866,7 @@ function upload(g) { function upload_json(cont) { function upload3(resptext,status) { local.put("json_uploaded",Date.now()); + //debug("Upload complete") if(cont) cont(); else { var sharing=element("sharing"); @@ -874,7 +875,10 @@ function upload_json(cont) { } function upload2(dir) { var prefix=dir.substr(10)+"-" // skip "/tmp/gfse." - var form=new FormData(); + //debug("New form data"); + //var form=new FormData(); // !!! Doesn't work on Android 2.2! + var form="",sep=""; + //debug("Preparing form data"); for(var i=0;i - + + GF online editor for simple multilingual grammars + @@ -9,7 +10,6 @@ - @@ -32,9 +32,10 @@ This page does not work without JavaScript.
HTML - Last modified: Mon Mar 28 16:45:53 CEST 2011 + Last modified: Mon Jul 25 21:01:48 CEST 2011
About +

 
 
 
diff --git a/src/editor/simple/upload.cgi b/src/editor/simple/upload.cgi
index 18d584b54..3da386dd6 100644
--- a/src/editor/simple/upload.cgi
+++ b/src/editor/simple/upload.cgi
@@ -162,11 +162,17 @@ case "$REQUEST_METHOD" in
 		     if [ -d "$path" ] ; then
 			 ContentType="text/plain; charset=$charset"
 			 cgiheaders
-			 cd "$path"
-			 shopt -s nullglob
-			 rm *.gf *.gfo *-*.json *.pgf grammars.cgi
-			 cd ..
-			 rmdir "$path"
+			 if [ -h "$path" ] ; then
+			     cd "$path"
+			     cd ..
+			     rm "$path"
+			 else
+			   cd "$path"
+			   shopt -s nullglob
+			   rm *.gf *.gfo *-*.json *.pgf grammars.cgi
+			   cd ..
+			   rmdir "$path"
+			 fi
 			 newdir=$(qparse "$QUERY_STRING" newdir)
 			 case "$newdir" in
 			     /tmp/gfse.*) # shouldn't allow .. in path !!!