Import works now on the server side

This commit is contained in:
Peter 'Pita' Martischka 2011-07-21 20:13:58 +01:00
parent 4b268f9579
commit b13fbbfd73
7 changed files with 235 additions and 76 deletions

View file

@ -191,6 +191,20 @@ Class('Pad', {
return this.atext.text;
},
setText : function(newText)
{
//clean the new text
newText = exports.cleanText(newText);
var oldText = this.text();
//create the changeset
var changeset = Changeset.makeSplice(oldText, 0, oldText.length-1, newText);
//append the changeset
this.appendRevision(changeset);
},
appendChatMessage: function(text, userId, time)
{
this.chatHead++;