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 2021/02/01 14:10:34 UTC

[myfaces-tobago] branch tobago-4.x updated: fix: Double Request/Response when not using DeltaSpike issue: TOBAGO-2067

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 7648cfd  fix: Double Request/Response when not using DeltaSpike issue: TOBAGO-2067
7648cfd is described below

commit 7648cfde8b30fd32328551d7dc7686336265f770
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Mon Feb 1 15:09:15 2021 +0100

    fix: Double Request/Response when not using DeltaSpike
    issue: TOBAGO-2067
---
 .../tobago-bootstrap/_version/js/tobago-deltaspike.js | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

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 523ee79..abb8ac2 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
@@ -17,14 +17,17 @@
  * under the License.
  */
 
-jQuery(document).ready(function() {
-  var dswid = location.search.replace(/.*dswid=(\-?[0-9]+).*/, "$1");
-  if (dswid) {
-    dswh.init(dswid, 'LAZY', 10, {
-      'tokenizedRedirect': false,
-      'storeWindowTreeOnLinkClick': true,
-      'storeWindowTreeOnButtonClick': false
-    });
+jQuery(document).ready(function () {
+  var regexp = /.*dswid=(-?[0-9]+).*/;
+  if (location.search.match(regexp)) {
+    var dswid = location.search.replace(regexp, "$1");
+    if (dswid) {
+      dswh.init(dswid, 'LAZY', 10, {
+        'tokenizedRedirect': false,
+        'storeWindowTreeOnLinkClick': true,
+        'storeWindowTreeOnButtonClick': false
+      });
+    }
   }
 });