Some code cleanup and variable name fix

dev
Michael Ball 2015-11-17 02:42:17 -08:00
rodzic e1e73d8feb
commit 396be20b18
3 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -769,7 +769,7 @@ CustomCommandBlockMorph.prototype.userMenu = function () {
var ide = this.parentThatIsA(IDE_Morph); var ide = this.parentThatIsA(IDE_Morph);
ide.saveCanvasAs( ide.saveCanvasAs(
this.topBlock().scriptPic(), this.topBlock().scriptPic(),
this.projectName + ' ' + localize('script pic'), ide.projectName + ' ' + localize('script pic'),
true // request opening a new window true // request opening a new window
); );
}, },

9
gui.js
Wyświetl plik

@ -3006,11 +3006,12 @@ IDE_Morph.prototype.rawSaveProject = function (name) {
} }
}; };
// Export project XML, newWindow opens a new tab if true
// This is used both for "Save to Disk" and "Export project..."
IDE_Morph.prototype.exportProject = function (name, newWindow, plain) { IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
// Export project XML, newWindow opens a new tab if true
// This is used both for "Save to Disk" and "Export project..."
var menu, str, dataPrefix; var menu, str, dataPrefix;
// saveXMLAs(x, x, true) tries to open a new tab.
if (name) { if (name) {
this.setProjectName(name); this.setProjectName(name);
dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,'; dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,';
@ -3029,7 +3030,7 @@ IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
menu = this.showMessage('Exporting'); menu = this.showMessage('Exporting');
str = this.serializer.serialize(this.stage) str = this.serializer.serialize(this.stage)
this.setURL('#open:' + dataPrefix + encodeURIComponent(str)); this.setURL('#open:' + dataPrefix + encodeURIComponent(str));
this.saveXMLAs(str, name, true); this.saveXMLAs(str, name, newWindow);
menu.destroy(); menu.destroy();
this.showMessage('Exported!', 1); this.showMessage('Exported!', 1);
} }