summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-08 12:17:10 +0200
committerjmoenig <jens@moenig.org>2013-04-08 12:17:10 +0200
commitd022d718fbed7d1ed9547f9b3da7f96ef90d6a15 (patch)
treeceb71714fb5d20106b45db746761998138fc297d
parenta4037b57c1483c613c8322ec15b8c3406e3698c1 (diff)
downloadsnap-yow-d022d718fbed7d1ed9547f9b3da7f96ef90d6a15.tar.gz
snap-yow-d022d718fbed7d1ed9547f9b3da7f96ef90d6a15.zip
Sharing / Unsharing projects finalization
-rw-r--r--cloud.js11
-rw-r--r--gui.js19
-rwxr-xr-xhistory.txt4
3 files changed, 27 insertions, 7 deletions
diff --git a/cloud.js b/cloud.js
index 56ac6fe..3faf327 100644
--- a/cloud.js
+++ b/cloud.js
@@ -29,7 +29,7 @@
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
-modules.cloud = '2013-April-04';
+modules.cloud = '2013-April-08';
// Global stuff
@@ -37,7 +37,7 @@ var Cloud;
var SnapCloud = new Cloud(
'https://snapcloud.miosoft.com/miocon/app/login?_app=SnapCloud'
- // '192.168.2.108:8087/miocon/app/login?_app=SnapCloud'
+ //'192.168.2.108:8087/miocon/app/login?_app=SnapCloud'
// 'localhost/miocon/app/login?_app=SnapCloud'
);
@@ -129,6 +129,7 @@ Cloud.prototype.getPublicProject = function (
// where the values are url-component encoded
// callBack is a single argument function, errorCall take two args
var request = new XMLHttpRequest(),
+ responseList,
myself = this;
try {
request.open(
@@ -153,10 +154,12 @@ Cloud.prototype.getPublicProject = function (
request.responseText
);
} else {
+ responseList = myself.parseResponse(
+ request.responseText
+ );
callBack.call(
null,
- request.responseText,
- 'Published Project'
+ responseList[0].SourceCode
);
}
} else {
diff --git a/gui.js b/gui.js
index 6e18060..b886f96 100644
--- a/gui.js
+++ b/gui.js
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-April-04';
+modules.gui = '2013-April-08';
// Declarations
@@ -246,11 +246,24 @@ IDE_Morph.prototype.openIn = function (world) {
this.toggleAppMode(true);
this.runScripts();
} else if (location.hash.substr(0, 9) === '#present:') {
+ myself.showMessage('Fetching project\nfrom the cloud...');
SnapCloud.getPublicProject(
location.hash.substr(9),
function (projectData) {
- myself.rawOpenProjectString(projectData);
- myself.toggleAppMode(true);
+ var msg;
+ myself.nextSteps([
+ function () {
+ msg = myself.showMessage('Opening project...');
+ },
+ function () {
+ myself.rawOpenCloudDataString(projectData);
+ },
+ function () {
+ msg.destroy();
+ myself.toggleAppMode(true);
+ myself.runScripts();
+ }
+ ]);
},
this.cloudError()
);
diff --git a/history.txt b/history.txt
index a7d86f7..3cee62b 100755
--- a/history.txt
+++ b/history.txt
@@ -1589,3 +1589,7 @@ ______
130405
------
* renaming variable blobs now features a drop-down with reachable variable names and a picture of the block to be renamed
+
+130408
+------
+* Cloud, GUI: Sharing / Unsharing projects finalization \ No newline at end of file