From e5cae301ebeb472d8c635b479fb5971530122f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 17 Oct 2018 21:56:41 +0200 Subject: [PATCH] Highlight search term in sharing results MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/css/jquery-ui-fixes.scss | 1 + core/js/sharedialogview.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/css/jquery-ui-fixes.scss b/core/css/jquery-ui-fixes.scss index 729a6197376..d80d0c61e46 100644 --- a/core/css/jquery-ui-fixes.scss +++ b/core/css/jquery-ui-fixes.scss @@ -71,6 +71,7 @@ border: 1px solid var(--color-main-background); background: var(--color-main-background) none; color: var(--color-text-lighter); + font-weight: 600; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index c8d9822d256..7b8759527b3 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -472,7 +472,11 @@ } $("
") - .text(text) + .html( + text.replace( + new RegExp(this.term, "gi"), + "$&") + ) .appendTo(insert); insert.attr('title', item.value.shareWith); insert.append('');