From ebb539842ccad977a721b4eb515099ced8bc30c0 Mon Sep 17 00:00:00 2001 From: Nicolai Tellefsen Date: Wed, 23 Mar 2016 04:43:16 +0100 Subject: Hide info-box on successful save --- web/nms.gathering.org/js/nms-info-box.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/nms.gathering.org/js/nms-info-box.js') diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index 0b90d49..ba07275 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -344,6 +344,10 @@ nmsInfoBox._windowTypes.switchInfo = { dataType: "text", data:myData, success: function (data, textStatus, jqXHR) { + var result = JSON.parse(data); + if(result.switches_updated.length > 0) { // FIXME unresolved variable switches_addded + nmsInfoBox.hide(); + } nmsData.invalidate("switches"); nmsData.invalidate("smanagement"); } -- cgit v1.2.3 From 19cc542fc388edf953211c0c19bb2ed7b8da536f Mon Sep 17 00:00:00 2001 From: Nicolai Tellefsen Date: Wed, 23 Mar 2016 05:02:14 +0100 Subject: NMS: Switch info window style adjustments --- web/nms.gathering.org/js/nms-info-box.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/js/nms-info-box.js') diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index ba07275..304a8d9 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -209,7 +209,7 @@ nmsInfoBox._windowTypes.switchInfo = { } }, getTitle: function() { - return ' ' + this.sw + ''; + return '

' + this.sw + '

'; }, getContent: function() { return this.content; @@ -387,6 +387,7 @@ nmsInfoBox._makeTable = function(content, caption) { } for (var v in content) { tr = table.insertRow(-1); + tr.className = content[v][0].toLowerCase(); td1 = tr.insertCell(0); td2 = tr.insertCell(1); td1.innerHTML = content[v][0]; -- cgit v1.2.3