diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js
index 180ed9f9..2a7f263d 100644
--- a/mindplot/src/main/javascript/Designer.js
+++ b/mindplot/src/main/javascript/Designer.js
@@ -86,7 +86,7 @@ mindplot.Designer = new Class({
$(document).bind('mousewheel', function (event) {
// Change mousewheel handling so we let the default
//event happen if we are outside the container.
- var coords = screenManager.getContainer().getCoordinates();
+ var coords = screenManager.getContainer()[0].getCoordinates();
var isOutsideContainer = event.client.y < coords.top ||
event.client.y > coords.bottom ||
event.client.x < coords.left ||
diff --git a/mindplot/src/main/javascript/widget/FontFamilyPanel.js b/mindplot/src/main/javascript/widget/FontFamilyPanel.js
index 263dfd62..ec05921a 100644
--- a/mindplot/src/main/javascript/widget/FontFamilyPanel.js
+++ b/mindplot/src/main/javascript/widget/FontFamilyPanel.js
@@ -24,7 +24,7 @@ mindplot.widget.FontFamilyPanel = new Class({
buildPanel: function() {
- var content = new Element("div", {'class':'toolbarPanel','id':'fontFamilyPanel'});
+ var content = $("
");
content.innerHTML = '' +
'Times
' +
'Arial
' +
diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js
index c52c9bb8..4f677fc5 100644
--- a/mindplot/src/main/javascript/widget/Menu.js
+++ b/mindplot/src/main/javascript/widget/Menu.js
@@ -26,7 +26,7 @@ mindplot.widget.Menu = new Class({
var widgetsBaseUrl = baseUrl + "css/widget";
// Stop event propagation ...
- $('#'+this._containerId).addEvent('click', function (event) {
+ $('#'+this._containerId).bind('click', function (event) {
event.stopPropagation();
return false;
});
@@ -416,7 +416,7 @@ mindplot.widget.Menu = new Class({
var keyboardShortcut = $('#keyboardShortcuts');
if (keyboardShortcut) {
- keyboardShortcut.addEvent('click', function (event) {
+ keyboardShortcut.bind('click', function (event) {
var reqDialog = new MooDialog.Request('c/keyboard', null,
{'class': 'modalDialog keyboardModalDialog',
closeButton: true,
@@ -441,7 +441,7 @@ mindplot.widget.Menu = new Class({
var left = (screen.width / 2) - (width / 2);
var top = (screen.height / 2) - (height / 2);
- videoElem.addEvent('click', function (event) {
+ videoElem.bind('click', function (event) {
window.open("https://www.youtube.com/tv?vq=medium#/watch?v=rKxZwNKs9cE", "_blank", 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left);
event.preventDefault();
});
diff --git a/mindplot/src/main/javascript/widget/ToolbarItem.js b/mindplot/src/main/javascript/widget/ToolbarItem.js
index de1db4e8..cfb87adc 100644
--- a/mindplot/src/main/javascript/widget/ToolbarItem.js
+++ b/mindplot/src/main/javascript/widget/ToolbarItem.js
@@ -50,7 +50,7 @@ mindplot.widget.ToolbarItem = new Class({
},
getButtonElem : function() {
- var elem = document.id(this._buttonId);
+ var elem = $('#'+this._buttonId);
$assert(elem, "Could not find element for " + this._buttonId);
return elem;
}.protect(),
@@ -78,7 +78,7 @@ mindplot.widget.ToolbarItem = new Class({
disable : function() {
var elem = this.getButtonElem();
if (this._enable) {
- elem.removeEvent('click', this._fn);
+ elem.unbind('click', this._fn);
elem.removeClass('buttonOn');
elem.addClass('buttonOff');
this._enable = false;
@@ -88,7 +88,7 @@ mindplot.widget.ToolbarItem = new Class({
enable : function() {
var elem = this.getButtonElem();
if (!this._enable) {
- elem.addEvent('click', this._fn);
+ elem.bind('click', this._fn);
elem.removeClass('buttonOff');
elem.addClass('buttonOn');
this._enable = true;
diff --git a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js
index 287cedfe..2568bd52 100644
--- a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js
+++ b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js
@@ -39,7 +39,7 @@ mindplot.widget.ToolbarPaneItem = new Class({
_init:function () {
// Load the context of the panel ...
var panelElem = this.buildPanel();
- panelElem.setStyle('cursor', 'default');
+ panelElem.css('cursor', 'default');
var buttonElem = this.getButtonElem();
var item = this;
@@ -65,11 +65,11 @@ mindplot.widget.ToolbarPaneItem = new Class({
offset: {x:-4,y:0}
});
- this._tip.addEvent('hide', function() {
+ this._tip.bind('hide', function() {
this._visible = false
}.bind(this));
- this._tip.addEvent('show', function() {
+ this._tip.bind('show', function() {
this._visible = true
}.bind(this));
@@ -108,7 +108,7 @@ mindplot.widget.ToolbarPaneItem = new Class({
this.hide();
var elem = this.getButtonElem();
if (this._enable) {
- elem.removeEvent('click', this._fn);
+ elem.unbind('click', this._fn);
elem.removeClass('buttonExtOn');
// Todo: Hack...
@@ -122,7 +122,7 @@ mindplot.widget.ToolbarPaneItem = new Class({
enable : function() {
var elem = this.getButtonElem();
if (!this._enable) {
- elem.addEvent('click', this._fn);
+ elem.bind('click', this._fn);
elem.removeClass('buttonExtOff');
elem.addClass('buttonExtOn');
this._enable = true;