Now the group item addition to the GIS layer is disabled if it is already in the list

This commit is contained in:
Alejandro Gallardo Escobar 2018-08-17 14:20:16 +02:00
parent 3edd42a453
commit 3320bf1fb2
1 changed files with 3 additions and 1 deletions

View File

@ -588,11 +588,13 @@ function addAgentClick (event) {
function toggleAddGroupBtn () {
var groupId = Number.parseInt($("select#layer_group_id").val());
var existGroupId = $("table#list_groups tr.groups_list_item[data-group-id='" + groupId + "']").length > 0;
var agentId = Number.parseInt($("input#hidden-agent_id_for_data").val());
var agentAlias = $("input#text-agent_alias_for_data").val();
var enabled = (
!Number.isNaN(groupId)
!existGroupId
&& !Number.isNaN(groupId)
&& groupId > 0
&& !Number.isNaN(agentId)
&& agentId > 0