diff --git a/ugj_blocks.js b/blocks.js
similarity index 100%
rename from ugj_blocks.js
rename to blocks.js
diff --git a/index_elutil.js b/elutil.js
similarity index 100%
rename from index_elutil.js
rename to elutil.js
diff --git a/index.html b/index.html
index ec014bb..fdf6d32 100644
--- a/index.html
+++ b/index.html
@@ -1034,9 +1034,9 @@
-
-
-
+
+
+
diff --git a/blocks/custom-dialog.js b/lib/custom-dialog.js
similarity index 93%
rename from blocks/custom-dialog.js
rename to lib/custom-dialog.js
index 04793e3..f69c8cb 100644
--- a/blocks/custom-dialog.js
+++ b/lib/custom-dialog.js
@@ -13,7 +13,7 @@
*/
CustomDialog = {};
-/** Override Blockly.dialog.alert() with custom implementation. */
+/** Override Blockly.dialog.setAlert() with custom implementation. */
Blockly.dialog.setAlert(function(message, callback) {
console.log('Alert: ' + message);
CustomDialog.show('Alert', message, {
@@ -21,7 +21,7 @@ Blockly.dialog.setAlert(function(message, callback) {
});
});
-/** Override Blockly.dialog.confirm() with custom implementation. */
+/** Override Blockly.dialog.setConfirm() with custom implementation. */
Blockly.dialog.setConfirm(function(message, callback) {
console.log('Confirm: ' + message);
CustomDialog.show('Confirm', message, {
@@ -36,7 +36,7 @@ Blockly.dialog.setConfirm(function(message, callback) {
});
});
-/** Override Blockly.dialog.prompt() with custom implementation. */
+/** Override Blockly.dialog.setPrompt() with custom implementation. */
Blockly.dialog.setPrompt(function(message, defaultValue, callback) {
console.log('Prompt: ' + message);
CustomDialog.show('Prompt', message, {
@@ -48,7 +48,7 @@ Blockly.dialog.setPrompt(function(message, defaultValue, callback) {
showCancel: true,
onCancel: function() {
callback(null);
- }
+ },
});
CustomDialog.inputField.value = defaultValue;
});
@@ -133,11 +133,11 @@ CustomDialog.show = function(title, message, options) {
dialogInput.focus();
dialogInput.onkeyup = function(event) {
- if (event.keyCode === 13) {
+ if (event.keyCode == 13) {
// Process as OK when user hits enter.
onOkay();
return false;
- } else if (event.keyCode === 27) {
+ } else if (event.keyCode == 27) {
// Process as cancel when user hits esc.
onCancel();
return false;