diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-07-23 14:28:31 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-07-23 14:28:31 +0200 |
| commit | 29b5dba84e8f3aa95a3b9296d5a01a2609f4590d (patch) | |
| tree | 4ec090b68a695c6ba6d7bc26b6362519b485a0ba /byob.js | |
| parent | 526a595c5e00f171eb814f063e58a6c18c5784d4 (diff) | |
| parent | 5aec52889d79a8257971095719195fabcbc33559 (diff) | |
| download | snap-gh-pages.tar.gz snap-gh-pages.zip | |
merge developmentgh-pages
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -106,7 +106,7 @@ SymbolMorph, isNil*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2015-March-02'; +modules.byob = '2015-June-25'; // Declarations @@ -2049,7 +2049,13 @@ BlockLabelFragment.prototype.defTemplateSpecFragment = function () { )) { suff = ' \u03BB'; } else if (this.defaultValue) { - suff = ' = ' + this.defaultValue.toString(); + if (this.type === '%n') { + suff = ' # = ' + this.defaultValue.toString(); + } else { // 'any' or 'text' + suff = ' = ' + this.defaultValue.toString(); + } + } else if (this.type === '%n') { + suff = ' #'; } return this.labelString + suff; }; @@ -3291,15 +3297,17 @@ BlockExportDialogMorph.prototype.selectNone = function () { // BlockExportDialogMorph ops BlockExportDialogMorph.prototype.exportBlocks = function () { - var str = this.serializer.serialize(this.blocks); + var str = encodeURIComponent( + this.serializer.serialize(this.blocks) + ); if (this.blocks.length > 0) { - window.open(encodeURI('data:text/xml,<blocks app="' + window.open('data:text/xml,<blocks app="' + this.serializer.app + '" version="' + this.serializer.version + '">' + str - + '</blocks>')); + + '</blocks>'); } else { new DialogBoxMorph().inform( 'Export blocks', |
