portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r921905 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main: resources/org/apache/jetspeed/portlets/spaces/resources/ webapp/WEB-INF/view/spaces/
Date Thu, 11 Mar 2010 15:50:31 GMT
Author: woonsan
Date: Thu Mar 11 15:50:30 2010
New Revision: 921905

URL: http://svn.apache.org/viewvc?rev=921905&view=rev
Log:
JS2-1057: Noto copy/move an item when there already exists the same item in the target folder.

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_en.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_ko.properties
    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/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties?rev=921905&r1=921904&r2=921905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
Thu Mar 11 15:50:30 2010
@@ -45,3 +45,4 @@ spaces.pages.message.confirm.choosefolde
 spaces.pages.message.confirm.move = Are you sure to move this item?
 spaces.pages.message.confirm.copy = Are you sure to copy this item?
 spaces.pages.message.choose.different.target = Please choose a different target folder from
the current folder.
+spaces.pages.message.choose.existing.target = There already exists the same item in the target
folder.

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_en.properties?rev=921905&r1=921904&r2=921905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_en.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_en.properties
Thu Mar 11 15:50:30 2010
@@ -45,3 +45,4 @@ spaces.pages.message.confirm.choosefolde
 spaces.pages.message.confirm.move = Are you sure to move this item?
 spaces.pages.message.confirm.copy = Are you sure to copy this item?
 spaces.pages.message.choose.different.target = Please choose a different target folder from
the current folder.
+spaces.pages.message.choose.existing.target = There already exists the same item in the target
folder.

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_ko.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_ko.properties?rev=921905&r1=921904&r2=921905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_ko.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources_ko.properties
Thu Mar 11 15:50:30 2010
@@ -45,3 +45,4 @@ spaces.pages.message.confirm.choosefolde
 spaces.pages.message.confirm.move = \uc774 \ud56d\ubaa9\uc744 \uc774\ub3d9\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?
 spaces.pages.message.confirm.copy = \uc774 \ud56d\ubaa9\uc744 \ubcf5\uc0ac\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?
 spaces.pages.message.choose.different.target = \ud604\uc7ac\uc758 \ud3f4\ub354\uc640 \ub2e4\ub978
\ub300\uc0c1 \ud3f4\ub354\ub97c \uc120\ud0dd\ud558\uc2ed\uc2dc\uc624.
+spaces.pages.message.choose.existing.target = \ud574\ub2f9 \ud56d\ubaa9\uc774 \ub300\uc0c1
\ud3f4\ub354\uc5d0 \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e4.

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=921905&r1=921904&r2=921905&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
Thu Mar 11 15:50:30 2010
@@ -215,9 +215,9 @@ for (MenuElement element : linkElements)
     <div style="WIDTH: 100%; HEIGHT: 200px; OVERFLOW: auto">
       <form id="<portlet:namespace/>targetFolderForm">
         <ul class="navmenu">
-          <li path='<%=space.getPath()%>' class='expanded'>
-            <input type='radio' name='targetFolder' value='<%=space.getPath()%>'/>
-            <a href='#'><%=space.getTitle()%></a>
+          <li path='${space.path}' class='expanded'>
+            <input type='radio' name='targetFolder' value='${space.path}'/>
+            <a href='#'>${space.title}</a>
             <ul id="<portlet:namespace/>targetSubFolders" class="navmenu">
             </ul>
           </li>
@@ -370,13 +370,19 @@ YUI().use('jetui-portal', 'io', 'json', 
         var targetPath = args.complete[2];
         if (listItem && target && targetPath) {
             var pageNavMenu = Y.Node.one("#<portlet:namespace/>pageNavMenu");
-            pageNavMenu.all("LI").each(function(v, k) {
-                if (target == v.getAttribute("path")) {
-                    var clonedListItem = listItem.cloneNode(true);
-                    clonedListItem.setAttribute("path", targetPath);
-                    v.one("UL").append(clonedListItem);
-                }
-            });
+            if (target == "${space.path}") {
+                var clonedListItem = listItem.cloneNode(true);
+                clonedListItem.setAttribute("path", targetPath);
+                pageNavMenu.append(clonedListItem);
+            } else {
+	            pageNavMenu.all("LI").each(function(v, k) {
+	                if (target == v.getAttribute("path")) {
+	                    var clonedListItem = listItem.cloneNode(true);
+	                    clonedListItem.setAttribute("path", targetPath);
+	                    v.one("UL").append(clonedListItem);
+	                }
+	            });
+            }
             resetMenuItemEventHandlers();
         }
     };
@@ -401,6 +407,11 @@ YUI().use('jetui-portal', 'io', 'json', 
                 e.halt();
                 return;
             }
+            if (Y.Node.one("#<portlet:namespace/>pageNavMenu").one("LI[path='" + targetPath
+ "']")) {
+                alert("<fmt:message key='spaces.pages.message.choose.existing.target'/>");
+                e.halt();
+                return;
+            }
             if (currentFolderChoosingMode == "move") {
                 var cf = confirm("<fmt:message key='spaces.pages.message.confirm.move'/>");
                 if (cf) {



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