diff --git a/plugins/c9.ide.dialog.common/filechange.js b/plugins/c9.ide.dialog.common/filechange.js index f98e91ce..189777b1 100644 --- a/plugins/c9.ide.dialog.common/filechange.js +++ b/plugins/c9.ide.dialog.common/filechange.js @@ -28,19 +28,27 @@ define(function(require, module, exports) { /***** Methods *****/ - function show(title, header, onlocal, onremote, onmerge, options) { + function show(title, header, body, onlocal, onremote, onmerge, options) { + options = options || {}; return plugin.queue(function(){ plugin.title = title; plugin.heading = util.escapeXml(header); + if (body) plugin.body = util.escapeXml(body); var cb = plugin.getElement("applyall"); cb.uncheck(); cb.setAttribute("visible", options.all !== false); + if (options.merge) { + var mergeBoth = plugin.getElement("mergeboth"); + if (options.merge.caption) mergeBoth.setAttribute("caption", options.merge.caption); + } + + plugin.update([ { id: "keepmine", onclick: function(){ plugin.hide(); onlocal(cb.value); } }, { id: "useremote", onclick: function(){ plugin.hide(); onremote(cb.value); } }, - { id: "mergeboth", visible: options.merge, onclick: function(){ plugin.hide(); onmerge(cb.value); } } + { id: "mergeboth", visible: !!options.merge, onclick: function(){ plugin.hide(); onmerge(cb.value); } } ]); }); } diff --git a/plugins/c9.ide.watcher/gui.js b/plugins/c9.ide.watcher/gui.js index f3bf9964..8ea36281 100644 --- a/plugins/c9.ide.watcher/gui.js +++ b/plugins/c9.ide.watcher/gui.js @@ -394,6 +394,7 @@ define(function(require, exports, module) { changeDialog = filechange.show( "File Changed", path + " has been changed on disk.", + null, no, yes, function(all) { // Merge