adding collaborative node text edition

This commit is contained in:
Pablol
2011-08-07 21:13:20 -03:00
parent 18dfd82c1d
commit ff8cf207ca
5 changed files with 52 additions and 4 deletions

View File

@@ -20,6 +20,21 @@ mindplot.BrixActionDispatcher = new Class({
Extends: mindplot.ActionDispatcher,
initialize: function(commandContext, fireOnChange) {
this.parent(commandContext, fireOnChange);
this._commandContext = commandContext;
this._actionDispatcher = new mindplot.LocalActionDispatcher(commandContext);
},
changeTextOnTopic : function(topicsIds, text) {
var framework=$wise_collaborationManager.getCollaborativeFramework();
if (!(topicsIds instanceof Array)) {
topicsIds = [topicsIds];
}
var topic = framework.getTopic(topicsIds[0]);
var callback = function(event, topic){
topic.getBrixModel().removeListener("valueChanged", callback);
this._actionDispatcher.changeTextOnTopic(topic.getId(),event.getNewValue());
}.bindWithEvent(this,topic);
topic.setText(text, true, callback);
}
});