summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-12 15:03:36 +0200
committerjmoenig <jens@moenig.org>2013-04-12 15:03:36 +0200
commit15718f44a30a022a5f45001f3fd2d506da504ff1 (patch)
tree7834d447a3a56821db1ee37deb7769c2ff05d5a4
parent53a918175a5bfacf4c974a2e3defc4be165ae515 (diff)
downloadsnap-byow-15718f44a30a022a5f45001f3fd2d506da504ff1.tar.gz
snap-byow-15718f44a30a022a5f45001f3fd2d506da504ff1.zip
Sharing / Unsharing / Deleting in every Project Dialog
not just in the "open project" dialog, but also in the "save as" version
-rw-r--r--gui.js56
-rwxr-xr-xhistory.txt1
2 files changed, 26 insertions, 31 deletions
diff --git a/gui.js b/gui.js
index d66184f..d4320f2 100644
--- a/gui.js
+++ b/gui.js
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-April-11';
+modules.gui = '2013-April-12';
// Declarations
@@ -3558,18 +3558,16 @@ ProjectDialogMorph.prototype.buildContents = function () {
if (this.task === 'open') {
this.addButton('openProject', 'Open');
-
- this.shareButton = this.addButton('shareProject', 'Share');
- this.unshareButton = this.addButton('unshareProject', 'Unshare');
- this.shareButton.hide();
- this.unshareButton.hide();
-
- this.deleteButton = this.addButton('deleteProject', 'Delete');
this.action = 'openProject';
} else { // 'save'
this.addButton('saveProject', 'Save');
this.action = 'saveProject';
}
+ this.shareButton = this.addButton('shareProject', 'Share');
+ this.unshareButton = this.addButton('unshareProject', 'Unshare');
+ this.shareButton.hide();
+ this.unshareButton.hide();
+ this.deleteButton = this.addButton('deleteProject', 'Delete');
this.addButton('cancel', 'Cancel');
if (notification) {
@@ -3791,19 +3789,17 @@ ProjectDialogMorph.prototype.setSource = function (source) {
}
this.body.add(this.listField);
- if (this.task === 'open') {
- if (this.source === 'cloud') {
- this.shareButton.show();
- this.unshareButton.hide();
+ if (this.source === 'cloud') {
+ this.shareButton.show();
+ this.unshareButton.hide();
+ this.deleteButton.show();
+ } else {
+ this.shareButton.hide();
+ this.unshareButton.hide();
+ if (this.source === 'local') {
this.deleteButton.show();
- } else {
- this.shareButton.hide();
- this.unshareButton.hide();
- if (this.source === 'local') {
- this.deleteButton.show();
- } else { // examples
- this.deleteButton.hide();
- }
+ } else { // examples
+ this.deleteButton.hide();
}
}
this.buttons.fixLayout();
@@ -3877,16 +3873,16 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) {
myself.preview.texture = item.Thumbnail || null;
myself.preview.cachedTexture = null;
myself.preview.drawNew();
- if (item.Public === 'true') {
- myself.shareButton.hide();
- myself.unshareButton.show();
- } else {
- myself.unshareButton.hide();
- myself.shareButton.show();
- }
- myself.buttons.fixLayout();
- myself.fixLayout();
}
+ if (item.Public === 'true') {
+ myself.shareButton.hide();
+ myself.unshareButton.show();
+ } else {
+ myself.unshareButton.hide();
+ myself.shareButton.show();
+ }
+ myself.buttons.fixLayout();
+ myself.fixLayout();
myself.edit();
};
this.body.add(this.listField);
@@ -4102,7 +4098,6 @@ ProjectDialogMorph.prototype.shareProject = function () {
entry.label.isBold = true;
entry.label.drawNew();
entry.label.changed();
- myself.listField.select(proj, entry);
myself.ide.showMessage('shared.', 2);
},
myself.ide.cloudError(),
@@ -4140,7 +4135,6 @@ ProjectDialogMorph.prototype.unshareProject = function () {
entry.label.isBold = false;
entry.label.drawNew();
entry.label.changed();
- myself.listField.select(proj, entry);
myself.ide.showMessage('unshared.', 2);
},
myself.ide.cloudError(),
diff --git a/history.txt b/history.txt
index 4d75371..3654307 100755
--- a/history.txt
+++ b/history.txt
@@ -1622,3 +1622,4 @@ ______
------
* Lists: fix for typecasting bug in CONTAINS
* BYOB: Tooltips for custom block templates (sitting in the palette): mousing over a custom block in the palette pops up its definition hat comment in a comment-colored speech bubble
+* GUI: Sharing/Unsharing/Deleting now available in all version of the project dialog