small fix for search url

This commit is contained in:
rulingcom 2025-05-13 21:16:04 +08:00
parent a10d4e81ac
commit 2c7cedd2fd
1 changed files with 2 additions and 4 deletions

View File

@ -760,7 +760,7 @@
placeholder: "<%= t("curation.search_entries") %>",
ajax: {
type: 'get',
url: "/admin/universal_tables/get_entries",
url: "",
allowClear: true,
dataType: 'json',
delay: 250,
@ -781,10 +781,8 @@
return '<div>' + i.text + '</div>';
}, // Formats results in drop down
templateSelection: function(i) {
console.log(i);
return '<div>' + i.text + '</div>';
}, //Formats result that is selected
// dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
escapeMarkup: function(m) {
return m;
} // we do not want to escape markup since we are displaying html in results
@ -794,7 +792,7 @@
if($(this).val()){
selectedUTable = $(this).val();
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);
}else{
parent.find(".section_type_ut_entries").hide();