diff --git a/htdocs/frontend/javascripts/entities.js b/htdocs/frontend/javascripts/entities.js index 3146047..0287d92 100644 --- a/htdocs/frontend/javascripts/entities.js +++ b/htdocs/frontend/javascripts/entities.js @@ -98,9 +98,9 @@ vz.entities.showTable = function() { vz.entities.sort(Entity.compare); var c = 0; // for colors - this.each(function(entity) { + this.each(function(entity, parent) { entity.color = vz.options.plot.colors[c++ % vz.options.plot.colors.length]; - $('#entity-list tbody').append(entity.getDOMRow()); + $('#entity-list tbody').append(entity.getDOMRow(parent)); }, true); // recursive! /* @@ -143,15 +143,15 @@ vz.entities.showTable = function() { queue.push(from.removeChild(child)); // remove from aggregator } else { - vz.uuids.remove(child.uuid); // remove from cookies - vz.uuids.save(); + child.cookie = false; // remove from cookies + vz.entities.saveCookie(); } } catch (e) { vz.wui.dialogs.exception(e); } finally { $.when(queue).done(function() { // wait for middleware - vz.entities.loadDetails().done(vz.entities.showTable); + $.when(from.loadDetails(), to.loadDetails).done(vz.entities.showDetails); }); $(this).dialog('close'); } diff --git a/htdocs/frontend/javascripts/entity.js b/htdocs/frontend/javascripts/entity.js index 7a2ae0f..8afd4ff 100644 --- a/htdocs/frontend/javascripts/entity.js +++ b/htdocs/frontend/javascripts/entity.js @@ -199,9 +199,9 @@ Entity.prototype.getDOMDetails = function(edit) { return table.append(data); }; -Entity.prototype.getDOMRow = function() { +Entity.prototype.getDOMRow = function(parent) { var row = $('