WEB UI -- Simplified listener mechanism in theme.js to match that of prefs.js
- minor cleanup of app.js
Change-Id: I1a05c5cb43c994937747ef69841d24a863128f4d
diff --git a/web/gui/src/main/webapp/app/view/topo/topoInst.js b/web/gui/src/main/webapp/app/view/topo/topoInst.js
index 1d0cbed..22e2b47 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoInst.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoInst.js
@@ -43,12 +43,9 @@
var onosInstances,
onosOrder,
oiShowMaster,
- oiBox,
- themeListener;
+ oiBox;
- // ==========================
-
function addInstance(data) {
var id = data.id;
@@ -273,12 +270,11 @@
oiShowMaster = false;
// we want to update the instances, each time the theme changes
- themeListener = ts.addListener(updateInstances);
+ ts.addListener(updateInstances);
}
function destroyInst() {
- ts.removeListener(themeListener);
- themeListener = null;
+ ts.removeListener(updateInstances);
ps.destroyPanel(idIns);
oiBox = null;