Remove UserAgent class. Use mootools.

This commit is contained in:
Paulo Veiga
2011-08-09 02:27:59 -03:00
parent 7d9af403fe
commit fb24d7c9a5
6 changed files with 6 additions and 142 deletions

View File

@@ -159,7 +159,7 @@ mindplot.MindmapDesigner = new Class({
var selectableObjects = this.getSelectedObjects();
// Disable all nodes on focus but not the current if Ctrl key isn't being pressed
if (!$defined(event) || event.ctrlKey == false) {
if (!$defined(event) || (event.ctrlKey == false && event.metaKey == false)) {
selectableObjects.forEach(function(selectableObject) {
if (selectableObject.isOnFocus() && selectableObject != currentObject) {
selectableObject.setOnFocus(false);
@@ -333,7 +333,7 @@ mindplot.MindmapDesigner = new Class({
this._actionRunner.markAsChangeBase();
},
loadFromCollaborativeModel: function(collaborationManager){
loadFromCollaborativeModel: function(collaborationManager) {
var mindmap = collaborationManager.buildWiseModel();
this._loadMap(1, mindmap);
@@ -745,7 +745,7 @@ mindplot.MindmapDesigner = new Class({
dialog.adopt(msg).show();
// IE doesn't like too much this focus action...
if (!core.UserAgent.isIE()) {
if (!Browser.ie) {
urlInput.focus();
}
}

View File

@@ -171,7 +171,7 @@ mindplot.Workspace = new Class({
workspace.setCoordOrigin(coordOriginX, coordOriginY);
// Change cursor.
if (core.UserAgent.isMozillaFamily()) {
if (Browser.firefox) {
window.document.body.style.cursor = "-moz-grabbing";
} else {
window.document.body.style.cursor = "move";

View File

@@ -98,7 +98,7 @@ TestCase("Mindplot test",{
var fireNativeEvent = function(type, target, position){
var event;
if(core.UserAgent.isIE()){
if(Browser.ie){
event = document.createEventObject();
event.screenX = position.x;
event.screenY = position.y;

View File

@@ -24,7 +24,7 @@
console.log("value:" + value);
}
};
var palette = new mindplot.widget.ColorPalette('myButton', model,"/mindplot/src/main/javascript/widget");
var palette = new mindplot.widget.ColorPalettePanel('myButton', model,"/mindplot/src/main/javascript/widget");
});
</script>