Permalink
Browse files

tidied up ads, added left and top slots, converted to jsp

  • Loading branch information...
1 parent 685ed9e commit 97798707cd2a1fd2f60d41cfcac3044bd685716e Lewis committed Sep 14, 2011
@@ -41,6 +41,7 @@ body {
.footer {
text-align: center;
margin-top: 15px;
+ margin-bottom: 15px;
}
.footer div {
@@ -1,45 +0,0 @@
-package com.lewish.asciiflow.client.tools;
-
-import com.google.gwt.resources.client.ImageResource;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.lewish.asciiflow.client.Canvas;
-import com.lewish.asciiflow.client.HistoryManager;
-import com.lewish.asciiflow.client.Tool;
-import com.lewish.asciiflow.client.common.Box;
-import com.lewish.asciiflow.client.resources.AsciiflowClientBundle;
-
-@Singleton
-public class TransformTool extends Tool {
-
- @Inject
- public TransformTool(Canvas canvas, HistoryManager historyManager,
- AsciiflowClientBundle clientBundle) {
- super(canvas, historyManager, clientBundle);
- }
-
- @Override
- public void mouseOver(int x, int y) {
- String value = canvas.getValue(x, y);
- if ("+".equals(value)) {
-
- }
- };
-
- @Override
- public String getLabel() {
- return "Transform";
- }
-
- @Override
- public String getDescription() {
- return "Click on box corners and line ends to resize and move them.";
- }
-
- @Override
- public ImageResource getImageResource() {
- // TODO
- return clientBundle.freeformToolImage();
- }
-
-}
@@ -9,22 +9,6 @@
<title>Asciiflow - ASCII Flow Diagram Tool</title>
-<style type="text/css">
-#main {
- display: inline-block;
-}
-
-#ads-bottom {
- margin-top: 15px;
- margin-left: 26px;
-}
-
-#ads-right {
- display: inline-block;
- margin-left: 15px;
-}
-</style>
-
<script type="text/javascript" src="asciiflow/asciiflow.nocache.js"></script>
<script type="text/javascript">
@@ -39,18 +23,19 @@
})();
</script>
-<script type="text/javascript">
-var random = Math.floor(Math.random()*2 + 1);
-if (random == 0) {
- window.adslot = 'left';
-} else if (random == 1) {
- window.adslot = 'right';
-} else if (random == 2) {
- window.adslot = 'bottom';
-} else {
- window.adslot = 'top';
-}
-</script>
+<%
+ String adslot;
+ long random = Math.round(Math.floor(Math.random()*4));
+ if (random == 0) {
+ adslot = "left";
+ } else if (random == 1) {
+ adslot = "right";
+ } else if (random == 2) {
+ adslot = "bottom";
+ } else {
+ adslot = "top";
+ }
+%>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#appId=179968592059905&amp;xfbml=1"></script>
@@ -62,72 +47,87 @@
<body>
-<div id="main"></div>
-
-<div id="ads-right" style="position: absolute">
+<table style="display: inline-block;">
+ <tr>
+ <td colspan="3">
+<% if ("top".equals(adslot)) { %>
<script type="text/javascript"><!--
-if(window.adslot == 'right') {
google_ad_client = "ca-pub-5033805476723981";
- /* Right */
- google_ad_slot = "6855894996";
- google_ad_width = 120;
- google_ad_height = 600;
-} else {
- this.parentNode.style.display = 'none';
-}
+ /* Links */
+ google_ad_slot = "2167957931";
+ google_ad_width = 728;
+ google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
-</div>
-
-<div id="fb-root"></div>
-
-<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
- style="position: absolute; width: 0; height: 0; border: 0"></iframe>
-
-<noscript>
-<div
- style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
-Please turn on JavaScript in order to use this site!</div>
-</noscript>
-
-<div id="ads-bottom" style="">
+<% } %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+<% if ("left".equals(adslot)) { %>
<script type="text/javascript"><!--
-if(window.adslot == 'bottom') {
google_ad_client = "ca-pub-5033805476723981";
- /* Leaderboard */
- google_ad_slot = "6181120069";
- google_ad_width = 728;
- google_ad_height = 90;
-} else {
- this.parentNode.style.display = 'none';
-}
+ /* Left */
+ google_ad_slot = "3046880976";
+ google_ad_width = 120;
+ google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
-</div>
-
-<div id="ads-left" style="position: absolute">
+<% } %>
+ </td>
+ <td>
+ <div id="main"></div>
+ </td>
+ <td>
+<% if ("right".equals(adslot)) { %>
<script type="text/javascript"><!--
-if(window.adslot == 'left') {
google_ad_client = "ca-pub-5033805476723981";
- /* Left */
- google_ad_slot = "3046880976";
+ /* Right */
+ google_ad_slot = "6855894996";
google_ad_width = 120;
google_ad_height = 600;
-} else {
- this.parentNode.style.display = 'none';
-}
+//-->
+</script>
+<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
+<% } %>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3">
+<% if ("bottom".equals(adslot)) { %>
+<script type="text/javascript"><!--
+ google_ad_client = "ca-pub-5033805476723981";
+ /* Bottom */
+ google_ad_slot = "6181120069";
+ google_ad_width = 728;
+ google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
-</div>
+<% } %>
+ </td>
+ </tr>
+</table>
+
+<div id="fb-root"></div>
+
+<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
+ style="position: absolute; width: 0; height: 0; border: 0"></iframe>
+
+<noscript>
+<div
+ style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
+Please turn on JavaScript in order to use this site!</div>
+</noscript>
</body>
</html>
View
@@ -7,7 +7,7 @@
<!-- Default page to serve -->
<welcome-file-list>
- <welcome-file>Asciiflow.html</welcome-file>
+ <welcome-file>Asciiflow.jsp</welcome-file>
</welcome-file-list>
<servlet>

0 comments on commit 9779870

Please sign in to comment.