Commit 96d1e753 authored by Tristan Cavelier's avatar Tristan Cavelier

Conflict solver closes itself after solving

parent ade981ac
......@@ -21,20 +21,20 @@ window.basic_conflict_solver = {
document.querySelector ('#basic_conflict_solver_div #revisions').
innerHTML += '<div class="row-fluid"><div class="span12">'+
'<div><textarea id="'+revision+'">'+content+'</textarea></div>'+
'<div><button onclick="console.log('+"'"+revision+"'"+');'+
'basic_conflict_solver.keepRevision('+"'"+revision+"'"+');'+
'<div><button onclick="'+
//'console.log('+"'"+revision+"'"+');'+
"basic_conflict_solver.keepRevision('"+revision+"');"+
'">Save this one</button></div><hr/>'+
// window.basic_conflict_solver.keepRevision('+
// '<div><button onclick="alert('+"'"+'cobra'+"'"+');'+
// "'"+revision+"'"+'); alert("after"); return false;">Save this one</button></div><hr/>'+
'</div></div>';
},
addRemovedRevision: function (revision) {
document.querySelector ('#basic_conflict_solver_div #revisions').
innerHTML += '<div class="row-fluid"><div class="span12">'+
'<div>Removed</div>'+
'<div><button onclick="window.basic_conflict_solver.keepRevision('+
"'"+revision+"'"+'); return false;">Save this one</button></div><hr/>'+
'<div><button onclick="'+
//'console.log('+"'"+revision+"'"+');'+
"basic_conflict_solver.keepRevision('"+revision+"');"+
'">Save this one</button></div><hr/>'+
'</div></div>';
},
keepRevision: function (revision) {
......
......@@ -44,6 +44,9 @@
<!--
window.OfficeJS_slickgrid = {};
window.OfficeJS_slickgrid.reload = function () {
$('#myDocumentList').html('');
var grid, onSortFunction, onClickFunction, check_box_selector,
onRemoveSeveral, showIconFormatter,
document_list = OfficeJS.cloneCurrentDocumentList(),
......
......@@ -170,15 +170,15 @@
gadget_id:'page-content',
interval_id:null,
onload: function () {
var t = this;
if (this.interval_id === null) {
this.interval_id = setInterval (function() {
that.getList(this.update);
that.getList(t.update);
}, 5000);
}
},
update: function () {
OfficeJS.open({app:'document_lister',force:true});
//window.OfficeJS_slickgrid.reload();
window.OfficeJS_slickgrid.reload();
},
onunload: function () {
if (this.interval_id !== null) {
......@@ -406,6 +406,15 @@
}
};
/**
* Load an empty page in the place of a specific gadget id
* @method closeGadgetId
* @param {string} gadgetid The gadget id
*/
that.closeGadgetId = function (gadgetid) {
TabbularGadget.addNewTabGadget('component/empty.html',gadgetid);
};
/**
* @method getPreference
* @param {string} key The preference
......@@ -690,7 +699,7 @@
that.solveConflict = function (conflict_object, data) {
// TODO : that.close basic_solver
that.closeGadgetId (priv.data_object.currentSolver.gadget_id);
priv.data_object.currentEditor.setContent(data);
priv.loading_object.save();
conflict_object.solveConflict(
......
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