--- a/tool/run/plugins/basic/frontPage.java
+++ b/tool/run/plugins/basic/frontPage.java
@@ -14,10 +14,14 @@
import definitions.Messages;
import definitions.is;
-import main.core;
+import main.controller;
import script.Plugin;
import script.log;
import utils.html;
+import www.RequestOrigin;
+import www.WebRequest;
+
+
/**
*
@@ -31,19 +35,35 @@
log.hooks.addAction(Messages.CallFrontScreen, thisFile, "doScreen");
}
+
+
+ void doScreen(){
+ WebRequest request = new WebRequest();
+ // signal that this request is coming from the user interface
+ request.requestOrigin = RequestOrigin.GUI;
+ request.BaseFolder = thisFile.getParentFile();
+ request.scriptFile = thisFile;
+ request.scriptMethod = is.methodDefault;
+ // submit the request to be executed
+ controller.process(request);
+ }
/**
- * Do the front screen that is displayed to users on startup
+ * A wrapper for the doScreen method when requested from the web
+ * @param request the request for this method
*/
- void doScreen() {
-
- String timeLine = www.twitter.getTimeLine("@triplechecked");
-
- // did we got anything from the web?
- if(timeLine == null){
- // nothing, just return without further action
- return;
- }
+ @Override
+ public void main(WebRequest request){
+// doScreen();
+// // our answer from doScreen is saved to "output"
+// request.setAnswer(output);
+// }
+//
+//
+// /**
+// * Do the front screen that is displayed to users on startup
+// */
+// void doScreen() {
String navigation = ""
//+ html.br
@@ -51,21 +71,38 @@
+ html.link("Create a new SPDX", "/spdx/create.java?x=main")
+ html.br
+ html.br
- + "View SPDX archive"
+ + html.link("View SPDX files", "/spdx/show.java?x=main")
+ + html.br
+ html.br
+ html.br
+ "";
+ // get twitter new if available
+ String timeLine = www.twitter.getTimeLine("@triplechecked");
+
+ String newsLine =
+ html.h2("Share your open source news "
+ + html.link("@triplechecked", "http://twitter.com/triplechecked")
+ + "!")
+ + timeLine;
+
+ // did we got anything from the web?
+ if(timeLine == null){
+ // nothing, just return without further action
+ newsLine = "Interested in licensing compliance? Follow us "
+ + html.link("@triplechecked", "http://twitter.com/triplechecked")
+ ;
+ //return;
+ }
+
String result = ""
+ html.div()
+ navigation
- + html.h2("Share your open source news "
- + html.link("@triplechecked", "http://twitter.com/triplechecked")
- + "!")
- + timeLine
+ + newsLine
+ html._div
;
- core.studio.editorPane(is.contentHTML, false, 0, result);
+
+ request.setAnswer(result);
}
}