You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2013/08/19 15:27:00 UTC

svn commit: r1515404 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Author: weber
Date: Mon Aug 19 13:27:00 2013
New Revision: 1515404

URL: http://svn.apache.org/r1515404
Log:
TOBAGO-1299 - tc:link ignores target attribute

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1515404&r1=1515403&r2=1515404&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Mon Aug 19 13:27:00 2013
@@ -908,7 +908,13 @@ var Tobago = {
                   Tobago.reloadComponent(this, commands.click.partially, action, commands.click);
                 }
               } else if (commands.click.url) {
-                Tobago.navigateToUrl(commands.click.url);
+                if (commands.click.target) {
+                  window.open(commands.click.url, commands.click.target)
+                } else {
+                  Tobago.navigateToUrl(commands.click.url);
+                  event.preventDefault();
+                  return false;
+                }
               } else if (commands.click.script) { // XXX this case is deprecated.
                 // not allowed with Content Security Policy (CSP)
                 new Function('event' , commands.click.script)(event);