diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-11-02 10:06:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-02 10:06:35 +0100 |
commit | 42b0a0d2afe95b974545436e112a1d97edaeeb1a (patch) | |
tree | bfd8521d15db528dc11f4153ff199bcbf4e16f2b /core | |
parent | 19af06cdea5719226d851bf4ad531220d2d37bed (diff) | |
parent | 247b7f37ce81525193f19eca45027c5be52458c5 (diff) | |
download | nextcloud-server-42b0a0d2afe95b974545436e112a1d97edaeeb1a.tar.gz nextcloud-server-42b0a0d2afe95b974545436e112a1d97edaeeb1a.zip |
Merge pull request #1964 from nextcloud/color-the-trusted-domain-to-alert-the-admin
Color the trusted domain to alert the admin a bit more
Diffstat (limited to 'core')
-rw-r--r-- | core/js/oc-dialogs.js | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 5a5bdc33d5d..fc0734e9df4 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -77,6 +77,25 @@ var OCdialogs = { ); }, /** + * displays confirmation dialog + * @param text content of dialog + * @param title dialog title + * @param callback which will be triggered when user presses YES or NO + * (true or false would be passed to callback respectively) + * @param modal make the dialog modal + */ + confirmHtml:function(text, title, callback, modal) { + return this.message( + text, + title, + 'notice', + OCdialogs.YES_NO_BUTTONS, + callback, + modal, + true + ); + }, + /** * displays prompt dialog * @param text content of dialog * @param title dialog title @@ -251,7 +270,7 @@ var OCdialogs = { * Displays raw dialog * You better use a wrapper instead ... */ - message:function(content, title, dialogType, buttons, callback, modal) { + message:function(content, title, dialogType, buttons, callback, modal, allowHtml) { return $.when(this._getMessageTemplate()).then(function($tmpl) { var dialogName = 'oc-dialog-' + OCdialogs.dialogsCounter + '-content'; var dialogId = '#' + dialogName; @@ -260,7 +279,7 @@ var OCdialogs = { title: title, message: content, type: dialogType - }); + }, allowHtml ? {escapeFunction: ''} : {}); if (modal === undefined) { modal = false; } |