Merge pull request +15616 from c9/pull/core/449

added "don't show" checkbox to confirmation dialog
pull/453/head
Harutyun Amirjanyan 2017-09-02 20:10:11 +04:00 zatwierdzone przez GitHub
commit 1204e64eb3
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

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