fixing bugs in shortcuts and modal dialog with errors

This commit is contained in:
Ezequiel Bergamaschi 2014-12-26 20:01:15 -03:00
parent 8a0194c26c
commit bfd00c9649
3 changed files with 27 additions and 2 deletions

View File

@ -266,7 +266,7 @@ mindplot.DesignerKeyboard = new Class({
// If a modifier is press, the key selected must be ignored.
var pressKey = String.fromCharCode(keyCode);
if (event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) {
pressKey = "";
return;
}
nodes[0].showTextEditor(pressKey);
event.stopPropagation();

View File

@ -92,7 +92,6 @@ var BootstrapDialog = new Class({
setContent: function(content) {
var modalBody = this._native.find('.modal-body');
modalBody.empty();
modalBody.append(content);
},

View File

@ -44,6 +44,22 @@
}
return typeof i;
};
this.instanceOf = function (t, i) {
if (t == null) {
return false;
}
var s = t.$constructor || t.constructor;
while (s) {
if (s === i) {
return true;
}
s = s.parent;
}
if (!t.hasOwnProperty) {
return false;
}
return t instanceof i;
};
var f = this.Function;
var p = true;
for (var k in {toString: 1}) {
@ -232,6 +248,16 @@
return this;
}
});
var l = function (i) {
switch (o(i)) {
case"array":
return i.clone();
case"object":
return Object.clone(i);
default:
return i;
}
};
Array.implement("clone", function () {
var s = this.length, t = new Array(s);
while (s--) {