|
@@ -325,6 +325,15 @@ $(document).ready(function() {
|
|
|
// Show the collaborators window
|
|
|
$("div#shadow").css("display", "block");
|
|
|
$("div#collaborators-window").css("display", "block");
|
|
|
+
|
|
|
+ // In 1.5 seconds
|
|
|
+ window.setTimeout(function() {
|
|
|
+ // If the canvas is new
|
|
|
+ if(canvasIsNew === true) {
|
|
|
+ // Save the canvas
|
|
|
+ prepareSaveCanvas();
|
|
|
+ }
|
|
|
+ }, 1500);
|
|
|
});
|
|
|
|
|
|
// Close the collaborators window
|
|
@@ -616,7 +625,11 @@ $(document).ready(function() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- updateCollaborators();
|
|
|
+ // If the canvas is new
|
|
|
+ if(canvasIsNew === false) {
|
|
|
+ // Update the collaborators
|
|
|
+ updateCollaborators();
|
|
|
+ }
|
|
|
|
|
|
// Post typing information
|
|
|
function postTyping(typingId) {
|
|
@@ -2941,15 +2954,15 @@ $(document).ready(function() {
|
|
|
|
|
|
// Prepare to save the canvas
|
|
|
function prepareSaveCanvas() {
|
|
|
- // If the user is a user
|
|
|
+ // If the viewer of the canvas is a logged in user
|
|
|
if($("input[name='username']").val() != "") {
|
|
|
// Save the canvas
|
|
|
saveCanvas();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // Save the project on load
|
|
|
- prepareSaveCanvas();
|
|
|
+ // Save the canvas on load
|
|
|
+ // prepareSaveCanvas();
|
|
|
|
|
|
/* ================================================
|
|
|
Create and remove hidden copies of every list item.
|