Commit 50d6fc2f authored by Tristan Cavelier's avatar Tristan Cavelier

Fix bug: solve conflict by removing document works correctly now

parent 7cbd4552
......@@ -8,7 +8,7 @@
</div>
<div class="row-fluid">
<div class="span12">
<button>Abort</button>
<button onclick="basic_conflict_solver.abort()">Abort</button>
</div>
</div>
</div>
......@@ -35,10 +35,13 @@ window.basic_conflict_solver = {
'<div>Removed</div>'+
'<div><button onclick="'+
//'console.log('+"'"+revision+"'"+');'+
"basic_conflict_solver.keepRevision('"+doc.revision+"');"+
"basic_conflict_solver.removeRevision();"+
'">Save this one</button></div><hr/>'+
'</div></div>';
},
removeRevision: function () {
OfficeJS.solveConflict(this.conflict_object);
},
keepRevision: function (revision) {
OfficeJS.solveConflict(
this.conflict_object,
......@@ -46,7 +49,7 @@ window.basic_conflict_solver = {
);
},
abort: function () {
// TODO :
OfficeJS.abortSolveConflict();
}
};
......
......@@ -245,8 +245,6 @@
error: function (error) {
var doc = {
path:param.conflict_object.path,
last_modified:result.last_modified,
creation_date:result.creation_date,
revision:rev
};
window.basic_conflict_solver.
......@@ -744,6 +742,11 @@
});
};
that.abortSolveConflict = function () {
that.closeGadgetId (priv.data_object.currentSolver.gadget_id);
priv.data_object.currentSolver = null;
};
/**
* Get current activity.
* @method getActivity
......
/*! JIO Storage - v0.1.0 - 2012-08-06
/*! JIO Storage - v0.1.0 - 2012-08-07
* Copyright (c) 2012 Nexedi; Licensed */
(function(LocalOrCookieStorage, $, Base64, sjcl, hex_sha256, Jio) {
......@@ -1465,8 +1465,11 @@ var newConflictManagerStorage = function ( spec, my ) {
return this.revision_object;
},
solveConflict: function (content,option) {
if (metadata[revision].deleted) {
option = option || content || {};
if (typeof content === 'undefined') {
option = option || {};
option.deleted = true;
} else if (typeof content === 'object') {
option = content;
option.deleted = true;
} else {
option = option || {};
......
This diff is collapsed.
......@@ -232,8 +232,11 @@ var newConflictManagerStorage = function ( spec, my ) {
return this.revision_object;
},
solveConflict: function (content,option) {
if (metadata[revision].deleted) {
option = option || content || {};
if (typeof content === 'undefined') {
option = option || {};
option.deleted = true;
} else if (typeof content === 'object') {
option = content;
option.deleted = true;
} else {
option = option || {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment