Permalink
Browse files

-Updated Setup/maven/gwt/install scripts to install sources.

-Modified pom so that the servlet libraries (which don't have source) are now scope = runtime
-Added AdWords
-Fixed broken pages at terms.html & contact.html
-Fixed getSelection() JSNI. it needed txt+"" on Firefox, otherwise it was returning a weirdo String object with 'undefined' length() method.
  • Loading branch information...
1 parent 31a17ac commit e32a131c0e1d5ce64e4fa1a5abb993e8f2652c49 @jdwyah committed Feb 21, 2008
@@ -1,6 +1,5 @@
-
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-google-apis -Dversion=$1 -Dpackaging=jar -Dfile=build\\lib\\gwt-google-apis.jar -DgeneratePom=true
-
+mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-google-apis -Dversion=$1 -Dpackaging=jar -Dfile=build\\lib\\gwt-google-apis.jar -DgeneratePom=true
@@ -1,6 +1,8 @@
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-servlet -Dversion=$1 -Dpackaging=jar -Dfile=build\\staging\\gwt-windows-0.0.0\\gwt-servlet.jar -DgeneratePom=true
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-user -Dversion=$1 -Dpackaging=jar -Dfile=build\\staging\\gwt-windows-0.0.0\\gwt-user.jar -DgeneratePom=true
+mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-user -Dversion=$1 -Dpackaging=jar -Dfile=build\\staging\\gwt-windows-0.0.0\\gwt-user.jar -DgeneratePom=true
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-dev-windows -Dversion=$1 -Dpackaging=jar -Dfile=build\\staging\\gwt-windows-0.0.0\\gwt-dev-windows.jar -DgeneratePom=true
+mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-dev-windows -Dversion=$1 -Dpackaging=jar -Dfile=build\\staging\\gwt-windows-0.0.0\\gwt-dev-windows.jar -DgeneratePom=true
cp build\\staging\\gwt-windows-0.0.0\\swt-win32-3235.dll "$USERPROFILE"\\.m2\\repository\\com\\google\\gwt-dev-windows\\$1
cp build\\staging\\gwt-windows-0.0.0\\gwt-ll.dll "$USERPROFILE"\\.m2\\repository\\com\\google\\gwt-dev-windows\\$1
View
@@ -119,24 +119,24 @@
<dependency>
<groupId>com.google</groupId>
<artifactId>gwt-user</artifactId>
- <version>1.5.0.build1806</version>
- <scope>provided</scope>
+ <version>1.5.0.build1867</version>
</dependency>
<dependency>
<groupId>com.google</groupId>
<artifactId>gwt-dev-windows</artifactId>
- <version>1.5.0.build1806</version>
+ <version>1.5.0.build1867</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>1.5.0.build1806</version>
+ <artifactId>gwt-servlet</artifactId>
+ <version>1.5.0.build1867</version>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google</groupId>
<artifactId>gwt-google-apis</artifactId>
- <version>1.5.0.build99</version>
+ <version>1.5.0.build125</version>
</dependency>
<dependency>
<groupId>com.google</groupId>
@@ -20,8 +20,6 @@
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.ClickListenerCollection;
import com.google.gwt.user.client.ui.FocusWidget;
import com.google.gwt.user.client.ui.HasHTML;
import com.google.gwt.user.client.ui.MouseListener;
@@ -38,7 +36,6 @@ private static native String urlEncode(String str)
}-*/;
private Element anchorElem;
- private ClickListenerCollection fClickListeners;
private MouseListenerCollection fMouseListeners;
private String target;
@@ -49,8 +46,6 @@ private static native String urlEncode(String str)
public ExternalLink() {
super(DOM.createDiv());
DOM.appendChild(getElement(), anchorElem = DOM.createAnchor());
- sinkEvents(Event.ONCLICK);
- sinkEvents(Event.MOUSEEVENTS);
setStyleName("H-External-Hyperlink");
}
@@ -66,15 +61,11 @@ public ExternalLink(String text, String url, boolean relative) {
}
}
- public void addClickListener(ClickListener listener) {
- if (fClickListeners == null)
- fClickListeners = new ClickListenerCollection();
- fClickListeners.add(listener);
- }
-
public void addMouseListener(MouseListener listener) {
- if (fMouseListeners == null)
+ if (fMouseListeners == null) {
fMouseListeners = new MouseListenerCollection();
+ sinkEvents(Event.MOUSEEVENTS);
+ }
fMouseListeners.add(listener);
}
@@ -97,12 +88,8 @@ public String getText() {
}
public void onBrowserEvent(Event event) {
+ super.onBrowserEvent(event);
switch (DOM.eventGetType(event)) {
- case Event.ONCLICK:
- if (fClickListeners != null)
- fClickListeners.fireClick(this);
- break;
-
case Event.ONMOUSEDOWN:
case Event.ONMOUSEUP:
case Event.ONMOUSEMOVE:
@@ -114,11 +101,6 @@ public void onBrowserEvent(Event event) {
}
}
- public void removeClickListener(ClickListener listener) {
- if (fClickListeners != null)
- fClickListeners.remove(listener);
- }
-
public void removeMouseListener(MouseListener listener) {
if (fMouseListeners != null)
fMouseListeners.remove(listener);
@@ -34,6 +34,13 @@ else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
//target.style.cursor = "default"
}-*/;
+ /**
+ * note the important return txt+"" Without this, the 'String' object
+ * that is returned is a weirdo. Calling length() on it returns
+ * undefined on Firefox.
+ *
+ * @return
+ */
public static native String getTextSelection()
/*-{
try{
@@ -49,7 +56,7 @@ else if ($doc.selection)
{
txt = $doc.selection.createRange().text;
}
- return txt;
+ return txt+"";
}
catch( e ){
$wnd.console.log("err:"+e);
@@ -89,9 +89,6 @@ public void onClick(Widget sender) {
initWidget(mainP);
- Log.debug("setHTML: " + selection);
-
- // selection = "start<script>alert('xss');</script>end";
setHTML(makeReplyFromString(selection));
}
@@ -117,8 +114,14 @@ public String makeReplyFromString(String selection,
return selectionSB.toString();
}
+ /**
+ *
+ * @param text
+ */
public void setHTML(final String text) {
+ Log.debug("CreatePostWidget setting: " + text);
DeferredCommand.addCommand(new Command() {
+
public void execute() {
textArea.setHTML(text);
}
@@ -160,6 +160,18 @@ public void gotoThread(final ForumPost thread, final int start,
gotoForum(thread, start, true, FORUM_POST_MAX, create);
}
+ /**
+ *
+ * @param forumTopic
+ * @param start
+ * @param isReply
+ * @param max
+ * @param create -
+ * whether or not this goto should act as if the create
+ * button were pressed. This allows us to remember the fact
+ * that an un-athenticated user wanted to create a post,
+ * but needed to login first.
+ */
private void gotoForum(final ForumTopic forumTopic, final int start,
final boolean isReply, final int max, final boolean create) {
@@ -26,6 +26,15 @@
*/
public class ForumCommand {
+ /**
+ * Look at the URL bar and see if we've stored a ForumCommand in URL
+ * parameters. We normally use GWT-style hyperlinks with this info
+ * inserted after the URL #, but when passing request through to Acegi
+ * for login and coming back, we need to do it in regular URL
+ * parameters.
+ *
+ * @return
+ */
public static ForumCommand getFromLocation() {
ForumCommand rtn = new ForumCommand();
@@ -74,6 +74,9 @@ public void load(int start, PostsList result, ForumTopic original,
addShortDisplay(table, row, post);
row++;
}
+ table.getColumnFormatter().setStyleName(0, "title");
+ table.getColumnFormatter().setStyleName(1, "replies");
+ table.getColumnFormatter().setStyleName(3, "author");
allPosts.add(table);
}
@@ -110,9 +113,7 @@ private void addShortDisplay(TableWithHeaders table, int row,
table.setWidget(row, 1, replies);
table.setWidget(row, 2, date);
table.setWidget(row, 3, author);
- table.getColumnFormatter().setStyleName(0, "title");
- table.getColumnFormatter().setStyleName(1, "replies");
- table.getColumnFormatter().setStyleName(3, "author");
+
if (row % 2 == 1) {
table.getRowFormatter().setStyleName(row, "Odd");
}
@@ -12,7 +12,7 @@
<body onunload="GUnload()">
- <div class="right"></div>
+ <div class="main">
<div id="collegeMap" class="boxContent">
<script language="JavaScript">
var Vars = {}
@@ -22,6 +22,7 @@
Vars['widget_1'] = "Forum"
Vars['uniqueForumID_1'] = "School~486"
Vars['uniqueForumID_1'] = "RecentForumPost~0"
+ //CAUTION: This goes out of date quickly! If you get bootstrap errors when testing, copy a new string here. Run run_jetty_gwt and go to a forum page and copy out the HTML from there.
Vars['serialized_1'] = "//OK[100,0,0,24,63,62,58,1200164427000,19,-7,0,-62,5,0,0,24,61,15,59,1200165156000,19,-7,0,-62,5,0,0,24,60,59,64,1200169520000,19,-7,0,58,57,33,4085,5753,56,13,55,257300,54,-72.197482,43.716069,182670,486,10,0,51,53,52,51,2,5,0,0,24,50,49,69,1200268989000,19,-7,0,-16,5,0,0,24,48,15,74,1200269306000,19,-26,0,-16,5,0,0,24,47,15,76,1200269397000,19,-17,0,-16,5,0,0,24,46,15,77,1200269411000,19,-17,0,-16,5,0,0,24,45,15,78,1200269431000,19,-26,0,-16,5,0,0,24,44,15,80,1200269483000,19,-17,0,-16,5,0,0,24,43,15,81,1200269504000,19,-17,0,-16,5,0,0,24,42,15,82,1200269527000,19,-17,0,-16,5,0,0,24,41,15,85,1200269575000,19,-26,0,-16,5,0,0,24,40,15,86,1200269601000,19,39,0,0,4,0,4,0,4,0,21,39,2,3,1,15,1200269065000,19,18,0,-16,5,0,0,24,38,15,87,1200269615000,19,37,0,0,4,0,4,0,4,0,21,36,2,4,1,15,1200269362000,19,18,0,35,34,33,4584,5565,32,31,30,100500,29,-86.296225,32.366228,100724,10,10,0,28,27,26,25,2,5,0,0,24,23,22,112,1200523470000,19,20,0,0,4,0,4,0,4,0,21,20,2,1,1,15,1195236137000,19,18,0,17,16,15,516,739,14,13,12,106100,11,-149.814433,61.189432,102669,11,10,0,9,8,7,6,2,5,15,4,3,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0,500,0,0,0,0,0,0,2,1,[\"com.apress.progwt.client.domain.dto.ForumBootstrap/2928513934\",\"com.apress.progwt.client.domain.School/3355129998\",\"com.apress.progwt.client.domain.dto.PostsList/1895332087\",\"java.util.ArrayList/3821976829\",\"com.apress.progwt.client.domain.SchoolForumPost/267258249\",\"4101\x20University\x20Dr\",\"Less\x20than\x20one\x20year\x20certificate;One\x20but\x20less\x20than\x20two\x20years\x20certificate;Associate's\x20degree;Two\x20but\x20less\x20than\x204\x20years\x20certificate;Bachelor's\x20degree;Postbaccalaureate\x20certificate;Master's\x20degree\",\"City:\x20Large\",\"Anchorage\",\"Yes\",\"Alaska\x20Pacific\x20University\",\"(907)\x20561-1266\",\"4-year,\x20Private\x20not-for-profit\",\"Alaska\",\"\",\"www.alaskapacific.edu\",\"99508\",\"com.apress.progwt.client.domain.User/8957174\",\"java.util.Date/1659716317\",\"test\",\"java.util.HashMap/962170901\",\"I\x20mean\x20look\x20at\x20it!!\",\"This\x20is\x20in\x20the\x20middle\x20of\x20nowhere\",\"java.util.HashSet/1594477813\",\"915\x20S\x20Jackson\x20Street\",\"Bachelor's\x20degree;Master's\x20degree;Post-master's\x20certificate;Doctor's\x20degree\",\"City:\x20Midsize\",\"Montgomery\",\"Alabama\x20State\x20University\",\"(334)\x20229-4400\",\"4-year,\x20Public\",\"Alabama\",\"NCAA\x20Division\x20I-AA\",\"www.alasu.edu\",\"36101-0271\",\"ri<b>ch</b>ie\",\"richie\",\"is\x20GWT\x20a\x20class\x20at\x20ASU?\",\"sandy7\",\"is\x20there\x20a\x20lot\x20of\x20work?\x20:(\",\"where's\x20jane\x20hall??\",\"Is\x20the\x20food\x20as\x20good\x20as\x20u\x20misissippi?\",\"favorite\x20teacher??\",\"dogs\x20allowed\x20in\x20physics??\",\"car\x20on\x20campus?\",\"ASU\x20powns!\",\"WASSSUP!!!\",\"Why\x20did\x20you\x20choose\x20ASU?\",\"What\x20classes\x20have\x20people\x20taken?<br>\",\"list\x20of\x20classes\x20you've\x20taken/now\x20taking\x20so\x20others\x20can\x20ask\x20for\x20advice?\x20\",\"Hanover\",\"Bachelor's\x20degree;Postbaccalaureate\x20certificate;Master's\x20degree;Doctor's\x20degree;First-professional\x20degree\",\"Town:\x20Remote\",\"Dartmouth\x20College\",\"(603)\x20646-1110\",\"Hampshire\",\"www.dartmouth.edu\",\"03755-3529\",\"it\x20stinke!\",\"Darmtouth\x20stink\x20butt!!!!!!\",\"thread\x2010\",\"text\",\"Dthread\x209\"],0,3]"
</script>
<div id="gwt-slot-1"></div>
@@ -69,6 +69,11 @@ public ModelMap termsHandler(HttpServletRequest req) {
return ControllerUtil.getModelMap(req, userService);
}
+ @RequestMapping("/contact.html")
+ public ModelMap contactHandler(HttpServletRequest req) {
+ return ControllerUtil.getModelMap(req, userService);
+ }
+
@RequestMapping("/about.html")
public ModelMap aboutHandler(HttpServletRequest req) {
return ControllerUtil.getModelMap(req, userService);
@@ -4,7 +4,7 @@
<hibernate-mapping package="com.apress.progwt.client.domain">
- <class name="ForumPost" table="forumposts" discriminator-value="abstractForumPost">
+ <class name="ForumPost" abstract="true" table="forumposts" discriminator-value="abstractForumPost">
<meta attribute="generated-class">com.apress.progwt.server.domain.generated.AbstractForumPost</meta>
<meta attribute="scope-class">public abstract</meta>
@@ -60,6 +60,17 @@
</ul>
</#if>
+ <script type="text/javascript"><!--
+google_ad_client = "pub-4227468677841471";
+/* 160x600, created 2/20/08 */
+google_ad_slot = "3131680677";
+google_ad_width = 160;
+google_ad_height = 600;
+//-->
+</script>
+<script type="text/javascript"
+src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
</div>
@@ -0,0 +1,25 @@
+<html>
+<#import "/spring.ftl" as spring/>
+<#import "common.ftl" as common/>
+<head>
+ <title>Terms Of Use</title>
+</head>
+
+<body>
+ <div id="main">
+
+ <#if message?exists>
+ <div class="message">${message}</div>
+ </#if>
+<h2>Questions & Support:</h2>
+help@tocollege.net
+<h2>Press Inquires:</h2>
+Jeff Dwyer - jdwyah@myhippocampus.com
+<h2>Address:</h2>
+MyHippocampus LLC<br>
+18 Melview Ridge<br>
+Norwich, VT 05055<br>
+ </div>
+
+</body>
+</html>
@@ -31,7 +31,17 @@
<div id="sidebar">
-
+ <script type="text/javascript"><!--
+google_ad_client = "pub-4227468677841471";
+/* 160x600, created 2/20/08 */
+google_ad_slot = "3131680677";
+google_ad_width = 160;
+google_ad_height = 600;
+//-->
+</script>
+<script type="text/javascript"
+src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
</div>
@@ -2,17 +2,15 @@
<#import "/spring.ftl" as spring/>
<#import "common.ftl" as common/>
<head>
- <title><@spring.message "tour.title"/></title>
+ <title>Contact Us</title>
</head>
<body>
-
- <div class="middle-column-box-white">
- <div class="middle-column-box-title-green">Terms of Service</div>
-
- <@common.terms_formatted/>
-
- </div>
+
+ <div id="main">
+ <@common.terms_formatted/>
+ </div>
+
</body>
</html>
@@ -35,7 +35,17 @@
<div id="sidebar">
-
+ <script type="text/javascript"><!--
+google_ad_client = "pub-4227468677841471";
+/* 160x600, created 2/20/08 */
+google_ad_slot = "3131680677";
+google_ad_width = 160;
+google_ad_height = 600;
+//-->
+</script>
+<script type="text/javascript"
+src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
</div>
@@ -108,7 +108,17 @@
State: NH
</@common.box>
-
+ <script type="text/javascript"><!--
+google_ad_client = "pub-4227468677841471";
+/* 160x600, created 2/20/08 */
+google_ad_slot = "3131680677";
+google_ad_width = 160;
+google_ad_height = 600;
+//-->
+</script>
+<script type="text/javascript"
+src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
</div>

0 comments on commit e32a131

Please sign in to comment.