replacing old .each mootools' method by _.each

This commit is contained in:
Ezequiel Bergamaschi
2014-03-17 00:36:29 -03:00
parent a0e3c74921
commit 2ab488bfa6
26 changed files with 63 additions and 62 deletions

View File

@@ -29,7 +29,7 @@ mindplot.commands.AddTopicCommand = new Class({
execute:function (commandContext) {
this._models.each(function (model, index) {
_.each(this._models, function (model, index) {
// Add a new topic ...
var topic = commandContext.createTopic(model);
@@ -59,12 +59,12 @@ mindplot.commands.AddTopicCommand = new Class({
undoExecute:function (commandContext) {
// Delete disconnected the nodes. Create a copy of the topics ...
var clonedModel = [];
this._models.each(function (model) {
_.each(this._models, function (model) {
clonedModel.push(model.clone());
});
// Finally, remove the nodes ...
this._models.each(function (model) {
_.each(this._models, function (model) {
var topicId = model.getId();
var topic = commandContext.findTopics(topicId)[0];