#30: if !#found the name of special coins does not instantly get updates but after a reload of the website
This commit is contained in:
parent
304d9acf03
commit
e35512284f
@ -144,34 +144,32 @@ function render_response(data, td, set) {
|
|||||||
|
|
||||||
/* add or update marker (and name) if found */
|
/* add or update marker (and name) if found */
|
||||||
if (set['found'] && set['found_by'] && set['exists']) {
|
if (set['found'] && set['found_by'] && set['exists']) {
|
||||||
|
|
||||||
div_class = set['found_by'];
|
div_class = set['found_by'];
|
||||||
$(td).find('div.coin span').html('').html('✔');
|
$(td).find('div.coin span').html('').html('✔'); }
|
||||||
|
|
||||||
/* add/update name */
|
/* add/update name */
|
||||||
if ([201, 202, 203].includes(data['value'])) {
|
if ([201, 202, 203].includes(data['value'])) {
|
||||||
|
|
||||||
let c = String(value).substring(2,3);
|
let c = String(value).substring(2,3);
|
||||||
if ('name' in data) {
|
if ('name' in data) {
|
||||||
|
|
||||||
/* look for div.special123_name */
|
/* look for div.special123_name */
|
||||||
let name = escape_html(data['name']);
|
let name = escape_html(data['name']);
|
||||||
let div_special_name = $(td).find('div.special' + c + '_name');
|
let div_special_name = $(td).find('div.special' + c + '_name');
|
||||||
if (div_special_name.length == 0) {
|
if (div_special_name.length == 0) {
|
||||||
|
|
||||||
/* append div if not found */
|
/* append div if not found */
|
||||||
$(td).append('<div class="special' + c + '_name three_lines">' + name + '</div>');
|
$(td).append('<div class="special' + c + '_name three_lines">' + name + '</div>');
|
||||||
|
|
||||||
} else if (div_special_name.length == 1) {
|
} else if (div_special_name.length == 1) {
|
||||||
|
|
||||||
/* only insert inner html */
|
/* only insert inner html */
|
||||||
div_special_name.html(name);
|
div_special_name.html(name);
|
||||||
}
|
|
||||||
|
|
||||||
/* remove name */
|
|
||||||
} else if (!set['exists']) {
|
|
||||||
$(td).find('div.special' + c + '_name').html();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* remove name */
|
||||||
|
} else if (!set['exists']) {
|
||||||
|
$(td).find('div.special' + c + '_name').html();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user