[portal-commits] JBoss Portal SVN: r11910 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Sep 16 16:23:48 EDT 2008


Author: prabhat.jha at jboss.com
Date: 2008-09-16 16:23:48 -0400 (Tue, 16 Sep 2008)
New Revision: 11910

Modified:
   branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
[JBPORTAL-2104] adding unique link id to available portlets

Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp	2008-09-16 19:41:16 UTC (rev 11909)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp	2008-09-16 20:23:48 UTC (rev 11910)
@@ -92,10 +92,12 @@
     <div style="height:300px; width:500px; overflow: auto; overflow-x: hidden; border: 1px solid #333;">
       <table style="width:100%;" cellspacing="0" cellpadding="0">
         <%
+          int index;
           for (IteratorStatus i = new IteratorStatus(instances); i.hasNext();)
           {
             Instance instance = (Instance)i.next();
-            String rowClass = instance == selectedInstance ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
+            index = i.getIndex();
+            String rowClass = instance == selectedInstance ? "portlet-section-selected" : (index % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
             String displayName = instance.getDisplayName().getString(locale, true);
             PortletInfo info = instance.getPortlet().getInfo();
             MetaInfo portletMetaInfo = info.getMeta();
@@ -106,6 +108,7 @@
             }
 
             String iconLocation = getIcon(info);
+            String linkId="portlet-instance-link"+"_"+index;
         %>
         <portlet:actionURL var="url">
           <portlet:param name="content.action.select" value="true"/>
@@ -127,12 +130,13 @@
             </div>
           </div>
         </div>
+        
 
         <tr class="<%= rowClass %>">
           <td>
             <img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0" alt="icon"/>
             <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a
-                    href="<%= url %>" id="portlet-instance-link"><%= displayName %>
+                    href="<%= url %>" id="<%= linkId %>"><%= displayName %>
             </a></span></td>
         </tr>
         <%




More information about the portal-commits mailing list