You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ba...@apache.org on 2006/04/03 18:16:48 UTC

svn commit: r391078 - /myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js

Author: baranda
Date: Mon Apr  3 09:16:40 2006
New Revision: 391078

URL: http://svn.apache.org/viewcvs?rev=391078&view=rev
Log:
Re-fixes TOMAHAWK-203. Thanks to Felix Röthenbacher

Modified:
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js

Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js?rev=391078&r1=391077&r2=391078&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js Mon Apr  3 09:16:40 2006
@@ -15,14 +15,14 @@
     if (link != null)
     {
         // changes by Richard J. Barbalace
-        if (link.match(/^\w*:\w*:\/\//) != null ) {
+        if (link.match(/^\w*:A\]\w*:\/\//) != null ) {
             // Link is a URL
-            link = link.replace(/^\w*:A/, "");  // Remove JSF ID
+            link = link.replace(/^\w*:A\]/, "");  // Remove JSF ID
             window.open (link, target);
-        } else if (link.match(/^\w*:\w*:/) != null ) {
+        } else if (link.match(/^\w*:A\]\w*:/) != null ) {
             // Link is a script method
-            link = link.replace(/^\w*:A/, "");  // Remove JSF ID
-            window.open (link, '_self');
+            link = link.replace(/^\w*:A\]\w*:/, "");  // Remove JSF ID
+            eval(link);
         } else {
             // Link is a JSF action
             var dummyForm = document.forms[target];
@@ -56,4 +56,4 @@
                 obj.className = prefix + 'MenuItemHover';
         }
     }
-}
\ No newline at end of file
+}