Skip to content

Commit

Permalink
Don't allow blank names, fix utf-8 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Connorhd committed Dec 7, 2010
1 parent 8cbdaef commit 3ae0dc1
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 11 deletions.
Binary file modified android/bin/Android TabCloud.apk
Binary file not shown.
Binary file modified android/bin/resources.ap_
Binary file not shown.
4 changes: 2 additions & 2 deletions appengine-java/src/uk/co/connorhd/tabcloud/AddServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp)
pm.close();
}
}
resp.setContentType("text/plain");
resp.setContentType("text/plain; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedin\"}");
} else {
resp.setContentType("text/json");
resp.setContentType("text/json; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedout\"}");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp)

if (user != null) {
// This is a bit horrible, should probably just redirect to a JSP?
resp.setContentType("text/html");
resp.setContentType("text/html; charset=utf-8");
resp.getWriter().println("<html><head><link rel=\"icon\" type=\"image/png\" href=\"images/icon16.png\"><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"><title>TabCloud</title></head><body><div style=\"margin: 40px auto; width: 600px;\"><img style=\"float: left; padding-right: 20px;\" src=\"images/tabcloud200.png\" alt=\"TabCloud\" /><div style=\"font-family:sans-serif; font-size: 1.8em; text-align: center; padding-top: 50px;\"><strong>You are now logged in.</strong><br />Click the TabCloud menu icon to access TabCloud.</div></div></body></html>");
} else {
resp.sendRedirect(userService.createLoginURL(req.getRequestURI()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp)
User user = userService.getCurrentUser();

if (user == null) {
resp.setContentType("text/html");
resp.setContentType("text/html; charset=utf-8");
resp.getWriter().println("<html><head><link rel=\"icon\" type=\"image/png\" href=\"images/icon16.png\"><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"><title>TabCloud</title></head><body><div style=\"margin: 40px auto; width: 600px;\"><img style=\"float: left; padding-right: 20px;\" src=\"images/tabcloud200.png\" alt=\"TabCloud\" /><div style=\"font-family:sans-serif; font-size: 1.8em; text-align: center; padding-top: 50px;\"><strong>You are now logged out.</strong><br />You will have to login again to access your saved windows on TabCloud.</div></div></body></html>");
} else {
resp.sendRedirect(userService.createLogoutURL(req.getRequestURI()));
Expand Down
4 changes: 2 additions & 2 deletions appengine-java/src/uk/co/connorhd/tabcloud/RemoveServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp)
// New user
pm.close();
}
resp.setContentType("text/plain");
resp.setContentType("text/plain; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedin\"}");
} else {
resp.setContentType("text/json");
resp.setContentType("text/json; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedout\"}");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp)
if (windowString != "")
windowString = windowString.substring(0, windowString.length()-1);
pm.close();
resp.setContentType("text/plain");
resp.setContentType("text/plain; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedin\", \"windows\": ["+windowString+"]}");
} else {
resp.setContentType("text/json");
resp.setContentType("text/json; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedout\"}");
}
}
Expand Down
4 changes: 2 additions & 2 deletions appengine-java/src/uk/co/connorhd/tabcloud/UpdateServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp)
} catch (Exception e) {
pm.close();
}
resp.setContentType("text/plain");
resp.setContentType("text/plain; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedin\"}");
} else {
resp.setContentType("text/json");
resp.setContentType("text/json; charset=utf-8");
resp.getWriter().println("{\"status\": \"loggedout\"}");
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions chrome/background.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<script>
if (localStorage.openin === undefined)
localStorage.openin = 'window';
Expand Down
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TabCloud",
"version": "1.5",
"version": "1.6",

"icons": {
"16": "images/icon16.png",
Expand Down
7 changes: 7 additions & 0 deletions chrome/popup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<script src="./lib/jquery-1.4.2.min.js"></script>
<script src="./lib/jquery-ui-1.8.5.custom.min.js"></script>
<script src="./lib/jquery.innerfade.js"></script>
Expand All @@ -17,6 +18,9 @@
return names[name];
};
var setWindowName = function (name, value) {
if (value.length == 0) {
value = 'Window';
}
var names = JSON.parse(localStorage.tempWindowNames)
names[name] = value;
localStorage.tempWindowNames = JSON.stringify(names);
Expand Down Expand Up @@ -355,6 +359,9 @@
background-color: #ccc;
border-radius: 2px;
}
#trash .tabplaceholder {
opacity: 0.6;
}
body {
width: 300px;
font-size: 0.9em;
Expand Down

0 comments on commit 3ae0dc1

Please sign in to comment.