..F....... [ZBXNEXT-570] minor JS refactoring