You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2020/12/04 10:47:45 UTC

[myfaces-tobago] branch tobago-4.x updated: Update Deltaspike to 1.9.4

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-4.x by this push:
     new 46ec9e4  Update Deltaspike to 1.9.4
46ec9e4 is described below

commit 46ec9e41a63be431137021c42ba31d8145e30e87
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Fri Dec 4 11:47:25 2020 +0100

    Update Deltaspike to 1.9.4
---
 tobago-example/tobago-example-demo/pom.xml         |  2 +-
 .../_version/js/tobago-deltaspike.js               | 29 ++++++++++++++++------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/tobago-example/tobago-example-demo/pom.xml b/tobago-example/tobago-example-demo/pom.xml
index 282572e..3a54a4c 100644
--- a/tobago-example/tobago-example-demo/pom.xml
+++ b/tobago-example/tobago-example-demo/pom.xml
@@ -32,7 +32,7 @@
   -->
 
   <properties>
-    <deltaspike.version>1.9.3</deltaspike.version>
+    <deltaspike.version>1.9.4</deltaspike.version>
     <selenium.version>3.141.59</selenium.version>
     <meecrowave.version>1.2.8</meecrowave.version>
     <tomcat.version>9.0.24</tomcat.version>
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-deltaspike.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-deltaspike.js
index 92de9af..523ee79 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-deltaspike.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-deltaspike.js
@@ -28,7 +28,7 @@ jQuery(document).ready(function() {
   }
 });
 
-// taken from deltaspike 1.9.1
+// taken from deltaspike 1.9.4
 
 window.dswh = window.dswh || {
 
@@ -258,7 +258,7 @@ window.dswh = window.dswh || {
               return false;
             }
 
-            if (href === '#') {
+            if (href.indexOf('#') === 0) {
               return false;
             }
 
@@ -437,24 +437,39 @@ window.dswh = window.dswh || {
 
       utils : {
 
+        findRootWindow: function() {
+            var w = window;
+            while(w.frameElement) {
+                var parent = w.parent;
+                if (parent === undefined) {
+                    break;
+                }
+                w = parent;
+            };
+
+            return w;
+        },
+
         isWindowNameDefined : function() {
-          return window.name && window.name.length > 0;
+            var w = dswh.utils.findRootWindow();
+            return w.name && w.name.length > 0;
         },
 
         isManagedWindowName : function() {
-          if (!window.name) {
+            var w = dswh.utils.findRootWindow();
+            if (!w.name) {
             return false;
           }
 
-          return window.name.indexOf(dswh.MANAGED_WINDOW_NAME_PREFIX) === 0;
+            return w.name.indexOf(dswh.MANAGED_WINDOW_NAME_PREFIX) === 0;
         },
 
         getWindowIdFromWindowName : function() {
-          return window.name.substring(dswh.MANAGED_WINDOW_NAME_PREFIX.length);
+            return dswh.utils.findRootWindow().name.substring(dswh.MANAGED_WINDOW_NAME_PREFIX.length);
         },
 
         setWindowIdAsWindowName : function(windowId) {
-          window.name = dswh.MANAGED_WINDOW_NAME_PREFIX + windowId;
+            dswh.utils.findRootWindow().name = dswh.MANAGED_WINDOW_NAME_PREFIX + windowId;
         },
 
         requestNewWindowId : function() {