Author: justin
Date: Mon Sep 13 18:41:33 2010
New Revision: 996635

URL: http://svn.apache.org/viewvc?rev=996635&view=rev
Log:
SLING-1769 - fixing non-default workspace display

Modified:
    
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
    
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/item.esp

Modified: 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp?rev=996635&r1=996634&r2=996635&view=diff
==============================================================================
--- 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
 (original)
+++ 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/edit.esp
 Mon Sep 13 18:41:33 2010
@@ -21,6 +21,12 @@
  
 <%
     var path = resource.path;
+    
+    var wsSepPos = path.indexOf(":/", 0);
+    if (wsSepPos != -1) {
+        path = path.substring(wsSepPos + 1);
+    }
+    
     var readonly = false; 
        var dateFormatter = new Packages.java.text.SimpleDateFormat("dd.MM.yyyy 
HH:mm:ss");                             
 
@@ -48,7 +54,7 @@
        <div class="clear"></div>
 </div>
   
-<p><a href="<%= request.getContextPath() %><%= path 
%>.explorer.html"><%=path%></a> <%if(isJcrNode){%>(JCR identifier: <%= 
currentNode.getIdentifier() %>) <%}%> </p>
+<p><a href="<%= request.getContextPath() %><%= path 
%>.explorer.html"><%=resource.path%></a> <%if(isJcrNode){%>(JCR identifier: <%= 
currentNode.getIdentifier() %>) <%}%> </p>
     <%
     try {
         if ( session ) { // currentNode && 

Modified: 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/item.esp
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/item.esp?rev=996635&r1=996634&r2=996635&view=diff
==============================================================================
--- 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/item.esp
 (original)
+++ 
sling/trunk/bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/item.esp
 Mon Sep 13 18:41:33 2010
@@ -27,7 +27,15 @@ if (nodes.hasNext()) {
     while (nodes.hasNext()) {
       var child = nodes.next();
        var name = 
Packages.org.apache.sling.api.resource.ResourceUtil.getName(child);
-       var path = child.path.substr(1);
+       
+       var path = child.path;
+       
+       var wsSepPos = path.indexOf(":/", 0);
+    if (wsSepPos != -1) {
+        path = path.substring(wsSepPos + 1);
+    }
+       
+       path = path.substr(1);
        // WARNING: have a look at explorer.js - duplicate code!
        var id = path.replace(/\//g, "_");
        id = id.replace(/^_/, ""); // remove trailing _


Reply via email to