Commit 35d38d35 authored by Maxym Borodenko's avatar Maxym Borodenko
Browse files

Fix little bug - error when remove country from the filter

parent eeef838b
......@@ -423,7 +423,7 @@
$(this).remove();
$('input[i-key="' + key + '"][value="' + value + '"]').prop('checked', false);
if (jsonData["crops"].length === 0) {
if (jsonData["crops"] !== undefined && jsonData["crops"].length === 0) {
delete jsonData["crops"];
$("#panel_additional_id").hide();
}
......
......@@ -313,7 +313,7 @@
$(this).remove();
$('input[i-key=" + normKey + "][value=" + value + "]').prop('checked', false);
if (jsonData["crops"].length === 0) {
if (jsonData["crops"] !== undefined && jsonData["crops"].length === 0) {
delete jsonData["crops"];
$("#panel_additional_id").hide();
}
......
......@@ -277,21 +277,6 @@
jsonData[key] = [];
});
$("body").on("click", ".filtval", function (event) {
event.preventDefault();
var key = $(this).attr("i-key");
var normKey = GenesysFilter.normKey(key);
var value = $(this).attr("x-key").replace(normKey, "");
if (value == "null") value = null;
GenesysFilterUtil.removeValue(value, key, jsonData);
applyFilters();
BrowseUtil.applySuggestions(jsonData, messages);
$(this).remove();
$('input[i-key=" + normKey + "][value=" + value + "]').prop('checked', false);
});
$("#menuShareLink").on("click", function () {
if ($('#shortLink').val() === '') {
$.ajax({
......
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