deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject deltaspike git commit: DELTASPIKE-1150 Ignore "external" links in CLIENTWINDOW-mode
Date Fri, 20 May 2016 16:32:40 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 531f0450d -> b67298237


DELTASPIKE-1150 Ignore "external" links in CLIENTWINDOW-mode

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/b6729823
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/b6729823
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/b6729823

Branch: refs/heads/master
Commit: b672982373ccbbeaba8b7b436a93d634783a6248
Parents: 531f045
Author: tandraschko <tandraschko@apache.org>
Authored: Fri May 20 18:31:49 2016 +0200
Committer: tandraschko <tandraschko@apache.org>
Committed: Fri May 20 18:31:49 2016 +0200

----------------------------------------------------------------------
 .../resources/META-INF/resources/deltaspike/windowhandler.js   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b6729823/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
index 12dbd0c..9789a24 100644
--- a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
+++ b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/resources/deltaspike/windowhandler.js
@@ -124,7 +124,9 @@ window.dswh = window.dswh || {
                     for (var i = 0; i < links.length; i++) {
                         var link = links[i];
 
-                        if (dswh.strategy.CLIENTWINDOW.isHrefDefined(link) === true) {
+                        var target = link.getAttribute('target');
+
+                        if (dswh.strategy.CLIENTWINDOW.isHrefDefined(link) === true &&
(!target || target === '_self')) {
                             if (!link.onclick) {
                                 link.onclick = function() {
                                     if (storeWindowTreeEnabled) {
@@ -566,7 +568,7 @@ window.dswh = window.dswh || {
         generateNewRequestToken : function() {
             return "" + Math.floor(Math.random() * 999);
         },
-        
+
         generateNewWindowId : function() {
             return "" + Math.floor((Math.random() * (9999 - 1000)) + 1000);
         },


Mime
View raw message