summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-10 08:33:50 +0200
committerjmoenig <jens@moenig.org>2013-04-10 08:33:50 +0200
commitcb41576e5ac53707bac1c16c46b851a269a41a6b (patch)
treeda87defadb239d3ff7e57811c99ac45a626b6266
parent2fe044f0a36e7e8dedbc2279ee73420229ecc3d0 (diff)
downloadsnap-byow-cb41576e5ac53707bac1c16c46b851a269a41a6b.tar.gz
snap-byow-cb41576e5ac53707bac1c16c46b851a269a41a6b.zip
Load shared projects from different formats
cloud data and plain project format
-rw-r--r--gui.js9
-rwxr-xr-xhistory.txt5
-rw-r--r--morphic.js2
-rw-r--r--objects.js2
4 files changed, 13 insertions, 5 deletions
diff --git a/gui.js b/gui.js
index 3686c3b..a387a6c 100644
--- a/gui.js
+++ b/gui.js
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-April-09';
+modules.gui = '2013-April-10';
// Declarations
@@ -253,7 +253,6 @@ IDE_Morph.prototype.openIn = function (world) {
this.shield.color = this.color;
this.shield.setExtent(this.parent.extent());
this.parent.add(this.shield);
-
myself.showMessage('Fetching project\nfrom the cloud...');
SnapCloud.getPublicProject(
location.hash.substr(9),
@@ -264,7 +263,11 @@ IDE_Morph.prototype.openIn = function (world) {
msg = myself.showMessage('Opening project...');
},
function () {
- myself.rawOpenCloudDataString(projectData);
+ if (projectData.indexOf('<snapdata') === 0) {
+ myself.rawOpenCloudDataString(projectData);
+ } else if (projectData.indexOf('<project') === 0) {
+ myself.rawOpenProjectString(projectData);
+ }
},
function () {
myself.shield.destroy();
diff --git a/history.txt b/history.txt
index 6637ee7..7f841e3 100755
--- a/history.txt
+++ b/history.txt
@@ -1607,3 +1607,8 @@ ______
* GUI: Feedback msg when sharing / unsharing projects
* GUI: Shield (hide) IDE while opening a shared project for presentation
* GUI: Support for debugging shared projects
+
+130410
+------
+* Fixes for type casting and dragging dialogs by buttons, thanks, Nathan!
+* Fix for loading shared projects in different formats (cloud data and plain project data)
diff --git a/morphic.js b/morphic.js
index 3e0f1dd..4a9fa39 100644
--- a/morphic.js
+++ b/morphic.js
@@ -1033,7 +1033,7 @@
/*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio,
FileList, getBlurredShadowSupport*/
-var morphicVersion = '2013-April-09';
+var morphicVersion = '2013-April-10';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
diff --git a/objects.js b/objects.js
index 28681c5..fca4a5f 100644
--- a/objects.js
+++ b/objects.js
@@ -120,7 +120,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2013-April-08';
+modules.objects = '2013-April-10';
var SpriteMorph;
var StageMorph;