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

Author: LaMi <[email protected]>
Date:   Wed Mar 17 20:57:55 2010 +0100

#222 Fixed JS error in labels/textboxes which use custom styles

---

 share/frontend/nagvis-js/js/nagvis.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/share/frontend/nagvis-js/js/nagvis.js 
b/share/frontend/nagvis-js/js/nagvis.js
index 8a90f78..32328bf 100644
--- a/share/frontend/nagvis-js/js/nagvis.js
+++ b/share/frontend/nagvis-js/js/nagvis.js
@@ -959,13 +959,16 @@ function drawNagVisTextbox(id, className, bgColor, 
borderColor, x, y, z, w, h, t
                                
                                if(aOpt[0] && aOpt[0] != '' && aOpt[1] && 
aOpt[1] != '') {
                                        var sKey = 
aOpt[0].replace(/(-[a-zA-Z])/g, '$1');
+                                       alert(sKey);
                                        
                                        var regex = /(-[a-zA-Z])/;
                                        var result = regex.exec(aOpt[0]);
                                        
-                                       for (var i = 1; i < result.length; i++) 
{
-                                               var fixed = 
result[i].replace('-', '').toUpperCase();
-                                               sKey = sKey.replace(result[i], 
fixed);
+                                       if(result !== null) {
+                                               for (var i = 1; i < 
result.length; i++) {
+                                                       var fixed = 
result[i].replace('-', '').toUpperCase();
+                                                       sKey = 
sKey.replace(result[i], fixed);
+                                               }
                                        }
                                        
                                        oLabelSpan.style[sKey] = aOpt[1];


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to