Module: nagvis
Branch: master
Commit: a6cea038b441314a426de63a1d1c0f632a7a1573
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=a6cea038b441314a426de63a1d1c0f632a7a1573

Author: Lars Michelsen <[email protected]>
Date:   Tue May 25 19:02:55 2010 +0200

#295 Hiding maps or automaps lists on overview page which are empty

---

 share/frontend/nagvis-js/js/frontend.js |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontend.js 
b/share/frontend/nagvis-js/js/frontend.js
index abf8fd3..403ff3f 100644
--- a/share/frontend/nagvis-js/js/frontend.js
+++ b/share/frontend/nagvis-js/js/frontend.js
@@ -1220,7 +1220,12 @@ function parseOverviewMaps(aMapsConf) {
        }
        
        // Render the maps when enabled
-       if(oPageProperties.showmaps == 1 && aMapsConf.length > 0) {
+       if(oPageProperties.showmaps == 1) {
+               if(aMapsConf.length == 0) {
+                       
document.getElementById('overviewMaps').parentNode.style.display = 'none';
+                       return false;
+               }
+               
                var oTable = document.getElementById('overviewMaps');
                var oTr = document.createElement('tr');
                        
@@ -1284,7 +1289,12 @@ function parseOverviewAutomaps(aMapsConf) {
        }
        
        // Render the maps when enabled
-       if(oPageProperties.showautomaps == 1 && aMapsConf.length > 0) {
+       if(oPageProperties.showautomaps == 1) {
+               if(aMapsConf.length == 0) {
+                       
document.getElementById('overviewAutomaps').parentNode.style.display = 'none';
+                       return false;
+               }
+               
                var oTable = document.getElementById('overviewAutomaps');
                var oTr = document.createElement('tr');
                


------------------------------------------------------------------------------

_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to