Commit a6e165bf authored by Ryan Herbert's avatar Ryan Herbert
Browse files

info.js, default.py: add autoComplete to infobox textareas

See #2622
parent c4382266
......@@ -318,6 +318,12 @@ Info.prototype = {
textarea.innerHTML = info ;
textarea.setAttribute('placeholder', placeholder);
$(textarea).data('group-id', this.m.group_id);
$(textarea).data('needs-atwho', true);
$(textarea).on('focus', function() {
new VidjilAutoComplete().setupAtWho(this);
})
container.appendChild(textarea);
return container;
......
......@@ -346,6 +346,7 @@ def get_data():
data["info"] = db.generic[row.id].info
data["generic_id"] = row.id
data["sample_name"] = generic_name
data["group_id"] = get_set_group(defs.SET_TYPE_GENERIC, row.id)
if (sample_set.sample_type == defs.SET_TYPE_PATIENT):
for row in db( db.patient.sample_set_id == request.vars["sample_set_id"] ).select() :
......@@ -355,6 +356,7 @@ def get_data():
data["info"] = db.patient[row.id].info
data["patient_id"] = row.id
data["sample_name"] = patient_name
data["group_id"] = get_set_group(defs.SET_TYPE_PATIENT, row.id)
if (sample_set.sample_type == defs.SET_TYPE_RUN) :
for row in db( db.run.sample_set_id == request.vars["sample_set_id"] ).select() :
......@@ -364,6 +366,7 @@ def get_data():
data["info"] = db.run[row.id].info
data["run_id"] = row.id
data["sample_name"] = run_name
data["group_id"] = get_set_group(defs.SET_TYPE_RUN, row.id)
log_query = db( ( db.user_log.record_id == log_reference_id )
& ( db.user_log.table_name == sample_set.sample_type )
......
Supports Markdown
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