summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui.js52
-rwxr-xr-xhistory.txt1
2 files changed, 50 insertions, 3 deletions
diff --git a/gui.js b/gui.js
index 675c51a..3686c3b 100644
--- a/gui.js
+++ b/gui.js
@@ -267,8 +267,8 @@ IDE_Morph.prototype.openIn = function (world) {
myself.rawOpenCloudDataString(projectData);
},
function () {
- this.shield.destroy();
- this.shield = null;
+ myself.shield.destroy();
+ myself.shield = null;
msg.destroy();
myself.toggleAppMode(true);
myself.runScripts();
@@ -1694,7 +1694,6 @@ IDE_Morph.prototype.cloudMenu = function () {
null,
new Color(100, 0, 0)
);
- menu.addLine();
menu.addItem(
'export project as cloud data...',
function () {
@@ -1709,6 +1708,53 @@ IDE_Morph.prototype.cloudMenu = function () {
null,
new Color(100, 0, 0)
);
+ menu.addLine();
+ menu.addItem(
+ 'open shared project from cloud...',
+ function () {
+ myself.prompt('Author name…', function (usr) {
+ myself.prompt('Project name...', function (prj) {
+ var id = 'Username=' +
+ encodeURIComponent(usr) +
+ '&ProjectName=' +
+ encodeURIComponent(prj);
+ myself.showMessage(
+ 'Fetching project\nfrom the cloud...'
+ );
+ SnapCloud.getPublicProject(
+ id,
+ function (projectData) {
+ var msg;
+ if (!Process.prototype.isCatchingErrors) {
+ window.open(
+ 'data:text/xml,' + projectData
+ );
+ }
+ myself.nextSteps([
+ function () {
+ msg = myself.showMessage(
+ 'Opening project...'
+ );
+ },
+ function () {
+ myself.rawOpenCloudDataString(
+ projectData
+ );
+ },
+ function () {
+ msg.destroy();
+ }
+ ]);
+ },
+ myself.cloudError()
+ );
+
+ });
+ });
+ },
+ null,
+ new Color(100, 0, 0)
+ );
}
menu.popup(world, pos);
};
diff --git a/history.txt b/history.txt
index 370ec15..6637ee7 100755
--- a/history.txt
+++ b/history.txt
@@ -1606,3 +1606,4 @@ ______
* GUI: display shared project names bold typed in the project dialog
* GUI: Feedback msg when sharing / unsharing projects
* GUI: Shield (hide) IDE while opening a shared project for presentation
+* GUI: Support for debugging shared projects