portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r820734 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp: WEB-INF/conf/reverseproxy.properties javascript/iframe_handler.js
Date Thu, 01 Oct 2009 17:57:55 GMT
Author: woonsan
Date: Thu Oct  1 17:57:54 2009
New Revision: 820734

URL: http://svn.apache.org/viewvc?rev=820734&view=rev
Log:
JS2-1071: Allowing glob expressions in pass mapping configurations and adding missing javascript
file.

Added:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
  (with props)
Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/conf/reverseproxy.properties

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/conf/reverseproxy.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/conf/reverseproxy.properties?rev=820734&r1=820733&r2=820734&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/conf/reverseproxy.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/conf/reverseproxy.properties
Thu Oct  1 17:57:54 2009
@@ -75,18 +75,15 @@
 
 # ... Sets detail attributes for each path item.
 
-proxy.reverse.pass.apache.local = /apache/
-proxy.reverse.pass.apache.remote = http://www.apache.org/
-
-proxy.reverse.pass.portals.local = /portals/
-proxy.reverse.pass.portals.remote = http://portals.apache.org/
-proxy.reverse.pass.portals.rewriter.basic = org.apache.portals.applications.webcontent.rewriter.WebContentRewriter
-proxy.reverse.pass.portals.rewriter.parserAdaptor = html
+proxy.reverse.pass.apache.local = /*_apache/
+proxy.reverse.pass.apache.remote = http://$1.apache.org/
+proxy.reverse.pass.apache.rewriter.basic = org.apache.portals.applications.webcontent.rewriter.WebContentRewriter
+proxy.reverse.pass.apache.rewriter.parserAdaptor = html
 # ... SimpleLinkRewritingParserAaptor rewrites links only based on its remote base URLs,
 # ... while PassMappingLinkRewritingParserAaptor rewrites links based on all reverse proxy
pass mappings.
 #proxy.reverse.pass.portals.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.SimpleLinkRewritingParserAaptor
-proxy.reverse.pass.portals.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.PassMappingLinkRewritingParserAaptor
-proxy.reverse.pass.portals.rewriter.parserAdaptor.html.mimeType = text/html
+proxy.reverse.pass.apache.rewriter.parserAdaptor.html = org.apache.portals.applications.webcontent.proxy.impl.PassMappingLinkRewritingParserAaptor
+proxy.reverse.pass.apache.rewriter.parserAdaptor.html.mimeType = text/html
 
 proxy.reverse.pass.localhost.local = /localhost/
 proxy.reverse.pass.localhost.remote = http://localhost:8080/

Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js?rev=820734&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
(added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
Thu Oct  1 17:57:54 2009
@@ -0,0 +1,94 @@
+/*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+function iframePortlet_resetHeight(iframe) {
+  try {
+    if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) {
+      iframe.height = iframe.contentDocument.body.offsetHeight + 16;
+    } else if (iframe.Document && iframe.Document.body.scrollHeight) {
+      iframe.height = iframe.Document.body.scrollHeight;
+    }
+  } catch (e) {
+  }
+}
+function iframePortlet_onreadystatechange() {
+}
+function iframePortlet_recordVisitPage(iframe) {
+  try {
+    var xmlHttp = (window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"));
+    var visitedPage = "" + iframe.contentWindow.location.href;
+    if (window.location.href.match(/^(https?:\/\/[^\/]+)\/?/)) {
+      var baseURL = "" + RegExp.$1;
+      if (visitedPage.indexOf(baseURL) == 0) {
+        visitedPage = visitedPage.substring(baseURL.length);
+      }
+    }
+    var visitResourceURL = "" + iframe.getAttribute("visitresourceurl");
+    visitResourceURL += (visitResourceURL.indexOf("?") > 0 ? "&" : "?");
+    visitResourceURL += ("URL=" + encodeURIComponent(visitedPage));
+    xmlHttp.open("GET", visitResourceURL, true);
+    xmlHttp.onreadystatechange = iframePortlet_onreadystatechange;
+    xmlHttp.send(null);
+  } catch (e) {
+  }
+}
+function iframePortlet_attachEvents(iframe) {
+  try {
+    if (window.addEventListener) {
+      iframe.addEventListener("load", iframePortlet_iframeOnLoad, false);
+    } else if (window.attachEvent) {
+      iframe.detachEvent("onload", iframePortlet_iframeOnLoad);;
+      iframe.attachEvent("onload", iframePortlet_iframeOnLoad);
+    }
+  } catch (e) {
+  }
+}
+function iframePortlet_iframeOnLoad(evt) {
+  var iframe = (window.event ? window.event.srcElement : evt.currentTarget);
+  if (iframe) {
+    var autoResize = "" + iframe.getAttribute("autoresize");
+    if (autoResize.match(/^(true)|(yes)|(on)$/i)) {
+      iframePortlet_resetHeight(iframe);
+    }
+    var visitLastPage = "" + iframe.getAttribute("visitlastpage");
+    if (visitLastPage.match(/^(true)|(yes)|(on)$/i)) {
+        iframePortlet_recordVisitPage(iframe);
+    }
+  }
+}
+var iframePortlet_iframesContainerOnLoad_working = false;
+function iframePortlet_iframesContainerOnLoad() {
+  if (iframePortlet_iframesContainerOnLoad_working) return;
+  iframePortlet_iframesContainerOnLoad_working = true;
+  var iframes = document.getElementsByTagName("IFRAME");
+  for (var i = 0; i < iframes.length; i++) {
+    var autoResize = "" + iframes[i].getAttribute("autoresize");
+    if (autoResize.match(/^(true)|(yes)|(on)$/i)) {
+      iframePortlet_resetHeight(iframes[i]);
+    }
+    var visitLastPage = "" + iframes[i].getAttribute("visitlastpage");
+    if (visitLastPage.match(/^(true)|(yes)|(on)$/i)) {
+        iframePortlet_recordVisitPage(iframes[i]);
+    }
+    iframePortlet_attachEvents(iframes[i]);
+  }
+  iframePortlet_iframesContainerOnLoad_working = false;
+}
+if (window.addEventListener) {
+  window.addEventListener("load", iframePortlet_iframesContainerOnLoad, false);
+} else if (window.attachEvent) {
+  window.attachEvent("onload", iframePortlet_iframesContainerOnLoad)
+}

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/javascript/iframe_handler.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message