kopia lustrzana https://github.com/backface/turtlestitch
Sharing / Unsharing projects finalization
rodzic
a4037b57c1
commit
d022d718fb
11
cloud.js
11
cloud.js
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
|
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
|
||||||
|
|
||||||
modules.cloud = '2013-April-04';
|
modules.cloud = '2013-April-08';
|
||||||
|
|
||||||
// Global stuff
|
// Global stuff
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ var Cloud;
|
||||||
|
|
||||||
var SnapCloud = new Cloud(
|
var SnapCloud = new Cloud(
|
||||||
'https://snapcloud.miosoft.com/miocon/app/login?_app=SnapCloud'
|
'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'
|
// 'localhost/miocon/app/login?_app=SnapCloud'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -129,6 +129,7 @@ Cloud.prototype.getPublicProject = function (
|
||||||
// where the values are url-component encoded
|
// where the values are url-component encoded
|
||||||
// callBack is a single argument function, errorCall take two args
|
// callBack is a single argument function, errorCall take two args
|
||||||
var request = new XMLHttpRequest(),
|
var request = new XMLHttpRequest(),
|
||||||
|
responseList,
|
||||||
myself = this;
|
myself = this;
|
||||||
try {
|
try {
|
||||||
request.open(
|
request.open(
|
||||||
|
@ -153,10 +154,12 @@ Cloud.prototype.getPublicProject = function (
|
||||||
request.responseText
|
request.responseText
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
responseList = myself.parseResponse(
|
||||||
|
request.responseText
|
||||||
|
);
|
||||||
callBack.call(
|
callBack.call(
|
||||||
null,
|
null,
|
||||||
request.responseText,
|
responseList[0].SourceCode
|
||||||
'Published Project'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
19
gui.js
19
gui.js
|
@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.gui = '2013-April-04';
|
modules.gui = '2013-April-08';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -246,11 +246,24 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
this.toggleAppMode(true);
|
this.toggleAppMode(true);
|
||||||
this.runScripts();
|
this.runScripts();
|
||||||
} else if (location.hash.substr(0, 9) === '#present:') {
|
} else if (location.hash.substr(0, 9) === '#present:') {
|
||||||
|
myself.showMessage('Fetching project\nfrom the cloud...');
|
||||||
SnapCloud.getPublicProject(
|
SnapCloud.getPublicProject(
|
||||||
location.hash.substr(9),
|
location.hash.substr(9),
|
||||||
function (projectData) {
|
function (projectData) {
|
||||||
myself.rawOpenProjectString(projectData);
|
var msg;
|
||||||
myself.toggleAppMode(true);
|
myself.nextSteps([
|
||||||
|
function () {
|
||||||
|
msg = myself.showMessage('Opening project...');
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
myself.rawOpenCloudDataString(projectData);
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
msg.destroy();
|
||||||
|
myself.toggleAppMode(true);
|
||||||
|
myself.runScripts();
|
||||||
|
}
|
||||||
|
]);
|
||||||
},
|
},
|
||||||
this.cloudError()
|
this.cloudError()
|
||||||
);
|
);
|
||||||
|
|
|
@ -1589,3 +1589,7 @@ ______
|
||||||
130405
|
130405
|
||||||
------
|
------
|
||||||
* renaming variable blobs now features a drop-down with reachable variable names and a picture of the block to be renamed
|
* 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
|
Ładowanie…
Reference in New Issue