Commit a327ee58 authored by Ryan Herbert's avatar Ryan Herbert

sample_set.py, all.html, custom.html autocomplete search bar

See #2621
parent 42203d9a
......@@ -170,9 +170,7 @@ def all():
request.vars["filter"] = ""
search, tags = parse_search(request.vars["filter"])
group_ids = [int(g.id) for g in get_group_list(auth)]
parent_group_ids = [int(g.id) for f in auth.get_user_group_parents()]
group_ids = group_ids + parent_group_ids
group_ids = get_involved_groups()
list = SampleSetList(type, page, step, tags=tags)
list.load_creator_names()
......@@ -376,6 +374,8 @@ def custom():
)
myGroupBy = db.sequence_file.id|db.patient.id|db.run.id|db.generic.id|db.results_file.config_id
group_ids = get_involved_groups()
##filter
if "filter" not in request.vars :
request.vars["filter"] = ""
......@@ -428,7 +428,8 @@ def custom():
config_id=config_id,
config=config,
helper=helper,
tag_decorator=tag_decorator)
tag_decorator=tag_decorator,
group_ids=group_ids)
def confirm():
if auth.can_modify_sample_set(request.vars["id"]):
......
......@@ -8,7 +8,9 @@
<div class="db_block">
<div class="db_block_left">
search
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}" onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )">
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}" onchange="db.call('sample_set/all', {'type': '{{=helper.get_type()}}', 'filter' : this.value} )"
onfocus="new VidjilAutoComplete().setupAtWho(this);"
data-needs-atwho="true" data-group-ids="{{=group_ids}}">
</div>
</div>
......
......@@ -20,7 +20,9 @@
<input id="db_filter_input" type="text" value="{{=request.vars["filter"]}}"
onchange="db.call('sample_set/custom', {'config_id' : '{{=request.vars["config_id"]}}',
'filter' : this.value,
'custom_list' : db.getListInput('custom_result[]')} )" >
'custom_list' : db.getListInput('custom_result[]')} )"
onfocus="new VidjilAutoComplete().setupAtWho(this);"
data-needs-atwho="true" data-group-ids="{{=group_ids}}">
</div>
......
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