diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-07-12 08:43:12 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-07-12 16:15:05 +0200 |
commit | 916c95758f5fa40ba465f4a15ffde6b15ea29c65 (patch) | |
tree | 491572533a8cff84edd6078abb73276972afe595 /core/src | |
parent | c193c0d46670fdda79f74523eb0f616175dd513b (diff) | |
download | nextcloud-server-916c95758f5fa40ba465f4a15ffde6b15ea29c65.tar.gz nextcloud-server-916c95758f5fa40ba465f4a15ffde6b15ea29c65.zip |
Rename parameter in OCP.Toast for consistency with OC.Notification
This fixes HTML messages in "OC.Notification.showTemporary" (as
"showHtml" was not set based on "isHTML"), and also makes OCP.Toast to
keep the old OC.Notification API when used directly.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/notification.js | 2 | ||||
-rw-r--r-- | core/src/OCP/toast.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index 45af1584123..427c857f7c3 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -96,7 +96,7 @@ export default { */ showHtml: function (html, options) { options = options || {} - options.showHtml = true + options.isHTML = true options.timeout = (options.timeout === 0) ? -1 : options.timeout const toast = window.OCP.Toast.message(html, options) return $(toast.toastElement) diff --git a/core/src/OCP/toast.js b/core/src/OCP/toast.js index 66272919f21..113d37ab412 100644 --- a/core/src/OCP/toast.js +++ b/core/src/OCP/toast.js @@ -56,12 +56,12 @@ const Toast = { options = options || {}; _.defaults(options, { timeout: 7, - showHtml: false, + isHTML: false, type: undefined, close: true, callback: () => {} }); - if (!options.showHtml) { + if (!options.isHTML) { text = $('<div/>').text(text).html() } let classes = '' |