From 916c95758f5fa40ba465f4a15ffde6b15ea29c65 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Fri, 12 Jul 2019 08:43:12 +0200 Subject: Rename parameter in OCP.Toast for consistency with OC.Notification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- core/src/OC/notification.js | 2 +- core/src/OCP/toast.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src') 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 = $('
').text(text).html() } let classes = '' -- cgit v1.2.3