diff options
-rw-r--r-- | views/default/css.php | 6 | ||||
-rw-r--r-- | views/default/input/userpicker.php | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/views/default/css.php b/views/default/css.php index d61d5a6c4..4d6c9e2a5 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -2593,6 +2593,10 @@ a.delete_report_button:hover { width:300px; } +.ac_results strong { + font-weight: bold; +} + .user_picker .user_picker_entry { clear: both; padding: 1em; @@ -2601,4 +2605,4 @@ a.delete_report_button:hover { .livesearch_icon { float: left; padding-right: 1em; -}
\ No newline at end of file +} diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index 8f26b8916..b69d295f0 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -66,14 +66,7 @@ function userPickerBindAutocomplete(e) { formatItem: userPickerFormatItem, formatResult: function (row, i, max) { eval("var info = " + row + ";"); - //console.log('format result'); - // upon select, adding the user to the user basket. - // this is slightly abusive for this function. - // set it to the hidden input name - - //userPickerAddUser(info.guid); - - // returning the name + // returning the just name return info.name; } }); @@ -85,18 +78,21 @@ function userPickerBindAutocomplete(e) { function userPickerFormatItem(row, i, max, term) { eval("var info = " + row + ";"); var r = ''; + var name = info.name.replace(new RegExp("(" + term + ")", "gi"), "<span class=\"user_picker_highlight\">$1</b>"); + var desc = info.desc.replace(new RegExp("(" + term + ")", "gi"), "<span class=\"user_picker_highlight\">$1</b>"); switch (info.type) { case 'user': case 'group': - r = info.icon + info.name + ' - ' + info.desc; + r = info.icon + name + ' - ' + desc; break; default: - r = info.name + ' - ' + info.desc; + r = name + ' - ' + desc; break; } - return r.replace(new RegExp("(" + term + ")", "gi"), "<b>$1</b>"); + return r; + //return r.replace(new RegExp("(" + term + ")", "gi"), "<span class=\"user_picker_highlight\">$1</b>"); } function userPickerAddUser(event, data, formatted) { |