getXMLPart: function(elem, callback)
{
- var path = elem.attr('wl2o:path');
+ var path = elem.attr('x-pointer');
if(!this.xmlParts[path])
this.loadXMLPart(elem, callback);
else
loadXMLPart: function(elem, callback)
{
- var path = elem.attr('wl2o:path');
+ var path = elem.attr('x-pointer');
var self = this;
$.ajax({
});
},
- putXMLPart: function(elem, data) {
+ putXMLPart: function(elem, data, callback) {
var self = this;
- var path = elem.attr('wl2o:path');
+ var path = elem.attr('x-pointer');
this.xmlParts[path] = data;
this.set('state', 'dirty');
// format: 'nl'
},
success: function(htmldata) {
- elem.html(htmldata);
+ callback(elem, htmldata);
self.set('state', 'dirty');
}
});
revision: this.get('revision'),
user: this.get('user')
},
- complete: this.updateCompleted.bind(this),
+ complete: this.updateCompleted.bind(this)
});
},
mergeCompleted: function(xhr, textStatus) {
console.log(xhr.status, xhr.responseText);
var response = parseXHRResponse(xhr);
- if(response.success)
- {
- if( (response.data.result == 'no-op')
- || (response.data.shared_timestamp == response.data.shared_parent_timestamp))
+
+ if(response.success) {
+
+ if( (response.data.result == 'no-op') ||
+ ( response.data.shared_parent_timestamp
+ && response.data.shared_timestamp
+ && (response.data.shared_timestamp == response.data.shared_parent_timestamp)) )
{
if( (response.data.revision) && (response.data.revision != this.get('revision')) )
{