portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r892288 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp: WEB-INF/view/toolbox/toolbox.jsp images/preview/preview-na.png
Date Fri, 18 Dec 2009 16:00:35 GMT
Author: woonsan
Date: Fri Dec 18 16:00:33 2009
New Revision: 892288

URL: http://svn.apache.org/viewvc?rev=892288&view=rev
Log:
JS2-1057: Fixing preview window title

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/images/preview/preview-na.png

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp?rev=892288&r1=892287&r2=892288&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
Fri Dec 18 16:00:33 2009
@@ -408,7 +408,8 @@
             }
             
             var nameNode = clone.one('div');
-            nameNode.setContent(def.displayNames[0].value);
+            var portletDisplayName = def.displayNames[0].value;
+            nameNode.setContent(portletDisplayName);
 
             <c:choose>
 	            <c:when test="${editAccess}">
@@ -422,7 +423,9 @@
 	        </c:choose>
             
             var previewLink = clone.one("[name='preview']");
-            Y.Node.getDOMNode(previewLink).setAttribute("portletUniqueName", def.uniqueName);
+            var previewLinkNode = Y.Node.getDOMNode(previewLink);
+            previewLinkNode.setAttribute("portletUniqueName", def.uniqueName);
+            previewLinkNode.setAttribute("portletDisplayName", portletDisplayName);
             previewLink.on("click", previewPortlet);
             
             clone.set("id", "<portlet:namespace/>portletItem-" + def.uniqueName);
@@ -557,7 +560,8 @@
     };
     
     var onPreviewPortletComplete = function(id, o, args) {
-        var point = args.complete;
+        var point = args.complete[0];
+        var portletDisplayName = args.complete[1];
         var previewNode = Y.Node.getDOMNode(Y.Node.one("#<portlet:namespace/>previewOverlay"));
         var windowWidth = window.innerWidth;
         var windowHeight = window.innerHeight;
@@ -578,7 +582,7 @@
                 "<div class='PContentBorder'><div class='PContent'></div></div>"
+
                 "</div>"
                 );
-        previewPortletWindow.one(".PTitleContent").setContent("PickANumber");
+        previewPortletWindow.one(".PTitleContent").setContent(portletDisplayName);
         previewPortletWindow.one(".PContent").setContent(o.responseText);
         previewOverlay.set("bodyContent", previewPortletWindow);
         previewOverlay.render();
@@ -599,13 +603,14 @@
     var previewPortlet = function(e) {
         var a = Y.Node.getDOMNode(e.target);
         var portletUniqueName = a.getAttribute("portletUniqueName");
+        var portletDisplayName = a.getAttribute("portletDisplayName");
         if (portletUniqueName) {
             if (previewOverlay) {
                 previewOverlay.hide();
             }
             var point = [ e.pageX, e.pageY ];
             var uri = "${portalContextPath}/portlet/?mode=preview&portlet=" + portletUniqueName
+ "&entity=" + portletUniqueName;
-            var request = Y.io(uri, { on: { complete: onPreviewPortletComplete }, arguments:
{ complete: point } });
+            var request = Y.io(uri, { on: { complete: onPreviewPortletComplete }, arguments:
{ complete: [ point, portletDisplayName ] } });
         }
         
         e.halt();

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/images/preview/preview-na.png
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/images/preview/preview-na.png?rev=892288&r1=892287&r2=892288&view=diff
==============================================================================
Binary files - no diff available.



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