aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/common/dialogs.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/dialogs.js')
-rw-r--r--server/sonar-web/src/main/js/components/common/dialogs.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/server/sonar-web/src/main/js/components/common/dialogs.js b/server/sonar-web/src/main/js/components/common/dialogs.js
deleted file mode 100644
index 46f8b68354c..00000000000
--- a/server/sonar-web/src/main/js/components/common/dialogs.js
+++ /dev/null
@@ -1,44 +0,0 @@
-(function ($) {
-
- window.confirmDialog = function (options) {
- var settings = _.extend(window.confirmDialog.defaults, options),
- 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', function () {
- dialog.dialog('close');
- settings.yesHandler();
- return settings.always();
- });
-
- $('[data-confirm=no]', dialog).on('click', function () {
- dialog.dialog('close');
- settings.noHandler();
- return settings.always();
- });
-
- return dialog.dialog({
- modal: true,
- minHeight: null,
- width: 540
- });
- };
-
- window.confirmDialog.defaults = {
- title: 'Confirmation',
- html: '',
- yesLabel: 'Yes',
- noLabel: 'Cancel',
- yesHandler: function () {
- // no op
- },
- noHandler: function () {
- // no op
- },
- always: function () {
- // no op
- }
- };
-
-})(window.jQuery);