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 8c807398a4
commit 5ca5a93eb3
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. // If a modifier is press, the key selected must be ignored.
var pressKey = String.fromCharCode(keyCode); var pressKey = String.fromCharCode(keyCode);
if (event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) { if (event.ctrlKey || event.altKey || event.metaKey || event.shiftKey) {
pressKey = ""; return;
} }
nodes[0].showTextEditor(pressKey); nodes[0].showTextEditor(pressKey);
event.stopPropagation(); event.stopPropagation();

View File

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

View File

@ -44,6 +44,22 @@
} }
return typeof i; 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 f = this.Function;
var p = true; var p = true;
for (var k in {toString: 1}) { for (var k in {toString: 1}) {
@ -232,6 +248,16 @@
return this; 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 () { Array.implement("clone", function () {
var s = this.length, t = new Array(s); var s = this.length, t = new Array(s);
while (s--) { while (s--) {