1
0
Fork 0

Hack: admin props combobox works(?)

This commit is contained in:
Dariusz Niemczyk 2023-07-17 22:44:44 +02:00
parent 027bcfcde5
commit 5012a10298
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ var initDjangoHStoreWidget = function (hstore_field_name, inline_prefix) {
$hstore.delegate("a.hs-add-row, .hs-add-row a", "click", function (e) {
e.preventDefault();
$hstore.find(".hstore-rows").append(empty_row);
$(".django-select2").djangoSelect2();
$(".django-select2").select2();
$("select").on("select2:close", function () {
$(this).focus();
});
@ -157,7 +157,7 @@ var initDjangoHStoreWidget = function (hstore_field_name, inline_prefix) {
hstore_rows.show();
add_row.show();
$(".django-select2").djangoSelect2();
$(".django-select2").select2();
} else {
raw_textarea.show();
hstore_rows.hide();

View File

@ -29,7 +29,7 @@
result.find("b").text(state.text);
return result;
}
django.jQuery(".django-select2[name=parent]").djangoSelect2({
django.jQuery(".django-select2[name=parent]").select2({
templateResult: fmt,
});
/**