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 2016/11/30 12:29:20 UTC

svn commit: r1772021 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/ tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard...

Author: lofwyr
Date: Wed Nov 30 12:29:20 2016
New Revision: 1772021

URL: http://svn.apache.org/viewvc?rev=1772021&view=rev
Log:
clean up (CSP and other)

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java?rev=1772021&r1=1772020&r2=1772021&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PageRenderer.java Wed Nov 30 12:29:20 2016
@@ -329,8 +329,6 @@ public class PageRenderer extends Render
       RenderUtils.encode(facesContext, hidden);
     }
 
-    //checkForCommandFacet(component, facesContext, writer);
-
 // TODO: this is needed for the "BACK-BUTTON-PROBLEM"
 // but may no longer needed
 /*
@@ -371,11 +369,6 @@ public class PageRenderer extends Render
 
     final UIPage page = (UIPage) component;
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
-
-/*
-    writer.endElement(HtmlElements.DIV);
-*/
-
     final String clientId = page.getClientId(facesContext);
     final Application application = facesContext.getApplication();
     final ViewHandler viewHandler = application.getViewHandler();
@@ -412,39 +405,6 @@ public class PageRenderer extends Render
     }
   }
 
-  private void writeEventFunction(
-      final TobagoResponseWriter writer, final Collection<String> eventFunctions, final String event,
-      final boolean returnBoolean)
-      throws IOException {
-    if (!eventFunctions.isEmpty()) {
-      writer.write("Tobago.applicationOn");
-      writer.write(event);
-      writer.write(" = function(listenerOptions) {\n");
-      if (returnBoolean) {
-        writer.write("  var result;\n");
-      }
-      for (final String function : eventFunctions) {
-        if (returnBoolean) {
-          writer.write("  result = ");
-        } else {
-          writer.write("  ");
-        }
-        writer.write(function);
-        if (!function.trim().endsWith(";")) {
-          writer.write(";\n");
-        } else {
-          writer.write("\n");
-        }
-        if (returnBoolean) {
-          writer.write("  if (typeof result == \"boolean\" && ! result) {\n");
-          writer.write("    return false;\n");
-          writer.write("  }\n");
-        }
-      }
-      writer.write("\n  return true;\n}\n");
-    }
-  }
-
   private void encodeScript(final TobagoResponseWriter writer, final String script) throws IOException {
     writer.startElement(HtmlElements.SCRIPT);
     writer.writeAttribute(HtmlAttributes.SRC, script, true);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1772021&r1=1772020&r2=1772021&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Nov 30 12:29:20 2016
@@ -159,12 +159,6 @@ var Tobago = {
       }
     }
 
-    console.time("[tobago] applicationOnload"); // @DEV_ONLY
-    if (this.applicationOnload) {
-      this.applicationOnload();
-    }
-    console.timeEnd("[tobago] applicationOnload"); // @DEV_ONLY
-
     console.timeEnd("[tobago] init"); // @DEV_ONLY
   },
 
@@ -227,12 +221,6 @@ var Tobago = {
       }
     }
 
-    // deprecated:
-    if (this.isSubmit && this.applicationOnunload) {
-      this.applicationOnunload();
-    } else if (!this.isSubmit && this.applicationOnexit) {
-      this.applicationOnexit();
-    }
     this.destroyObjects();
   },