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);
ide.saveCanvasAs(
this.topBlock().scriptPic(),
this.projectName + ' ' + localize('script pic'),
ide.projectName + ' ' + localize('script pic'),
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) {
// 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;
// saveXMLAs(x, x, true) tries to open a new tab.
if (name) {
this.setProjectName(name);
dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,';
@ -3029,7 +3030,7 @@ IDE_Morph.prototype.exportProject = function (name, newWindow, plain) {
menu = this.showMessage('Exporting');
str = this.serializer.serialize(this.stage)
this.setURL('#open:' + dataPrefix + encodeURIComponent(str));
this.saveXMLAs(str, name, true);
this.saveXMLAs(str, name, newWindow);
menu.destroy();
this.showMessage('Exported!', 1);
}

Wyświetl plik

@ -143,7 +143,7 @@ SnapTranslator.dict.en = {
'It has been saved to your browser\'s downloads folder.',
'unable to export text':
'This item could not be exported from Snap!.\n' +
'It\'s like that your project may contain a lot of media ' +
'It\'s like that your project may contain a lot of media ' +
'(sounds and images) or that you are using an older browser.' +
'Please try using a recent version of Chrome, Firefox, or Safari.'
};