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

Author: Lars Michelsen <[email protected]>
Date:   Tue Aug  3 01:03:42 2010 +0200

#338 Fixed small bug in context menu rendering code (Unable to show menu when 
there were more than 1 dashes in the name)

---

 share/frontend/nagvis-js/js/frontendContext.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontendContext.js 
b/share/frontend/nagvis-js/js/frontendContext.js
index c2e305c..2015f85 100644
--- a/share/frontend/nagvis-js/js/frontendContext.js
+++ b/share/frontend/nagvis-js/js/frontendContext.js
@@ -145,11 +145,8 @@ function contextShow(event) {
                // Only the object id is interesing so remove the other contents
                // like -icon or -line. Simply split the string by - and take 
the
                // first element
-               if(id.indexOf('-') !== -1) {
-                       var aId = id.split("-");
-                       id = aId[0];
-                       aId = null;
-               }
+               if(id.indexOf('-') !== -1)
+                       id = id.substr(0, id.lastIndexOf('-'));
                
                var contextMenu = document.getElementById(id+'-context');
 


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to