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 2018/12/06 16:54:17 UTC

[myfaces-tobago] 04/04: TOBAGO-1965: Remove JavaScript for Codi

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

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

commit ad10a2662002398590b8bab7ae536ea0f5661dee
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Dec 6 17:53:47 2018 +0100

    TOBAGO-1965: Remove JavaScript for Codi
---
 .../tobago-bootstrap/_version/js/tobago.js         | 48 ----------------------
 1 file changed, 48 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
index 180a970..f9c36c2 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago.js
@@ -1331,54 +1331,6 @@ Tobago.registerListener(Tobago.MessagePopover.init, Tobago.Phase.AFTER_UPDATE);
 
 // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-Tobago.Codi = {};
-
-/**
- * If the window has no name set we set the name and request a new view with unset windowId, so that the
- * server will generate a new one for us.
- */
-Tobago.Codi.init = function() {
-
-  var form = Tobago.findForm();
-  var action = form.attr("action");
-  var windowIdEnabled = Tobago.Codi.hasUrlWindowId(action);
-  if (windowIdEnabled && window.name == "") {
-    form.attr("action", Tobago.Codi.urlWithoutWindowId(action));
-    window.name = "window";
-    Tobago.submitAction();
-  }
-};
-
-Tobago.Codi.hasUrlWindowId = function(base) {
-  return base.indexOf("?windowId=") > -1 || base.indexOf("&windowId=") > -1;
-};
-
-/**
- * taken from myfaces-extcdi (Codi)
- */
-Tobago.Codi.urlWithoutWindowId = function(query) {
-    var vars = query.split(/&|\?/g);
-    var newQuery = "";
-    var iParam = 0;
-    for (var i=0; vars !== null && i < vars.length; i++) {
-        var pair = vars[i].split("=");
-        if (pair.length === 1) {
-            newQuery = pair[0];
-        }
-        else {
-            if (pair[0] !== "windowId") {
-                var amp = iParam++ > 0 ? "&" : "?";
-                newQuery =  newQuery + amp + pair[0] + "=" + pair[1];
-            }
-        }
-    }
-    return newQuery;
-};
-
-Tobago.registerListener(Tobago.Codi.init, Tobago.Phase.DOCUMENT_READY);
-
-// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 Tobago.Jsf = {
   VIEW_STATE: "javax.faces.ViewState",
   CLIENT_WINDOW: "javax.faces.ClientWindow",