Bug 17170: (follow-up) Adjust for RM follow-ups

Use direct DB names when saving/loading
Don't escape boolean values as strings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2022-10-21 13:30:39 +00:00 committed by Tomas Cohen Arazi
parent c8d507aef6
commit d89f9a55f6
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
3 changed files with 7 additions and 7 deletions

View file

@ -142,8 +142,8 @@
let filter_buttons = '<a class="btn btn-default btn-xs edit_filter" onclick="edit_filter(this)"';
filter_buttons += ' data-filter_id="'+ escape_str(filter.search_filter_id);
filter_buttons += '" data-filter_name="'+ escape_str(filter.name);
filter_buttons += '" data-filter_opac="'+ escape_str(filter.opac);
filter_buttons += '" data-filter_staff_client="'+ escape_str(filter.staff_client);
filter_buttons += '" data-filter_opac="'+ filter.opac;
filter_buttons += '" data-filter_staff_client="'+ filter.staff_client;
filter_buttons += '" ><i class="fa fa-pencil"></i> '+_("Edit filter")+'</a>';
filter_buttons += '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/catalogue/search.pl?edit_filter='+encodeURIComponent(filter.search_filter_id)+'"><i class="fa fa-search"></i> '+ _("Edit search") + '</a>';
filter_buttons += '<a class="btn btn-default btn-xs delete_filter" onclick="delete_filter(this)"';

View file

@ -485,8 +485,8 @@
contentType: "application/json",
data: JSON.stringify({
name: "[% edit_filter.name | html %]",
filter_query: JSON.stringify({ operands: operands, indexes: indexes, operators:operators }),
filter_limits: JSON.stringify({ limits: limits }),
query: JSON.stringify({ operands: operands, indexes: indexes, operators:operators }),
limits: JSON.stringify({ limits: limits }),
opac: opac,
staff_client: staff_client,
})

View file

@ -847,7 +847,7 @@
opt.prop('selected', true);
}
opt.attr("value", filter.search_filter_id);
opt.attr("title", "Query:" + filter.filter_query + " Limit:"+filter.filter_limits);
opt.attr("title", "Query:" + filter.query + " Limit:"+filter.limits);
opt.text(filter.name);
opt.data("filter", filter);
});
@ -881,8 +881,8 @@
contentType: "application/json",
data: JSON.stringify({
name: name,
filter_query: JSON.stringify(search_result.query_json),
filter_limits: JSON.stringify(search_result.limit_json),
query: JSON.stringify(search_result.query_json),
limits: JSON.stringify(search_result.limit_json),
opac: opac,
staff_client: staff,
})