summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-07-23 14:28:31 +0200
committerGubolin <gubolin@fantasymail.de>2015-07-23 14:28:31 +0200
commit29b5dba84e8f3aa95a3b9296d5a01a2609f4590d (patch)
tree4ec090b68a695c6ba6d7bc26b6362519b485a0ba /byob.js
parent526a595c5e00f171eb814f063e58a6c18c5784d4 (diff)
parent5aec52889d79a8257971095719195fabcbc33559 (diff)
downloadsnap-gh-pages.tar.gz
snap-gh-pages.zip
merge developmentgh-pages
Diffstat (limited to 'byob.js')
-rw-r--r--byob.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/byob.js b/byob.js
index c9f3daa..4c39872 100644
--- a/byob.js
+++ b/byob.js
@@ -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',