summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-31 12:22:21 +0100
committerJoas Schilling <coding@schilljs.com>2016-10-31 12:22:21 +0100
commit247b7f37ce81525193f19eca45027c5be52458c5 (patch)
tree4852daaeebd0814121f62584ef9c5fa20129fcc1 /core
parent357a823457397d3e93ec8cd4dc01fb6859eb0049 (diff)
downloadnextcloud-server-247b7f37ce81525193f19eca45027c5be52458c5.tar.gz
nextcloud-server-247b7f37ce81525193f19eca45027c5be52458c5.zip
Color the trusted domain to alert the admin a bit more
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/oc-dialogs.js23
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;
}