Commit 7295d603 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team

vidjil/views/sample_set/all.html: override default callback

When a sample set is selected we redirect to the sample set itself.
However there is still an issue as the search is launched (but the results are ignored).
parent 0bf1c8df
Pipeline #85803 failed with stages
in 14 minutes and 37 seconds
......@@ -5,12 +5,25 @@
<h3></h3>
<script type="text/javascript">
function callback_sample_click(value, li) {
var match_sample_set_id = /\(([0-9]+)\)\s*$/;
var matches = value.match(match_sample_set_id);
db.call('sample_set/index', {'id': matches[1], 'config_id': -1});
}
</script>
<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} )"
onfocus="vat = new VidjilAutoComplete();
vat.setupSamples(this);
var callbacks = {'beforeInsert': function (value, li) {
var match_sample_set_id = /\(([0-9]+)\)\s*$/;
var matches = value.match(match_sample_set_id);
db.call('sample_set/index', {'id': matches[1], 'config_id': -1});
}};
vat.setupSamples(this, callbacks);
$(this).data('needs-atwho', true);
vat.setupTags(this);
"
......
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