Permalink
Browse files

Server now sends a reply when the image was saved.

  • Loading branch information...
1 parent 27955e9 commit 0f4b7590b88682207b1a0f3de29ecf0ee104805d @AVGP committed Apr 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 game.js
View
@@ -9,6 +9,8 @@ $(document).ready(function() {
convertTouchToMouse("canvas");
context = document.getElementById("canvas").getContext("2d");
+ $("#dialog").dialog({modal: true, autoOpen: false, width: "80%"});
+
//
// Socket fun
@@ -58,6 +60,10 @@ $(document).ready(function() {
$("#game").hide();
});
+ sock.on("saved", function(data) {
+ $("#dialog").html("<p>Your image is available at <a href=\"image.html?img=" + data.img + "\" target=\"_blank\">" + document.location.href + "/image.html?img=" + data.img + "</a>.</p>").dialog("open");
+ });
+
//
// Mouse events

0 comments on commit 0f4b759

Please sign in to comment.