kopia lustrzana https://github.com/backface/turtlestitch
avoid nagbox in block dialog
rodzic
067d0b7bed
commit
a482871a9c
24
byob.js
24
byob.js
|
@ -108,7 +108,7 @@ WatcherMorph, Variable*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.byob = '2016-June-19';
|
modules.byob = '2016-July-04';
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
|
|
||||||
|
@ -1731,24 +1731,10 @@ BlockDialogMorph.prototype.fixLayout = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
BlockDialogMorph.prototype.accept = function () {
|
BlockDialogMorph.prototype.accept = function () {
|
||||||
var myself = this;
|
if ((this.body instanceof InputFieldMorph) &&
|
||||||
var hasName = true;
|
(this.normalizeSpaces(this.body.getValue()) === '')) {
|
||||||
|
this.edit();
|
||||||
this.children.forEach(
|
} else {
|
||||||
function (child) {
|
|
||||||
if (child instanceof InputFieldMorph &&
|
|
||||||
myself.getInput().spec === '') {
|
|
||||||
new DialogBoxMorph().inform(
|
|
||||||
'No name',
|
|
||||||
'Please give a name to this block',
|
|
||||||
myself.world()
|
|
||||||
);
|
|
||||||
hasName = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (hasName) {
|
|
||||||
BlockDialogMorph.uber.accept.call(this);
|
BlockDialogMorph.uber.accept.call(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Ładowanie…
Reference in New Issue