You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/06/28 15:42:34 UTC
svn commit: r551553 - in /lenya/trunk/src/modules/kupu: kupu.js sitemap.xmap
Author: andreas
Date: Thu Jun 28 06:42:33 2007
New Revision: 551553
URL: http://svn.apache.org/viewvc?view=rev&rev=551553
Log:
Use proxy-based URLs for Kupu image preview. See bug 42762.
Modified:
lenya/trunk/src/modules/kupu/kupu.js
lenya/trunk/src/modules/kupu/sitemap.xmap
Modified: lenya/trunk/src/modules/kupu/kupu.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/kupu/kupu.js?view=diff&rev=551553&r1=551552&r2=551553
==============================================================================
--- lenya/trunk/src/modules/kupu/kupu.js (original)
+++ lenya/trunk/src/modules/kupu/kupu.js Thu Jun 28 06:42:33 2007
@@ -81,6 +81,8 @@
var rootPath = cocoon.parameters["rootPath"];
var allNodes = site.getNode(rootPath).preOrder();
+ var baseUrl = cocoon.parameters["baseUrl"];
+
for (var i=0; i < allNodes.length; i++) {
if (allNodes[i].getPath().equals(pageEnvelope.getDocument().getPath()))
@@ -92,15 +94,13 @@
if (doc.getResourceType().getName().equals("resource")) {
var title = getTitle(doc);
- var url = doc.getCanonicalWebappURL();
+ var url = doc.getCanonicalDocumentURL();
url = url.substring(0, url.length() - 4);
url = url + doc.getSourceExtension();
imageInfos.add({
- "previewurl" : pageEnvelope.getContext() + url,
- "url" : pageEnvelope.getContext() + url,
- // FIXME: this uses UUIDs, but they are not resolved to URLs yet
- // "url" : "lenya-document:" + doc.getUUID(),
+ "previewurl" : baseUrl + url,
+ "url" : baseUrl + url,
"name" : doc.getName(),
"title" : title,
"length" : doc.getContentLength(),
Modified: lenya/trunk/src/modules/kupu/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/kupu/sitemap.xmap?view=diff&rev=551553&r1=551552&r2=551553
==============================================================================
--- lenya/trunk/src/modules/kupu/sitemap.xmap (original)
+++ lenya/trunk/src/modules/kupu/sitemap.xmap Thu Jun 28 06:42:33 2007
@@ -185,6 +185,7 @@
<map:parameter name="template" value="publication_image_library_template"/>
<map:parameter name="iconUrl" value="{proxy:/{global:resourceIconUrl}}"/>
<map:parameter name="rootPath" value=""/>
+ <map:parameter name="baseUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}}"/>
</map:call>
</map:match>
<map:match pattern="sitetree_link_library" type="step">
@@ -195,6 +196,7 @@
<map:parameter name="template" value="publication_image_library_template"/>
<map:parameter name="iconUrl" value="{proxy:/{global:resourceIconUrl}}"/>
<map:parameter name="rootPath" value="{page-envelope:document-path}"/>
+ <map:parameter name="baseUrl" value="{proxy:/{page-envelope:publication-id}/{page-envelope:area}}"/>
</map:call>
</map:match>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org