diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js b/server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js index 698377be307..54404543657 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/confirm-dialog.js @@ -24,22 +24,30 @@ const DEFAULTS = { html: '', yesLabel: 'Yes', noLabel: 'Cancel', - yesHandler () { + yesHandler() { // no op }, - noHandler () { + noHandler() { // no op }, - always () { + always() { // no op } }; -export default function (options) { +export default function(options) { const settings = { ...DEFAULTS, ...options }; - const dialog = $('<div><div class="modal-head"><h2>' + settings.title + '</h2></div><div class="modal-body">' + - settings.html + '</div><div class="modal-foot"><button data-confirm="yes">' + settings.yesLabel + - '</button> <a data-confirm="no" class="action">' + settings.noLabel + '</a></div></div>'); + const dialog = $( + '<div><div class="modal-head"><h2>' + + settings.title + + '</h2></div><div class="modal-body">' + + settings.html + + '</div><div class="modal-foot"><button data-confirm="yes">' + + settings.yesLabel + + '</button> <a data-confirm="no" class="action">' + + settings.noLabel + + '</a></div></div>' + ); $('[data-confirm=yes]', dialog).on('click', () => { dialog.dialog('close'); |