removing .bind mootools call (phase 1/2)

This commit is contained in:
Ezequiel Bergamaschi
2014-07-06 01:15:34 -03:00
parent 3655df6cb8
commit f2b0eb74ea
17 changed files with 126 additions and 120 deletions

View File

@@ -27,11 +27,11 @@ mindplot.widget.IMenu = new Class({
this._containerId = containerId;
this._mapId = mapId;
this._mindmapUpdated = false;
var me = this;
// Register update events ...
this._designer.addEvent('modelUpdate', function () {
this.setRequireChange(true);
}.bind(this));
me.setRequireChange(true);
});
},
clear:function () {

View File

@@ -55,9 +55,9 @@ mindplot.widget.IconPanel = new Class({
var panel = this;
var model = this.getModel();
img.on('click', function (event) {
model.setValue(this.attr('id'));
model.setValue($(this).attr('id'));
panel.hide();
}.bind(img));
});
count = count + 1;
}

View File

@@ -22,15 +22,11 @@ mindplot.widget.ToolbarPaneItem = new Class({
$assert(buttonId, "buttonId can not be null");
$assert(model, "model can not be null");
this._model = model;
var me = this;
var fn = function() {
// Is the panel being displayed ?
if (this.isVisible()) {
this.hide();
} else {
this.show();
}
}.bind(this);
me.isVisible() ? me.hide() : me.show();
};
this.parent(buttonId, fn, {topicAction:true,relAction:false});
this._panelElem = this._init();
this._visible = false;