Topo2: Topo2SelectService now maintains de/selecting nodes and displaying the details panel
Change-Id: I29d2476d8615263d79304636df6ca1664e7dc76b
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
index 7c674c3..e94ed6c 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
@@ -217,22 +217,14 @@
});
},
select: function () {
-
- // TODO: if single selection clear selected devices, hosts, sub-regions
- var s = Boolean(this.get('selected'));
- // Clear all selected Items
- _.each(this.collection.models, function (m) {
- m.set('selected', false);
- });
-
- this.set('selected', !s);
- this.showDetails();
-
+ this.set({ 'selected': true });
return this.getSelected();
},
deselect: function () {
- this.set('selected', false);
- this.set('enhanced', false);
+ this.set({
+ 'selected': false,
+ 'enhanced': false
+ });
},
showDetails: function () {
var selected = this.getSelected();