diff --git a/HISTORY.md b/HISTORY.md index b5ca22bb..a9a688ab 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -45,6 +45,7 @@ ### 2019-03-04 * GUI: deprecated storing projects in localStorage +* GUI: reenabled publish / unpublish buttons in the project dialog ### 2019-02-26 * Symbols: new "globe" symbol diff --git a/src/gui.js b/src/gui.js index 203e0e3b..c0f8efbc 100644 --- a/src/gui.js +++ b/src/gui.js @@ -5982,6 +5982,8 @@ ProjectDialogMorph.prototype.init = function (ide, task) { this.deleteButton = null; this.shareButton = null; this.unshareButton = null; + this.publishButton = null; + this.unpublishButton = null; this.recoverButton = null; // initialize inherited properties: @@ -6134,12 +6136,10 @@ ProjectDialogMorph.prototype.buildContents = function () { this.unshareButton = this.addButton('unshareProject', 'Unshare'); this.shareButton.hide(); this.unshareButton.hide(); - /* this.publishButton = this.addButton('publishProject', 'Publish'); this.unpublishButton = this.addButton('unpublishProject', 'Unpublish'); this.publishButton.hide(); this.unpublishButton.hide(); - */ this.deleteButton = this.addButton('deleteProject', 'Delete'); this.addButton('cancel', 'Cancel'); @@ -6435,10 +6435,8 @@ ProjectDialogMorph.prototype.setSource = function (source) { this.recoverButton.hide(); } - /* this.publishButton.hide(); this.unpublishButton.hide(); - */ if (this.source === 'local') { this.deleteButton.show(); } else { // examples @@ -6547,7 +6545,6 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) { if (item.ispublic) { myself.shareButton.hide(); myself.unshareButton.show(); - /* if (item.ispublished) { myself.publishButton.hide(); myself.unpublishButton.show(); @@ -6555,14 +6552,11 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) { myself.publishButton.show(); myself.unpublishButton.hide(); } - */ } else { myself.unshareButton.hide(); myself.shareButton.show(); - /* myself.publishButton.hide(); myself.unpublishButton.hide(); - */ } myself.buttons.fixLayout(); myself.fixLayout(); @@ -6763,10 +6757,8 @@ ProjectDialogMorph.prototype.shareProject = function () { proj.ispublic = true; myself.unshareButton.show(); myself.shareButton.hide(); - /* myself.publishButton.show(); myself.unpublishButton.hide(); - */ entry.label.isBold = true; entry.label.drawNew(); entry.label.changed(); @@ -6812,10 +6804,8 @@ ProjectDialogMorph.prototype.unshareProject = function () { proj.ispublic = false; myself.shareButton.show(); myself.unshareButton.hide(); - /* myself.publishButton.hide(); myself.unpublishButton.hide(); - */ entry.label.isBold = false; entry.label.isItalic = false; entry.label.drawNew();