- Fix auto save.

- Fix error trying to remove a node that contains a icons
- Fix auto-save leaving the page.
This commit is contained in:
Paulo Veiga
2011-11-29 00:38:11 -03:00
parent c598c1837e
commit 81f9ffa5e9
5 changed files with 192 additions and 183 deletions

View File

@@ -18,7 +18,7 @@
mindplot.commands.DeleteCommand = new Class({
Extends:mindplot.Command,
initialize: function(topicIds,relIds) {
initialize: function(topicIds, relIds) {
this._relIds = relIds;
this._topicIds = topicIds;
this._deletedTopicModels = [];
@@ -32,9 +32,9 @@ mindplot.commands.DeleteCommand = new Class({
if (topics.length > 0) {
topics.forEach(
function(topic, index) {
var model = topic.getModel().clone();
var model = topic.getModel();
//delete relationships
// Delete relationships
var relationships = topic.getRelationships();
while (relationships.length > 0) {
var relationship = relationships[0];
@@ -68,6 +68,7 @@ mindplot.commands.DeleteCommand = new Class({
}.bind(this));
}
},
undoExecute: function(commandContext) {
var topics = commandContext.findTopics(this._topicIds);