X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/bd2f4130a81e68a2bb3c8d88448540ec60fe7be5..b52915c178ae1242b1258b810134212c9e724e0a:/platforma/static/js/models.js diff --git a/platforma/static/js/models.js b/platforma/static/js/models.js index d1486402..f945238d 100644 --- a/platforma/static/js/models.js +++ b/platforma/static/js/models.js @@ -246,8 +246,8 @@ Editor.HTMLModel = Editor.Model.extend({ data: { revision: this.get('revision'), user: this.document.get('user'), - chunk: path, - format: 'nl' + chunk: path + // format: 'nl' }, success: function(data) { self.xmlParts[path] = data; @@ -268,7 +268,7 @@ Editor.HTMLModel = Editor.Model.extend({ var path = elem.attr('wl2o:path'); this.xmlParts[path] = data; - this.set('state', 'unsynced'); + this.set('state', 'dirty'); /* re-render the changed fragment */ $.ajax({ @@ -277,11 +277,11 @@ Editor.HTMLModel = Editor.Model.extend({ dataType: 'text; charset=utf-8', data: { fragment: data, - chunk: path, - format: 'nl' + chunk: path + // format: 'nl' }, success: function(htmldata) { - elem.replaceWith(htmldata); + elem.html(htmldata); self.set('state', 'dirty'); } });