kopia lustrzana https://github.com/backface/turtlestitch
Bug fix to issue #1131: make a block checks for text when 'OK' is clicked
rodzic
7d268d63ac
commit
2fcd1709e9
12
byob.js
12
byob.js
|
@ -1744,6 +1744,18 @@ BlockDialogMorph.prototype.fixLayout = function () {
|
|||
}
|
||||
};
|
||||
|
||||
BlockDialogMorph.prototype.accept = function () {
|
||||
if (this.getInput().spec === '') {
|
||||
new DialogBoxMorph().inform(
|
||||
'No name',
|
||||
'Please give a name to this block',
|
||||
this.world()
|
||||
);
|
||||
} else {
|
||||
BlockDialogMorph.uber.accept.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
// BlockEditorMorph ////////////////////////////////////////////////////
|
||||
|
||||
// BlockEditorMorph inherits from DialogBoxMorph:
|
||||
|
|
Ładowanie…
Reference in New Issue