Merge branch 'master' of git@stigma:platforma
[redakcja.git] / platforma / static / js / models.js
index 7fdca39..ba2f3ce 100755 (executable)
@@ -262,7 +262,7 @@ Editor.HTMLModel = Editor.Model.extend({
         });
     },
 
         });
     },
 
-    putXMLPart: function(elem, data) {
+    putXMLPart: function(elem, data, callback) {
         var self = this;
       
         var path = elem.attr('x-pointer');
         var self = this;
       
         var path = elem.attr('x-pointer');
@@ -281,7 +281,7 @@ Editor.HTMLModel = Editor.Model.extend({
                 // format: 'nl'
             },
             success: function(htmldata) {
                 // format: 'nl'
             },
             success: function(htmldata) {
-                elem.html(htmldata);
+                callback(elem, htmldata);
                 self.set('state', 'dirty');
             }
         });
                 self.set('state', 'dirty');
             }
         });