forked from GitHub/gf-core
the user can now upload their own grammars in the editor
This commit is contained in:
@@ -52,22 +52,30 @@ cgiMain' cache path =
|
|||||||
case mb_command of
|
case mb_command of
|
||||||
Just "update_grammar"
|
Just "update_grammar"
|
||||||
-> do mb_pgf <- getFile
|
-> do mb_pgf <- getFile
|
||||||
id <- getGrammarId
|
id <- getGrammarId
|
||||||
name <- getFileName
|
name <- getFileName
|
||||||
descr <- getDescription
|
descr <- getDescription
|
||||||
doUpdateGrammar c mb_pgf id name descr
|
userId <- getUserId
|
||||||
|
doUpdateGrammar c mb_pgf id name descr userId
|
||||||
Just "delete_grammar"
|
Just "delete_grammar"
|
||||||
-> do id <- getGrammarId
|
-> do id <- getGrammarId
|
||||||
doDeleteGrammar c id
|
userId <- getUserId
|
||||||
|
doDeleteGrammar c id userId
|
||||||
Just "grammars"
|
Just "grammars"
|
||||||
-> doGrammars c
|
-> do userId <- getUserId
|
||||||
|
doGrammars c userId
|
||||||
Just "save" -> doSave c =<< getId
|
Just "save" -> doSave c =<< getId
|
||||||
Just "load" -> doLoad c =<< getId
|
Just "load" -> doLoad c =<< getId
|
||||||
Just "search" -> doSearch c =<< getQuery
|
Just "search" -> doSearch c =<< getQuery
|
||||||
Just "delete" -> doDelete c =<< getIds
|
Just "delete" -> doDelete c =<< getIds
|
||||||
Just cmd -> throwCGIError 400 "Unknown command" ["Unknown command: " ++ show cmd]
|
Just cmd -> throwCGIError 400 "Unknown command" ["Unknown command: " ++ show cmd]
|
||||||
Nothing -> throwCGIError 400 "No command given" ["No command given"]
|
Nothing -> do mb_uri <- getIdentity
|
||||||
|
mb_email <- getEMail
|
||||||
|
doLogin c mb_uri mb_email
|
||||||
where
|
where
|
||||||
|
getUserId :: CGI (Maybe String)
|
||||||
|
getUserId = getInput "userId"
|
||||||
|
|
||||||
getId :: CGI (Maybe Int)
|
getId :: CGI (Maybe Int)
|
||||||
getId = readInput "id"
|
getId = readInput "id"
|
||||||
|
|
||||||
@@ -80,7 +88,7 @@ cgiMain' cache path =
|
|||||||
getGrammarId :: CGI String
|
getGrammarId :: CGI String
|
||||||
getGrammarId = do
|
getGrammarId = do
|
||||||
mb_url <- getInput "url"
|
mb_url <- getInput "url"
|
||||||
return (maybe "null" (reverse . drop 4 . reverse) mb_url)
|
return (maybe "null" (reverse . takeWhile (/='/') . drop 4 . reverse) mb_url)
|
||||||
|
|
||||||
getFile :: CGI (Maybe BS.ByteString)
|
getFile :: CGI (Maybe BS.ByteString)
|
||||||
getFile = do
|
getFile = do
|
||||||
@@ -97,27 +105,49 @@ cgiMain' cache path =
|
|||||||
getDescription :: CGI String
|
getDescription :: CGI String
|
||||||
getDescription = fmap (fromMaybe "") (getInput "description")
|
getDescription = fmap (fromMaybe "") (getInput "description")
|
||||||
|
|
||||||
doGrammars c = do
|
getIdentity :: CGI (Maybe String)
|
||||||
|
getIdentity = getInput "openid.identity"
|
||||||
|
|
||||||
|
getEMail :: CGI (Maybe String)
|
||||||
|
getEMail = getInput "openid.ext1.value.email"
|
||||||
|
|
||||||
|
|
||||||
|
doLogin c mb_uri mb_email = do
|
||||||
|
path <- scriptName
|
||||||
r <- liftIO $ handleSql (return . Left) $ do
|
r <- liftIO $ handleSql (return . Left) $ do
|
||||||
s <- query c "call getGrammars()"
|
s <- query c ("call getUserId("++toSqlValue mb_uri++","++toSqlValue mb_email++")")
|
||||||
rows <- collectRows getGrammar s
|
[id] <- collectRows getUserId s
|
||||||
|
return (Right id)
|
||||||
|
case r of
|
||||||
|
Right mb_id -> outputHTML (startupHTML mb_id mb_uri mb_email (Just path))
|
||||||
|
Left e -> throwCGIError 400 "Login failed" (lines (show e))
|
||||||
|
where
|
||||||
|
getUserId s = do
|
||||||
|
id <- getFieldValueMB s "userId"
|
||||||
|
return (id :: Maybe Int)
|
||||||
|
|
||||||
|
doGrammars c mb_userId = do
|
||||||
|
path <- scriptName
|
||||||
|
r <- liftIO $ handleSql (return . Left) $ do
|
||||||
|
s <- query c ("call getGrammars("++toSqlValue mb_userId++")")
|
||||||
|
rows <- collectRows (getGrammar path) s
|
||||||
return (Right rows)
|
return (Right rows)
|
||||||
case r of
|
case r of
|
||||||
Right rows -> outputJSONP rows
|
Right rows -> outputJSONP rows
|
||||||
Left e -> throwCGIError 400 "Loading failed" (lines (show e))
|
Left e -> throwCGIError 400 "Loading failed" (lines (show e))
|
||||||
where
|
where
|
||||||
getGrammar s = do
|
getGrammar path s = do
|
||||||
id <- getFieldValue s "id"
|
id <- getFieldValue s "id"
|
||||||
name <- getFieldValue s "name"
|
name <- getFieldValue s "name"
|
||||||
description <- getFieldValue s "description"
|
description <- getFieldValue s "description"
|
||||||
return $ toJSObject [ ("url", showJSON (addExtension (show (id :: Int)) "pgf"))
|
return $ toJSObject [ ("url", showJSON (dropExtension path ++ '/':addExtension (show (id :: Int)) "pgf"))
|
||||||
, ("name", showJSON (name :: String))
|
, ("name", showJSON (name :: String))
|
||||||
, ("description", showJSON (description :: String))
|
, ("description", showJSON (description :: String))
|
||||||
]
|
]
|
||||||
|
|
||||||
doUpdateGrammar c mb_pgf id name descr = do
|
doUpdateGrammar c mb_pgf id name descr mb_userId = do
|
||||||
r <- liftIO $ handleSql (return . Left) $ do
|
r <- liftIO $ handleSql (return . Left) $ do
|
||||||
s <- query c ("call updateGrammar("++id++","++toSqlValue name++","++toSqlValue descr++")")
|
s <- query c ("call updateGrammar("++id++","++toSqlValue name++","++toSqlValue descr++","++toSqlValue mb_userId++")")
|
||||||
[id] <- collectRows (\s -> getFieldValue s "id") s
|
[id] <- collectRows (\s -> getFieldValue s "id") s
|
||||||
return (Right id)
|
return (Right id)
|
||||||
nid <- case r of
|
nid <- case r of
|
||||||
@@ -133,9 +163,9 @@ doUpdateGrammar c mb_pgf id name descr = do
|
|||||||
Nothing -> return ()
|
Nothing -> return ()
|
||||||
outputHTML ""
|
outputHTML ""
|
||||||
|
|
||||||
doDeleteGrammar c id = do
|
doDeleteGrammar c id mb_userId = do
|
||||||
r <- liftIO $ handleSql (return . Left) $ do
|
r <- liftIO $ handleSql (return . Left) $ do
|
||||||
execute c ("call deleteGrammar("++id++")")
|
execute c ("call deleteGrammar("++id++","++toSqlValue mb_userId++")")
|
||||||
return (Right "")
|
return (Right "")
|
||||||
case r of
|
case r of
|
||||||
Right x -> outputJSONP ([] :: [(String,String)])
|
Right x -> outputJSONP ([] :: [(String,String)])
|
||||||
@@ -213,22 +243,56 @@ dbConnect fpath = do
|
|||||||
[host,db,user,pwd] <- fmap words $ readFile fpath
|
[host,db,user,pwd] <- fmap words $ readFile fpath
|
||||||
connect host db user pwd
|
connect host db user pwd
|
||||||
|
|
||||||
|
startupHTML mb_id mb_uri mb_email mb_path = unlines [
|
||||||
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">",
|
||||||
|
"<html>",
|
||||||
|
" <head>",
|
||||||
|
" <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">",
|
||||||
|
" <title>Editor</title>",
|
||||||
|
" <script type=\"text/javascript\" language=\"javascript\" src=\"org.grammaticalframework.ui.gwt.EditorApp/org.grammaticalframework.ui.gwt.EditorApp.nocache.js\"></script>",
|
||||||
|
" </head>",
|
||||||
|
" <body onload=\"window.__gfInit = new Object(); "++
|
||||||
|
maybe "" (\id -> "window.__gfInit.userId = "++show id++"; ") mb_id++
|
||||||
|
maybe "" (\uri -> "window.__gfInit.userURI = '"++uri++"'; ") mb_uri++
|
||||||
|
maybe "" (\email -> "window.__gfInit.userEMail = '"++email++"'; ") mb_email++
|
||||||
|
maybe "" (\path -> "window.__gfInit.contentURL = '"++path++"'; ") mb_path++
|
||||||
|
"\">",
|
||||||
|
" <iframe src=\"javascript:''\" id=\"__gwt_historyFrame\" tabIndex='-1' style=\"position:absolute;width:0;height:0;border:0\"></iframe>",
|
||||||
|
" </body>",
|
||||||
|
"</html>"]
|
||||||
|
|
||||||
dbInit c =
|
dbInit c =
|
||||||
handleSql (fail . show) $ do
|
handleSql (fail . show) $ do
|
||||||
inTransaction c $ \c -> do
|
inTransaction c $ \c -> do
|
||||||
execute c "DROP TABLE IF EXISTS Documents"
|
execute c "DROP TABLE IF EXISTS GrammarUsers"
|
||||||
execute c ("CREATE TABLE Documents(id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,"++
|
execute c "DROP TABLE IF EXISTS Users"
|
||||||
" title VARCHAR(256) NOT NULL,\n"++
|
|
||||||
" created TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
|
||||||
" modified TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
|
||||||
" content TEXT NOT NULL,\n"++
|
|
||||||
" FULLTEXT INDEX (content)) TYPE=MyISAM")
|
|
||||||
execute c "DROP TABLE IF EXISTS Grammars"
|
execute c "DROP TABLE IF EXISTS Grammars"
|
||||||
execute c ("CREATE TABLE Grammars(id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,"++
|
execute c "DROP TABLE IF EXISTS Documents"
|
||||||
" name VARCHAR(64) NOT NULL,\n"++
|
execute c ("CREATE TABLE Users"++
|
||||||
" description VARCHAR(512) NOT NULL,\n"++
|
" (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,\n"++
|
||||||
" created TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
" identity VARCHAR(256) NOT NULL,\n"++
|
||||||
" modified TIMESTAMP NOT NULL DEFAULT 0)")
|
" email VARCHAR(128) NOT NULL,\n"++
|
||||||
|
" UNIQUE INDEX (identity))")
|
||||||
|
execute c ("CREATE TABLE Grammars"++
|
||||||
|
" (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,"++
|
||||||
|
" name VARCHAR(64) NOT NULL,\n"++
|
||||||
|
" description VARCHAR(512) NOT NULL,\n"++
|
||||||
|
" created TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
||||||
|
" modified TIMESTAMP NOT NULL DEFAULT 0)")
|
||||||
|
execute c ("CREATE TABLE Documents"++
|
||||||
|
" (id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,"++
|
||||||
|
" title VARCHAR(256) NOT NULL,\n"++
|
||||||
|
" created TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
||||||
|
" modified TIMESTAMP NOT NULL DEFAULT 0,\n"++
|
||||||
|
" content TEXT NOT NULL,\n"++
|
||||||
|
" FULLTEXT INDEX (content)) TYPE=MyISAM")
|
||||||
|
execute c ("CREATE TABLE GrammarUsers"++
|
||||||
|
" (userId INTEGER NOT NULL,\n"++
|
||||||
|
" grammarId INTEGER NOT NULL,\n"++
|
||||||
|
" flags INTEGER NOT NULL,\n"++
|
||||||
|
" PRIMARY KEY (userId, grammarId),\n"++
|
||||||
|
" FOREIGN KEY (userId) REFERENCES Users(id) ON DELETE CASCADE,\n"++
|
||||||
|
" FOREIGN KEY (grammarId) REFERENCES Grammars(id) ON DELETE RESTRICT)")
|
||||||
execute c "DROP PROCEDURE IF EXISTS saveDocument"
|
execute c "DROP PROCEDURE IF EXISTS saveDocument"
|
||||||
execute c ("CREATE PROCEDURE saveDocument(IN id INTEGER, content TEXT)\n"++
|
execute c ("CREATE PROCEDURE saveDocument(IN id INTEGER, content TEXT)\n"++
|
||||||
"BEGIN\n"++
|
"BEGIN\n"++
|
||||||
@@ -241,23 +305,51 @@ dbInit c =
|
|||||||
" END IF;\n"++
|
" END IF;\n"++
|
||||||
"END")
|
"END")
|
||||||
execute c "DROP PROCEDURE IF EXISTS updateGrammar"
|
execute c "DROP PROCEDURE IF EXISTS updateGrammar"
|
||||||
execute c ("CREATE PROCEDURE updateGrammar(IN id INTEGER, name VARCHAR(64), description VARCHAR(512))\n"++
|
execute c ("CREATE PROCEDURE updateGrammar(IN id INTEGER, name VARCHAR(64), description VARCHAR(512), userId INTEGER)\n"++
|
||||||
"BEGIN\n"++
|
"BEGIN\n"++
|
||||||
" IF id IS NULL THEN\n"++
|
" IF id IS NULL THEN\n"++
|
||||||
" INSERT INTO Grammars(name,description,created,modified) VALUES (name,description,NOW(),NOW());\n"++
|
" INSERT INTO Grammars(name,description,created,modified) VALUES (name,description,NOW(),NOW());\n"++
|
||||||
" SELECT LAST_INSERT_ID() as id;\n"++
|
" SET id = LAST_INSERT_ID();\n"++
|
||||||
|
" INSERT INTO GrammarUsers(grammarId,userId,flags) VALUES (id,userId,0);\n"++
|
||||||
" ELSE\n"++
|
" ELSE\n"++
|
||||||
" UPDATE Grammars gr SET name = name, description=description, modified=NOW() WHERE gr.id = id;\n"++
|
" UPDATE Grammars gr SET name = name, description=description, modified=NOW() WHERE gr.id = id;\n"++
|
||||||
" select id;\n"++
|
|
||||||
" END IF;\n"++
|
" END IF;\n"++
|
||||||
|
" SELECT id;\n"++
|
||||||
"END")
|
"END")
|
||||||
execute c "DROP PROCEDURE IF EXISTS deleteGrammar"
|
execute c "DROP PROCEDURE IF EXISTS deleteGrammar"
|
||||||
execute c ("CREATE PROCEDURE deleteGrammar(IN grammarId INTEGER)\n"++
|
execute c ("CREATE PROCEDURE deleteGrammar(IN aGrammarId INTEGER, aUserId INTEGER)\n"++
|
||||||
"BEGIN\n"++
|
"BEGIN\n"++
|
||||||
" DELETE FROM Grammars WHERE id = grammarId;\n"++
|
" DECLARE deleted INTEGER;\n"++
|
||||||
|
" DELETE FROM GrammarUsers\n"++
|
||||||
|
" WHERE grammarId = aGrammarId AND userId = aUserId;\n"++
|
||||||
|
" IF NOT EXISTS(SELECT * FROM GrammarUsers gu WHERE gu.grammarId = aGrammarId) THEN\n"++
|
||||||
|
" DELETE FROM Grammars WHERE id = aGrammarId;\n"++
|
||||||
|
" SET deleted = 1;\n"++
|
||||||
|
" ELSE\n"++
|
||||||
|
" SET deleted = 0;\n"++
|
||||||
|
" END IF;\n"++
|
||||||
|
" SELECT deleted;\n"++
|
||||||
"END")
|
"END")
|
||||||
execute c "DROP PROCEDURE IF EXISTS getGrammars"
|
execute c "DROP PROCEDURE IF EXISTS getGrammars"
|
||||||
execute c ("CREATE PROCEDURE getGrammars()\n"++
|
execute c ("CREATE PROCEDURE getGrammars(IN userId INTEGER)\n"++
|
||||||
"BEGIN\n"++
|
"BEGIN\n"++
|
||||||
" SELECT id,name,description FROM Grammars ORDER BY name;\n"++
|
" SELECT g.id,g.name,g.description\n"++
|
||||||
|
" FROM Grammars g JOIN GrammarUsers gu ON g.id = gu.grammarId\n"++
|
||||||
|
" WHERE gu.userId = userId\n"++
|
||||||
|
" ORDER BY g.name;\n"++
|
||||||
|
"END")
|
||||||
|
execute c "DROP PROCEDURE IF EXISTS getUserId"
|
||||||
|
execute c ("CREATE PROCEDURE getUserId(identity VARCHAR(256), email VARCHAR(128))\n"++
|
||||||
|
"BEGIN\n"++
|
||||||
|
" DECLARE userId INTEGER;\n"++
|
||||||
|
" IF identity IS NULL OR email IS NULL THEN\n"++
|
||||||
|
" SET userId = NULL;\n"++
|
||||||
|
" ELSE\n"++
|
||||||
|
" SELECT id INTO userId FROM Users u WHERE u.identity = identity;\n"++
|
||||||
|
" IF userId IS NULL THEN\n"++
|
||||||
|
" INSERT INTO Users(identity, email) VALUES (identity, email);\n"++
|
||||||
|
" SET userId = LAST_INSERT_ID();\n"++
|
||||||
|
" END IF;\n"++
|
||||||
|
" END IF;\n"++
|
||||||
|
" SELECT userId;\n"++
|
||||||
"END")
|
"END")
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ cgiMain' cache path =
|
|||||||
pgfMain pgf command
|
pgfMain pgf command
|
||||||
|
|
||||||
pgfMain :: PGF -> String -> CGI CGIResult
|
pgfMain :: PGF -> String -> CGI CGIResult
|
||||||
pgfMain pgf command =
|
pgfMain pgf command = do
|
||||||
case command of
|
case command of
|
||||||
"parse" -> outputJSONP =<< doParse pgf `fmap` getText `ap` getCat `ap` getFrom
|
"parse" -> outputJSONP =<< doParse pgf `fmap` getText `ap` getCat `ap` getFrom
|
||||||
"complete" -> outputJSONP =<< doComplete pgf `fmap` getText `ap` getCat `ap` getFrom `ap` getLimit
|
"complete" -> outputJSONP =<< doComplete pgf `fmap` getText `ap` getCat `ap` getFrom `ap` getLimit
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Control.Concurrent(forkIO)
|
|||||||
import Network.FastCGI(runFastCGI,runFastCGIConcurrent')
|
import Network.FastCGI(runFastCGI,runFastCGIConcurrent')
|
||||||
|
|
||||||
import PGFService(cgiMain,newPGFCache,stderrToFile,logFile)
|
import PGFService(cgiMain,newPGFCache,stderrToFile,logFile)
|
||||||
|
import System.IO
|
||||||
main = do stderrToFile logFile
|
main = do stderrToFile logFile
|
||||||
fcgiMain =<< newPGFCache
|
fcgiMain =<< newPGFCache
|
||||||
|
|
||||||
|
|||||||
@@ -6,29 +6,37 @@ import java.util.*;
|
|||||||
import com.google.gwt.core.client.*;
|
import com.google.gwt.core.client.*;
|
||||||
|
|
||||||
public class ContentService {
|
public class ContentService {
|
||||||
String contentBaseURL;
|
|
||||||
|
|
||||||
// Event listeners
|
// Event listeners
|
||||||
private List<SettingsListener> listeners = new LinkedList<SettingsListener>();
|
private List<SettingsListener> listeners = new LinkedList<SettingsListener>();
|
||||||
private List<GrammarInfo> grammars = null;
|
private List<GrammarInfo> grammars = null;
|
||||||
|
|
||||||
|
|
||||||
public ContentService(String contentBaseURL) {
|
public ContentService() {
|
||||||
this.contentBaseURL = contentBaseURL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBaseURL() {
|
public static class Init extends JavaScriptObject {
|
||||||
return contentBaseURL;
|
protected Init() { }
|
||||||
|
|
||||||
|
public final native String getUserId() /*-{ return this.userId; }-*/;
|
||||||
|
public final native String getUserURL() /*-{ return this.userURL; }-*/;
|
||||||
|
public final native String getUserEMail() /*-{ return this.userEMail; }-*/;
|
||||||
|
public final native String getContentURL() /*-{ return this.contentURL; }-*/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final native Init getInit() /*-{
|
||||||
|
return $wnd.__gfInit;
|
||||||
|
}-*/;
|
||||||
|
|
||||||
public void addSettingsListener(SettingsListener listener) {
|
public void addSettingsListener(SettingsListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAvailableGrammars() {
|
public void updateAvailableGrammars() {
|
||||||
List<Arg> args = new ArrayList<Arg>();
|
List<Arg> args = new ArrayList<Arg>();
|
||||||
|
args.add(new Arg("userId", getInit().getUserId()));
|
||||||
args.add(new Arg("command", "grammars"));
|
args.add(new Arg("command", "grammars"));
|
||||||
JSONRequestBuilder.sendRequest(contentBaseURL, args, new GrammarsCallback() {
|
JSONRequestBuilder.sendRequest(getInit().getContentURL(), args, new GrammarsCallback() {
|
||||||
public void onResult(IterableJsArray<ContentService.GrammarInfo> grammars_) {
|
public void onResult(IterableJsArray<ContentService.GrammarInfo> grammars_) {
|
||||||
grammars = new ArrayList<GrammarInfo>();
|
grammars = new ArrayList<GrammarInfo>();
|
||||||
for (ContentService.GrammarInfo grammar : grammars_.iterable()) {
|
for (ContentService.GrammarInfo grammar : grammars_.iterable()) {
|
||||||
@@ -62,8 +70,9 @@ public class ContentService {
|
|||||||
public JSONRequest deleteGrammar(String grammarURL, DeleteCallback callback) {
|
public JSONRequest deleteGrammar(String grammarURL, DeleteCallback callback) {
|
||||||
List<Arg> args = new ArrayList<Arg>();
|
List<Arg> args = new ArrayList<Arg>();
|
||||||
args.add(new Arg("url", grammarURL));
|
args.add(new Arg("url", grammarURL));
|
||||||
|
args.add(new Arg("userId", getInit().getUserId()));
|
||||||
args.add(new Arg("command", "delete_grammar"));
|
args.add(new Arg("command", "delete_grammar"));
|
||||||
return JSONRequestBuilder.sendRequest(contentBaseURL, args, callback);
|
return JSONRequestBuilder.sendRequest(getInit().getContentURL(), args, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JSONRequest save(Object id, String content, SaveCallback callback) {
|
public JSONRequest save(Object id, String content, SaveCallback callback) {
|
||||||
@@ -71,7 +80,7 @@ public class ContentService {
|
|||||||
if (id != null)
|
if (id != null)
|
||||||
args.add(new Arg("id", id.toString()));
|
args.add(new Arg("id", id.toString()));
|
||||||
args.add(new Arg("command", "save"));
|
args.add(new Arg("command", "save"));
|
||||||
return JSONRequestBuilder.sendDataRequest(contentBaseURL, args, content, callback);
|
return JSONRequestBuilder.sendDataRequest(getInit().getContentURL(), args, content, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface SaveCallback extends JSONCallback<DocumentSignature> {}
|
public interface SaveCallback extends JSONCallback<DocumentSignature> {}
|
||||||
@@ -80,7 +89,7 @@ public class ContentService {
|
|||||||
List<Arg> args = new ArrayList<Arg>();
|
List<Arg> args = new ArrayList<Arg>();
|
||||||
args.add(new Arg("command", "load"));
|
args.add(new Arg("command", "load"));
|
||||||
args.add(new Arg("id", id.toString()));
|
args.add(new Arg("id", id.toString()));
|
||||||
return JSONRequestBuilder.sendRequest(contentBaseURL, args, callback);
|
return JSONRequestBuilder.sendRequest(getInit().getContentURL(), args, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface LoadCallback extends JSONCallback<Document> {}
|
public interface LoadCallback extends JSONCallback<Document> {}
|
||||||
@@ -89,7 +98,7 @@ public class ContentService {
|
|||||||
List<Arg> args = new ArrayList<Arg>();
|
List<Arg> args = new ArrayList<Arg>();
|
||||||
args.add(new Arg("command", "search"));
|
args.add(new Arg("command", "search"));
|
||||||
args.add(new Arg("query", fullTextQuery));
|
args.add(new Arg("query", fullTextQuery));
|
||||||
return JSONRequestBuilder.sendRequest(contentBaseURL, args, callback);
|
return JSONRequestBuilder.sendRequest(getInit().getContentURL(), args, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface SearchCallback extends JSONCallback<IterableJsArray<DocumentSignature>> {}
|
public interface SearchCallback extends JSONCallback<IterableJsArray<DocumentSignature>> {}
|
||||||
@@ -115,7 +124,7 @@ public class ContentService {
|
|||||||
for (Object id : ids) {
|
for (Object id : ids) {
|
||||||
args.add(new Arg("id", id.toString()));
|
args.add(new Arg("id", id.toString()));
|
||||||
}
|
}
|
||||||
return JSONRequestBuilder.sendRequest(contentBaseURL, args, callback);
|
return JSONRequestBuilder.sendRequest(getInit().getContentURL(), args, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface DeleteCallback extends JSONCallback<DeleteResult> {}
|
public interface DeleteCallback extends JSONCallback<DeleteResult> {}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ import com.google.gwt.event.shared.*;
|
|||||||
|
|
||||||
public class EditorApp implements EntryPoint {
|
public class EditorApp implements EntryPoint {
|
||||||
|
|
||||||
protected static final String pgfBaseURL = "/grammars";
|
|
||||||
protected static final String contentBaseURL = "/grammars.content";
|
|
||||||
|
|
||||||
protected ContentService contentService;
|
protected ContentService contentService;
|
||||||
protected PGFWrapper pgf;
|
protected PGFWrapper pgf;
|
||||||
|
|
||||||
@@ -420,10 +417,10 @@ public class EditorApp implements EntryPoint {
|
|||||||
protected class MySettingsListener implements SettingsListener {
|
protected class MySettingsListener implements SettingsListener {
|
||||||
// Will only happen on load
|
// Will only happen on load
|
||||||
public void onAvailableGrammarsChanged() {
|
public void onAvailableGrammarsChanged() {
|
||||||
if (pgf.getPGFName() == null) {
|
if (pgf.getGrammarURL() == null) {
|
||||||
List<String> grammars = pgf.getGrammars();
|
List<String> grammars = pgf.getGrammars();
|
||||||
if (!grammars.isEmpty()) {
|
if (!grammars.isEmpty()) {
|
||||||
pgf.setPGFName(grammars.get(0));
|
pgf.setGrammarURL(grammars.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -452,8 +449,8 @@ public class EditorApp implements EntryPoint {
|
|||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
statusPopup = new StatusPopup();
|
statusPopup = new StatusPopup();
|
||||||
|
|
||||||
pgf = new PGFWrapper(pgfBaseURL);
|
pgf = new PGFWrapper();
|
||||||
contentService = new ContentService(contentBaseURL);
|
contentService = new ContentService();
|
||||||
RootPanel.get().add(createUI());
|
RootPanel.get().add(createUI());
|
||||||
pgf.addSettingsListener(new MySettingsListener());
|
pgf.addSettingsListener(new MySettingsListener());
|
||||||
contentService.updateAvailableGrammars();
|
contentService.updateAvailableGrammars();
|
||||||
|
|||||||
@@ -272,16 +272,16 @@ public class FridgeApp implements EntryPoint {
|
|||||||
|
|
||||||
protected void updateSettingsFromHistoryToken(String[] tokenParts) {
|
protected void updateSettingsFromHistoryToken(String[] tokenParts) {
|
||||||
if (tokenParts.length >= 1 && tokenParts[0].length() > 0) {
|
if (tokenParts.length >= 1 && tokenParts[0].length() > 0) {
|
||||||
setPGFName(tokenParts[0]);
|
setGrammarURL(tokenParts[0]);
|
||||||
}
|
}
|
||||||
if (tokenParts.length >= 2 && tokenParts[1].length() > 0) {
|
if (tokenParts.length >= 2 && tokenParts[1].length() > 0) {
|
||||||
setInputLanguage(tokenParts[1]);
|
setInputLanguage(tokenParts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPGFName (String pgfName) {
|
protected void setGrammarURL(String url) {
|
||||||
if (pgfName != null && !pgfName.equals(pgf.getPGFName())) {
|
if (url != null && !url.equals(pgf.getGrammarURL())) {
|
||||||
pgf.setPGFName(pgfName);
|
pgf.setGrammarURL(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,12 +298,12 @@ public class FridgeApp implements EntryPoint {
|
|||||||
protected class MySettingsListener implements SettingsListener {
|
protected class MySettingsListener implements SettingsListener {
|
||||||
// Will only happen on load
|
// Will only happen on load
|
||||||
public void onAvailableGrammarsChanged() {
|
public void onAvailableGrammarsChanged() {
|
||||||
if (pgf.getPGFName() == null) {
|
if (pgf.getGrammarURL() == null) {
|
||||||
List<String> grammars = pgf.getGrammars();
|
List<String> grammars = pgf.getGrammars();
|
||||||
if (!grammars.isEmpty()) {
|
if (!grammars.isEmpty()) {
|
||||||
pgf.setPGFName(grammars.get(0));
|
pgf.setGrammarURL(grammars.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void onSelectedGrammarChanged() {
|
public void onSelectedGrammarChanged() {
|
||||||
if (pgf.getInputLanguage() == null) {
|
if (pgf.getInputLanguage() == null) {
|
||||||
@@ -327,7 +327,7 @@ public class FridgeApp implements EntryPoint {
|
|||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
statusPopup = new StatusPopup();
|
statusPopup = new StatusPopup();
|
||||||
|
|
||||||
pgf = new PGFWrapper(pgfBaseURL);
|
pgf = new PGFWrapper();
|
||||||
RootPanel.get().add(createUI());
|
RootPanel.get().add(createUI());
|
||||||
pgf.addSettingsListener(new MySettingsListener());
|
pgf.addSettingsListener(new MySettingsListener());
|
||||||
History.addHistoryListener(new MyHistoryListener());
|
History.addHistoryListener(new MyHistoryListener());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class GrammarsPanel extends Composite {
|
|||||||
form.setWidth("100%");
|
form.setWidth("100%");
|
||||||
form.setEncoding(FormPanel.ENCODING_MULTIPART);
|
form.setEncoding(FormPanel.ENCODING_MULTIPART);
|
||||||
form.setMethod(FormPanel.METHOD_POST);
|
form.setMethod(FormPanel.METHOD_POST);
|
||||||
form.setAction(contentService.getBaseURL());
|
form.setAction(ContentService.getInit().getContentURL());
|
||||||
form.addSubmitHandler(uploadFormHandler);
|
form.addSubmitHandler(uploadFormHandler);
|
||||||
form.addSubmitCompleteHandler(uploadFormHandler);
|
form.addSubmitCompleteHandler(uploadFormHandler);
|
||||||
|
|
||||||
@@ -120,7 +120,8 @@ public class GrammarsPanel extends Composite {
|
|||||||
vPanel.setWidth("100%");
|
vPanel.setWidth("100%");
|
||||||
form.add(vPanel);
|
form.add(vPanel);
|
||||||
|
|
||||||
vPanel.add(new HTML("<input type=\"hidden\" name=\"command\" value=\"update_grammar\"/>"));
|
vPanel.add(new HTML("<input type=\"hidden\" name=\"userId\" value=\""+ContentService.getInit().getUserId()+"\"/>\n"+
|
||||||
|
"<input type=\"hidden\" name=\"command\" value=\"update_grammar\"/>"));
|
||||||
|
|
||||||
HorizontalPanel hPanel = new HorizontalPanel();
|
HorizontalPanel hPanel = new HorizontalPanel();
|
||||||
hPanel.setSpacing(8);
|
hPanel.setSpacing(8);
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ import com.google.gwt.core.client.*;
|
|||||||
|
|
||||||
public class PGFWrapper {
|
public class PGFWrapper {
|
||||||
|
|
||||||
private String baseURL;
|
private String grammarURL = null;
|
||||||
|
|
||||||
private String grammarURL;
|
|
||||||
|
|
||||||
private String pgfName = null;
|
|
||||||
|
|
||||||
private PGF pgf;
|
private PGF pgf;
|
||||||
|
|
||||||
@@ -44,17 +40,11 @@ public class PGFWrapper {
|
|||||||
|
|
||||||
|
|
||||||
public PGFWrapper() {
|
public PGFWrapper() {
|
||||||
this.baseURL = null;
|
|
||||||
this.pgf = new PGF();
|
|
||||||
}
|
|
||||||
|
|
||||||
public PGFWrapper(String baseURL) {
|
|
||||||
this.baseURL = baseURL;
|
|
||||||
this.pgf = new PGF();
|
this.pgf = new PGF();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAvailableGrammars() {
|
public void updateAvailableGrammars() {
|
||||||
String url = baseURL+"/grammars.xml";
|
String url = "/grammars.xml";
|
||||||
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url));
|
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -172,26 +162,12 @@ public class PGFWrapper {
|
|||||||
//
|
//
|
||||||
// Settings
|
// Settings
|
||||||
//
|
//
|
||||||
|
|
||||||
public String getPGFName() {
|
|
||||||
return pgfName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPGFName(String pgfName) {
|
|
||||||
this.pgfName = pgfName;
|
|
||||||
this.grammarURL = (pgfName == null) ? null : baseURL + "/" + pgfName;
|
|
||||||
this.inputLanguage = null;
|
|
||||||
this.outputLanguage = null;
|
|
||||||
this.cat = null;
|
|
||||||
updateSelectedGrammar();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGrammarURL() {
|
public String getGrammarURL() {
|
||||||
return grammarURL;
|
return grammarURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGrammarURL(String grammarURL) {
|
public void setGrammarURL(String grammarURL) {
|
||||||
this.pgfName = null;
|
|
||||||
this.grammarURL = grammarURL;
|
this.grammarURL = grammarURL;
|
||||||
this.inputLanguage = null;
|
this.inputLanguage = null;
|
||||||
this.outputLanguage = null;
|
this.outputLanguage = null;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class SettingsPanel extends Composite {
|
|||||||
grammarBox = new MyListBox();
|
grammarBox = new MyListBox();
|
||||||
grammarBox.addChangeListener(new ChangeListener() {
|
grammarBox.addChangeListener(new ChangeListener() {
|
||||||
public void onChange(Widget sender) {
|
public void onChange(Widget sender) {
|
||||||
SettingsPanel.this.pgf.setPGFName(grammarBox.getSelectedValue());
|
SettingsPanel.this.pgf.setGrammarURL(grammarBox.getSelectedValue());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
settingsPanel.add(new FormWidget("Grammar:", grammarBox));
|
settingsPanel.add(new FormWidget("Grammar:", grammarBox));
|
||||||
@@ -45,6 +45,28 @@ public class SettingsPanel extends Composite {
|
|||||||
});
|
});
|
||||||
settingsPanel.add(new FormWidget("To:", toLangBox));
|
settingsPanel.add(new FormWidget("To:", toLangBox));
|
||||||
|
|
||||||
|
if (contentService.getInit().getUserEMail() != null) {
|
||||||
|
String url = contentService.getInit().getContentURL();
|
||||||
|
settingsPanel.add(new FormWidget(contentService.getInit().getUserEMail(),
|
||||||
|
new HTML("<A href='"+url+"'>Sign Out</A>")));
|
||||||
|
} else {
|
||||||
|
String url = contentService.getInit().getContentURL();
|
||||||
|
url = "https://www.google.com/accounts/o8/ud"
|
||||||
|
+ "?openid.ns=http://specs.openid.net/auth/2.0"
|
||||||
|
+ "&openid.ns.max_auth_age=300"
|
||||||
|
+ "&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select"
|
||||||
|
+ "&openid.identity=http://specs.openid.net/auth/2.0/identifier_select"
|
||||||
|
+ "&openid.return_to=http://localhost:8080"+url
|
||||||
|
+ "&openid.realm=http://localhost:8080/"
|
||||||
|
+ "&openid.mode=checkid_setup"
|
||||||
|
+ "&openid.ns.ax=http://openid.net/srv/ax/1.0"
|
||||||
|
+ "&openid.ax.mode=fetch_request"
|
||||||
|
+ "&openid.ax.type.email=http://axschema.org/contact/email"
|
||||||
|
+ "&openid.ax.required=email";
|
||||||
|
settingsPanel.add(new FormWidget("",
|
||||||
|
new HTML("<A href='"+url+"'>Sign In</A>")));
|
||||||
|
}
|
||||||
|
|
||||||
initWidget(settingsPanel);
|
initWidget(settingsPanel);
|
||||||
setStylePrimaryName("my-SettingsPanel");
|
setStylePrimaryName("my-SettingsPanel");
|
||||||
|
|
||||||
@@ -54,7 +76,7 @@ public class SettingsPanel extends Composite {
|
|||||||
|
|
||||||
private static class FormWidget extends HorizontalPanel {
|
private static class FormWidget extends HorizontalPanel {
|
||||||
public FormWidget(String label, Widget w) {
|
public FormWidget(String label, Widget w) {
|
||||||
setStylePrimaryName(".my-FormWidget");
|
setStylePrimaryName("form-widget");
|
||||||
setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
|
setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
|
||||||
add(new Label(label));
|
add(new Label(label));
|
||||||
add(w);
|
add(w);
|
||||||
@@ -65,16 +87,18 @@ public class SettingsPanel extends Composite {
|
|||||||
public void onAvailableGrammarsChanged() {
|
public void onAvailableGrammarsChanged() {
|
||||||
if (grammarBox != null) {
|
if (grammarBox != null) {
|
||||||
grammarBox.clear();
|
grammarBox.clear();
|
||||||
|
fromLangBox.clear();
|
||||||
|
toLangBox.clear();
|
||||||
|
|
||||||
for (ContentService.GrammarInfo grammar : contentService.getGrammars()) {
|
for (ContentService.GrammarInfo grammar : contentService.getGrammars()) {
|
||||||
grammarBox.addItem(grammar.getName(), grammar.getURL());
|
grammarBox.addItem(grammar.getName(), grammar.getURL());
|
||||||
}
|
}
|
||||||
pgf.setPGFName(grammarBox.getSelectedValue());
|
pgf.setGrammarURL(grammarBox.getSelectedValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void onSelectedGrammarChanged() {
|
public void onSelectedGrammarChanged() {
|
||||||
if (grammarBox != null) {
|
if (grammarBox != null) {
|
||||||
grammarBox.setSelectedValue(pgf.getPGFName());
|
grammarBox.setSelectedValue(pgf.getGrammarURL());
|
||||||
}
|
}
|
||||||
if (fromLangBox != null) {
|
if (fromLangBox != null) {
|
||||||
fromLangBox.clear();
|
fromLangBox.clear();
|
||||||
|
|||||||
@@ -253,16 +253,16 @@ public class TranslateApp implements EntryPoint {
|
|||||||
|
|
||||||
protected void updateSettingsFromHistoryToken(String[] tokenParts) {
|
protected void updateSettingsFromHistoryToken(String[] tokenParts) {
|
||||||
if (tokenParts.length >= 1 && tokenParts[0].length() > 0) {
|
if (tokenParts.length >= 1 && tokenParts[0].length() > 0) {
|
||||||
setPGFName(tokenParts[0]);
|
setGrammarURL(tokenParts[0]);
|
||||||
}
|
}
|
||||||
if (tokenParts.length >= 2 && tokenParts[1].length() > 0) {
|
if (tokenParts.length >= 2 && tokenParts[1].length() > 0) {
|
||||||
setInputLanguage(tokenParts[1]);
|
setInputLanguage(tokenParts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPGFName (String pgfName) {
|
protected void setGrammarURL (String url) {
|
||||||
if (pgfName != null && !pgfName.equals(pgf.getPGFName())) {
|
if (url != null && !url.equals(pgf.getGrammarURL())) {
|
||||||
pgf.setPGFName(pgfName);
|
pgf.setGrammarURL(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,10 +279,10 @@ public class TranslateApp implements EntryPoint {
|
|||||||
protected class MySettingsListener implements SettingsListener {
|
protected class MySettingsListener implements SettingsListener {
|
||||||
// Will only happen on load
|
// Will only happen on load
|
||||||
public void onAvailableGrammarsChanged() {
|
public void onAvailableGrammarsChanged() {
|
||||||
if (pgf.getPGFName() == null) {
|
if (pgf.getGrammarURL() == null) {
|
||||||
List<String> grammars = pgf.getGrammars();
|
List<String> grammars = pgf.getGrammars();
|
||||||
if (!grammars.isEmpty()) {
|
if (!grammars.isEmpty()) {
|
||||||
pgf.setPGFName(grammars.get(0));
|
pgf.setGrammarURL(grammars.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +310,7 @@ public class TranslateApp implements EntryPoint {
|
|||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
statusPopup = new StatusPopup();
|
statusPopup = new StatusPopup();
|
||||||
|
|
||||||
pgf = new PGFWrapper(pgfBaseURL);
|
pgf = new PGFWrapper();
|
||||||
RootPanel.get().add(createUI());
|
RootPanel.get().add(createUI());
|
||||||
pgf.addSettingsListener(new MySettingsListener());
|
pgf.addSettingsListener(new MySettingsListener());
|
||||||
History.addHistoryListener(new MyHistoryListener());
|
History.addHistoryListener(new MyHistoryListener());
|
||||||
|
|||||||
@@ -152,10 +152,17 @@
|
|||||||
font-size: 150%;
|
font-size: 150%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-SettingsPanel * {
|
.my-SettingsPanel {
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-SettingsPanel .form-widget {
|
||||||
margin: 0 0.4em;
|
margin: 0 0.4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-SettingsPanel .form-widget * {
|
||||||
|
margin: 0 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
.my-LinksPanel * {
|
.my-LinksPanel * {
|
||||||
margin: 0 0.2em;
|
margin: 0 0.2em;
|
||||||
}
|
}
|
||||||
|
|||||||
36
src/ui/gwt/www/editor/editor.html
Normal file
36
src/ui/gwt/www/editor/editor.html
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
|
||||||
|
<!-- above set at the top of the file will set -->
|
||||||
|
<!-- the browser's rendering engine into -->
|
||||||
|
<!-- "Quirks Mode". Replacing this declaration -->
|
||||||
|
<!-- with a "Standards Mode" doctype is supported, -->
|
||||||
|
<!-- but may lead to some differences in layout. -->
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<!-- -->
|
||||||
|
<!-- Any title is fine -->
|
||||||
|
<!-- -->
|
||||||
|
<title>Editor</title>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- This script loads your compiled module. -->
|
||||||
|
<!-- If you add any GWT meta tags, they must -->
|
||||||
|
<!-- be added before this line. -->
|
||||||
|
<!-- -->
|
||||||
|
<script type="text/javascript" language="javascript" src="org.grammaticalframework.ui.gwt.EditorApp/org.grammaticalframework.ui.gwt.EditorApp.nocache.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- The body can have arbitrary html, or -->
|
||||||
|
<!-- you can leave the body empty if you want -->
|
||||||
|
<!-- to create a completely dynamic UI. -->
|
||||||
|
<!-- -->
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- OPTIONAL: include this if you want history support -->
|
||||||
|
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,36 +1,4 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<HEAD>
|
||||||
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
|
<META HTTP-EQUIV="REFRESH"
|
||||||
<!-- above set at the top of the file will set -->
|
content="0; url=https://www.google.com/accounts/o8/ud?openid.ns=http://specs.openid.net/auth/2.0&openid.ns.max_auth_age=300&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.return_to=http://localhost:8080/editor/grammars.content&openid.realm=http://localhost:8080/&openid.mode=checkid_immediate&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.ax.mode=fetch_request&openid.ax.type.email=http://axschema.org/contact/email&openid.ax.required=email">
|
||||||
<!-- the browser's rendering engine into -->
|
</HEAD>
|
||||||
<!-- "Quirks Mode". Replacing this declaration -->
|
|
||||||
<!-- with a "Standards Mode" doctype is supported, -->
|
|
||||||
<!-- but may lead to some differences in layout. -->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
||||||
<!-- -->
|
|
||||||
<!-- Any title is fine -->
|
|
||||||
<!-- -->
|
|
||||||
<title>Editor</title>
|
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
<!-- This script loads your compiled module. -->
|
|
||||||
<!-- If you add any GWT meta tags, they must -->
|
|
||||||
<!-- be added before this line. -->
|
|
||||||
<!-- -->
|
|
||||||
<script type="text/javascript" language="javascript" src="org.grammaticalframework.ui.gwt.EditorApp/org.grammaticalframework.ui.gwt.EditorApp.nocache.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
<!-- The body can have arbitrary html, or -->
|
|
||||||
<!-- you can leave the body empty if you want -->
|
|
||||||
<!-- to create a completely dynamic UI. -->
|
|
||||||
<!-- -->
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- OPTIONAL: include this if you want history support -->
|
|
||||||
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user