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

Author: LaMi <[email protected]>
Date:   Sat Nov  7 16:58:02 2009 +0100

Dont show "undefined" title when no title set in messages

---

 share/frontend/nagvis-js/js/frontendMessage.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontendMessage.js 
b/share/frontend/nagvis-js/js/frontendMessage.js
index 02a468f..2ea3983 100644
--- a/share/frontend/nagvis-js/js/frontendMessage.js
+++ b/share/frontend/nagvis-js/js/frontendMessage.js
@@ -46,7 +46,13 @@ function frontendMessage(oMessage, iTimeout) {
        var oRow;
        var oCell;
        var oImg;
+       
        var sBoxType = oMessage.type.toLowerCase();
+       var sTitle = '';
+       
+       if(typeof oMessage.title !== 'undefined') {
+               sTitle = oMessage.title;
+       }
        
        // Set a close timeout when called to do so
        if(typeof iTimeout !== 'undefined') {
@@ -114,7 +120,7 @@ function frontendMessage(oMessage, iTimeout) {
        oCell.style.width = '474px';
        oCell.setAttribute('class', sBoxType);
        oCell.setAttribute('className', sBoxType);
-       oCell.appendChild(document.createTextNode(oMessage.title));
+       oCell.appendChild(document.createTextNode(sTitle));
        
        oRow.appendChild(oCell);
        oCell = null;


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to