Commit 04e04154 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

autocomplete.js vidjil.less sample highlight colours

when highlighting a samle id string, we want it to match the colour of
the token that will be inserted.

See #2981
parent e1d2aa6f
......@@ -2312,6 +2312,21 @@ label.highlight_label {
background: #3366FF;
color: white;
}
.atwho-view .cur.patient_li {
background: @patientTokenColor;
color: black;
}
.atwho-view .cur.run_li {
background: @runTokenColor;
color: black;
}
.atwho-view .cur.generic_li {
background: @genericTokenColor;
color: black;
}
.atwho-view .cur small {
color: white;
}
......@@ -2322,6 +2337,10 @@ label.highlight_label {
color: white;
font:bold;
}
.atwho-view .cur.patient_li strong, .atwho-view .cur.generic_li strong, .atwho-view .cur.run_li strong {
color: black;
font: bold;
}
.atwho-view ul {
/* width: 100px; */
list-style:none;
......
......@@ -147,8 +147,13 @@ VidjilAutoComplete.prototype = {
return res;
};
// code taken directly from atwho source in order to allow use of brackets in inputs
// code modified from atwho source
callbacks.highlighter = function(li, query) {
var css_classes = {'p': 'patient_li',
'r': 'run_li',
's': 'generic_li'}
li = li.replace('<li>', '<li class=' + css_classes[li.charAt(5)] + '>');
var regexp;
if (!query) {
return li;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment