portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r921231 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main: java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java webapp/WEB-INF/view/spaces/page-navigator.jsp
Date Wed, 10 Mar 2010 05:48:27 GMT
Author: taylor
Date: Wed Mar 10 05:48:27 2010
New Revision: 921231

URL: http://svn.apache.org/viewvc?rev=921231&view=rev
Log:
 JS2-1121 - reviewing and testing page manager, fixed a few minor things
 

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/page-navigator.jsp

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java?rev=921231&r1=921230&r2=921231&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
Wed Mar 10 05:48:27 2010
@@ -292,7 +292,10 @@ public class SpaceNavigator extends Gene
         		s1 = s1 + Folder.PATH_SEPARATOR;    		
     	}
     	else
-       		s1 = Folder.PATH_SEPARATOR;    		
+    	{
+        	if (!s1.endsWith(Folder.PATH_SEPARATOR))
+        		s1 = s1 + Folder.PATH_SEPARATOR;    		    		
+    	}
     	start = s2.indexOf(Folder.PATH_SEPARATOR);
      	end = s2.lastIndexOf(Folder.PATH_SEPARATOR);
      	if (end > start)
@@ -300,10 +303,13 @@ public class SpaceNavigator extends Gene
      		if (s2.lastIndexOf(".") > end)
      			s2 = s2.substring(start, end);
         	if (!s2.endsWith(Folder.PATH_SEPARATOR))
-        		s2 = s2 + Folder.PATH_SEPARATOR;     		
+        		s2 = s2 + Folder.PATH_SEPARATOR;    		     		
      	}
      	else
-       		s2 = Folder.PATH_SEPARATOR;
+     	{
+        	if (!s2.endsWith(Folder.PATH_SEPARATOR))
+        		s2 = s2 + Folder.PATH_SEPARATOR;     		
+     	}
     	return s1.equals(s2);
     }
     

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/page-navigator.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/page-navigator.jsp?rev=921231&r1=921230&r2=921231&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/page-navigator.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/page-navigator.jsp
Wed Mar 10 05:48:27 2010
@@ -55,7 +55,7 @@ private void printMenuItem(MenuElement e
     String title = element.getTitle(renderRequest.getLocale());
     
     if (MenuElement.MENU_ELEMENT_TYPE.equals(type))
-    {
+    { 
         out.write("<li type='" + type + "' nodeType='" + nodeType + "' editable='" + editable
+ "' path='" + path + "' class='closed'>");
         out.write("<a href='#'>" + title + "</a>");
         out.write("\n");
@@ -266,13 +266,17 @@ YUI().use('jetui-portal', 'io', 'json', 
         if (titleElem && title) {
             titleElem.set("text", title);
         }
+        if (nodePopupMenu == null) {
+            nodePopupMenu = Y.Node.one("#<portlet:namespace/>nodePopupMenu");
+        }        
+        nodePopupMenu.setStyle("display", "none");
     };
     
     var onRenameClick = function(e) {
-        if (!curNodeListItem) {
+    	if (!curNodeListItem) {
             return;
         }
-        var path = curNodeListItem.getAttribute("path");
+    	var path = curNodeListItem.getAttribute("path");
         var nodeType = curNodeListItem.getAttribute("nodeType");
         var currentTitle = curNodeListItem.one("A").get("text");
         var title = prompt("Please enter the title.", currentTitle);
@@ -294,6 +298,10 @@ YUI().use('jetui-portal', 'io', 'json', 
         if (listItem) {
             listItem.remove();
         }
+        if (nodePopupMenu == null) {
+            nodePopupMenu = Y.Node.one("#<portlet:namespace/>nodePopupMenu");
+        }        
+        nodePopupMenu.setStyle("display", "none");        
     };
     
     var onDeleteClick = function(e) {



---------------------------------------------------------------------
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