small fix for search url
This commit is contained in:
parent
a10d4e81ac
commit
2c7cedd2fd
|
@ -760,7 +760,7 @@
|
||||||
placeholder: "<%= t("curation.search_entries") %>",
|
placeholder: "<%= t("curation.search_entries") %>",
|
||||||
ajax: {
|
ajax: {
|
||||||
type: 'get',
|
type: 'get',
|
||||||
url: "/admin/universal_tables/get_entries",
|
url: "",
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
delay: 250,
|
delay: 250,
|
||||||
|
@ -781,10 +781,8 @@
|
||||||
return '<div>' + i.text + '</div>';
|
return '<div>' + i.text + '</div>';
|
||||||
}, // Formats results in drop down
|
}, // Formats results in drop down
|
||||||
templateSelection: function(i) {
|
templateSelection: function(i) {
|
||||||
console.log(i);
|
|
||||||
return '<div>' + i.text + '</div>';
|
return '<div>' + i.text + '</div>';
|
||||||
}, //Formats result that is selected
|
}, //Formats result that is selected
|
||||||
// dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
|
|
||||||
escapeMarkup: function(m) {
|
escapeMarkup: function(m) {
|
||||||
return m;
|
return m;
|
||||||
} // we do not want to escape markup since we are displaying html in results
|
} // we do not want to escape markup since we are displaying html in results
|
||||||
|
@ -794,7 +792,7 @@
|
||||||
if($(this).val()){
|
if($(this).val()){
|
||||||
selectedUTable = $(this).val();
|
selectedUTable = $(this).val();
|
||||||
parent.find(".section_type_ut_entries").show();
|
parent.find(".section_type_ut_entries").show();
|
||||||
select2Options.ajax.url = select2Options.ajax.url + "?uid=" + selectedUTable;
|
select2Options.ajax.url = "/admin/universal_tables/get_entries?uid=" + selectedUTable;
|
||||||
parent.find('.section_type_ut_entries input.select2').select2(select2Options);
|
parent.find('.section_type_ut_entries input.select2').select2(select2Options);
|
||||||
}else{
|
}else{
|
||||||
parent.find(".section_type_ut_entries").hide();
|
parent.find(".section_type_ut_entries").hide();
|
||||||
|
|
Loading…
Reference in New Issue