portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r909566 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
Date Fri, 12 Feb 2010 19:19:48 GMT
Author: woonsan
Date: Fri Feb 12 19:19:45 2010
New Revision: 909566

URL: http://svn.apache.org/viewvc?rev=909566&view=rev
Log:
JS2-1057: Fixing tabs by using default-tabs style.
TO-DO: The tab font color is conflicting because the portlet css is applied first.

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

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=909566&r1=909565&r2=909566&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 Feb 12 19:19:45 2010
@@ -44,19 +44,12 @@
 
 <c:set var="portletPageSize" value="${prefs['Rows'][0]}"/>
 
-<table style="border-collapse: collapse;  width: 100%; margin-top: 0px; margin-bottom:
0px; float: left;">
-    <tr>
-    <td class="portlet-section-subheader">
-        <a href="#" id="<portlet:namespace/>portletsTabAction"><fmt:message
key="toolbox.label.portlets"/></a>
-        |
-        <a href="#" id="<portlet:namespace/>layoutTabAction"><fmt:message
key="toolbox.label.layout"/></a>
-        |
-        <a href="#" id="<portlet:namespace/>themeTabAction"><fmt:message key="toolbox.label.theme"/></a>
-        |
-        <a href="#" id="<portlet:namespace/>widgetsTabAction"><fmt:message
key="toolbox.label.widget"/></a>
-    </td>
-    </tr>
-</table>
+<ul class="default-tabs">
+  <li><a href="#" id="<portlet:namespace/>portletsTabAction"><fmt:message
key="toolbox.label.portlets"/></a></li>
+  <li><a href="#" id="<portlet:namespace/>layoutTabAction"><fmt:message
key="toolbox.label.layout"/></a></li>
+  <li><a href="#" id="<portlet:namespace/>themeTabAction"><fmt:message
key="toolbox.label.theme"/></a></li>
+  <li><a href="#" id="<portlet:namespace/>widgetsTabAction"><fmt:message
key="toolbox.label.widget"/></a></li>
+</ul>
 
 <form id="<portlet:namespace/>form">
 <table id="<portlet:namespace/>portletsTab" style="display: none; border-collapse:
collapse;  width: 100%; margin-top: 0px; margin-bottom: 0px; float: left;">
@@ -348,10 +341,34 @@
         } else {
             tabId = e.target.get("id").replace(/TabAction$/, "").substring("<portlet:namespace/>".length);
         }
-        Y.Node.one("#<portlet:namespace/>portletsTab").setStyle("display", (tabId ==
"portlets" ? "" : "none"));
-        Y.Node.one("#<portlet:namespace/>layoutTab").setStyle("display", (tabId ==
"layout" ? "" : "none"));
-        Y.Node.one("#<portlet:namespace/>themeTab").setStyle("display", (tabId == "theme"
? "" : "none"));
-        Y.Node.one("#<portlet:namespace/>widgetsTab").setStyle("display", (tabId ==
"widgets" ? "" : "none"));
+        if (tabId == "portlets") {
+            Y.Node.one("#<portlet:namespace/>portletsTab").setStyle("display", "");
+            Y.Node.one("#<portlet:namespace/>portletsTabAction").get("parentNode").addClass("selected");
+        } else {
+            Y.Node.one("#<portlet:namespace/>portletsTab").setStyle("display", "none");
+            Y.Node.one("#<portlet:namespace/>portletsTabAction").get("parentNode").removeClass("selected");
+        }
+        if (tabId == "layout") {
+            Y.Node.one("#<portlet:namespace/>layoutTab").setStyle("display", "");
+            Y.Node.one("#<portlet:namespace/>layoutTabAction").get("parentNode").addClass("selected");
+        } else {
+            Y.Node.one("#<portlet:namespace/>layoutTab").setStyle("display", "none");
+            Y.Node.one("#<portlet:namespace/>layoutTabAction").get("parentNode").removeClass("selected");
+        }
+        if (tabId == "theme") {
+            Y.Node.one("#<portlet:namespace/>themeTab").setStyle("display", "");
+            Y.Node.one("#<portlet:namespace/>themeTabAction").get("parentNode").addClass("selected");
+        } else {
+            Y.Node.one("#<portlet:namespace/>themeTab").setStyle("display", "none");
+            Y.Node.one("#<portlet:namespace/>themeTabAction").get("parentNode").removeClass("selected");
+        }
+        if (tabId == "widgets") {
+            Y.Node.one("#<portlet:namespace/>widgetsTab").setStyle("display", "");
+            Y.Node.one("#<portlet:namespace/>widgetsTabAction").get("parentNode").addClass("selected");
+        } else {
+            Y.Node.one("#<portlet:namespace/>widgetsTab").setStyle("display", "none");
+            Y.Node.one("#<portlet:namespace/>widgetsTabAction").get("parentNode").removeClass("selected");
+        }
         
         Y.Cookie.set("toolboxtab", tabId);
 



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