Merge pull request +9295 from c9/filechange-dialog-option

[Trivial] Allow changing of body text in filechange dialog
pull/152/head
Lennart Kats 2015-09-11 15:18:26 +02:00
commit 5e6f31eef8
2 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -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); } }
]);
});
}

Wyświetl plik

@ -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