From 164cb891f3b25effed8c919fa75d03476d0876e5 Mon Sep 17 00:00:00 2001 From: Kareem Zidane Date: Wed, 23 Aug 2017 14:31:07 -0400 Subject: [PATCH] added "don't show" checkbox to confirmation dialog --- plugins/c9.ide.dialog.common/confirm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/c9.ide.dialog.common/confirm.js b/plugins/c9.ide.dialog.common/confirm.js index 61a929cc..ed0e223c 100644 --- a/plugins/c9.ide.dialog.common/confirm.js +++ b/plugins/c9.ide.dialog.common/confirm.js @@ -14,6 +14,8 @@ define(function(require, module, exports) { allowClose: false, modal: true, elements: [ + { type: "checkbox", id: "dontshow", caption: "Don't show again", visible: false }, + { type: "filler" }, { type: "button", id: "ok", caption: "OK", color: "green", "default": true, onclick: function() { plugin.hide(); } }, { type: "button", id: "cancel", caption: "Cancel", hotkey: "ESC", onclick: function() { plugin.hide(); } } ] @@ -34,6 +36,7 @@ define(function(require, module, exports) { plugin.getElement("cancel").setCaption(options.no || "Cancel"); plugin.update([ + { id: "dontshow", visible: options.showDontShow }, { id: "ok", onclick: function() { plugin.hide(); onconfirm(); } }, { id: "cancel", onclick: function() { plugin.hide(); oncancel && oncancel(); } }, ]);