diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-10-17 21:56:41 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-10-30 10:19:33 +0100 |
commit | e5cae301ebeb472d8c635b479fb5971530122f81 (patch) | |
tree | bc6f0f12756b58a37c3d31efbe1cea9d02b9c7e7 | |
parent | d7caf841df07c1ecb39e72ac4566842b2ee5486a (diff) | |
download | nextcloud-server-e5cae301ebeb472d8c635b479fb5971530122f81.tar.gz nextcloud-server-e5cae301ebeb472d8c635b479fb5971530122f81.zip |
Highlight search term in sharing results
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | core/css/jquery-ui-fixes.scss | 1 | ||||
-rw-r--r-- | core/js/sharedialogview.js | 6 |
2 files changed, 6 insertions, 1 deletions
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 @@ } $("<div class='autocomplete-item-text'></div>") - .text(text) + .html( + text.replace( + new RegExp(this.term, "gi"), + "<span class='ui-state-highlight'>$&</span>") + ) .appendTo(insert); insert.attr('title', item.value.shareWith); insert.append('<span class="icon '+icon+'"></span>'); |