});
},
- putXMLPart: function(elem, data) {
+ putXMLPart: function(elem, data, callback) {
var self = this;
var path = elem.attr('x-pointer');
// 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')) )
{