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 2022/12/14 10:50:39 UTC

[myfaces-tobago] branch main updated: fix: avoid missing overlay warning for faces reponses (#3536)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new b5f28adba4 fix: avoid missing overlay warning for faces reponses (#3536)
b5f28adba4 is described below

commit b5f28adba4a625d8e272210064e85936fcfacb32
Author: Bernd Bohmann <bo...@apache.org>
AuthorDate: Wed Dec 14 11:50:32 2022 +0100

    fix: avoid missing overlay warning for faces reponses (#3536)
---
 tobago-theme/tobago-theme-standard/src/main/js/tobago.js |  2 +-
 .../tobago-theme-standard/src/main/js/tobago.js.map      |  2 +-
 .../tobago-theme-standard/src/main/ts/tobago-page.ts     | 16 +++-------------
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
index e4af69d486..f3d27e1c20 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
@@ -4,5 +4,5 @@
     * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
     * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
     */
-const Me="transitionend",De=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t},Be=e=>{const t=De(e);return t&&document.querySelector(t)?t:null},Pe=e=>{const t=De(e);return t?document.querySelector(t):null},qe=e=>{e.dispatchEvent(new Event(Me))},He=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&( [...]
+const Me="transitionend",De=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let s=e.getAttribute("href");if(!s||!s.includes("#")&&!s.startsWith("."))return null;s.includes("#")&&!s.startsWith("#")&&(s=`#${s.split("#")[1]}`),t=s&&"#"!==s?s.trim():null}return t},Be=e=>{const t=De(e);return t&&document.querySelector(t)?t:null},Pe=e=>{const t=De(e);return t?document.querySelector(t):null},qe=e=>{e.dispatchEvent(new Event(Me))},He=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&( [...]
 //# sourceMappingURL=tobago.js.map
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
index 089080472d..5a4b93c201 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["../ts/tobago-bar.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_m [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["../ts/tobago-bar.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_m [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
index e5a3a15873..5b7717f446 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-page.ts
@@ -155,7 +155,7 @@ export class Page extends HTMLElement {
 
   facesResponseComplete(update: Element): void {
     const id = update.id;
-    if (FacesParameter.isFacesId(id)) {
+    if (!FacesParameter.isInternalFacesId(id)) {
       console.debug("[tobago-faces] Update after faces.ajax complete: #", id);
       const overlay = this.querySelector(`tobago-overlay[for='${id}']`);
       if (overlay) {
@@ -223,18 +223,8 @@ class FacesParameter {
   static VIEW_BODY = "jakarta.faces.ViewBody";
   static RESOURCE = "jakarta.faces.Resource";
 
-  static isFacesId(id: string): boolean {
-    switch (id) {
-      case FacesParameter.VIEW_STATE:
-      case FacesParameter.CLIENT_WINDOW:
-      case FacesParameter.VIEW_ROOT:
-      case FacesParameter.VIEW_HEAD:
-      case FacesParameter.VIEW_BODY:
-      case FacesParameter.RESOURCE:
-        return false;
-      default:
-        return true;
-    }
+  static isInternalFacesId(id: string): boolean {
+    return id.indexOf("jakarta.faces.") !== -1;
   }
 
   static isFacesBody(id): boolean {