Author: jonathan
Date: Mon Jan 21 16:12:06 2008
New Revision: 12661

Log:

Fixing IE issues with "by user..." queries.
Normalizing styling between IE and Firefox.

Modified:
   trunk/mashup/java/modules/www/css/styles.css
   trunk/mashup/java/modules/www/search.jsp

Modified: trunk/mashup/java/modules/www/css/styles.css
==============================================================================
--- trunk/mashup/java/modules/www/css/styles.css        (original)
+++ trunk/mashup/java/modules/www/css/styles.css        Mon Jan 21 16:12:06 2008
@@ -388,6 +388,7 @@
 div#hideAdvancedSearch, div#showAdvancedSearch {
     padding: 24px 8px 12px 8px;
     background-color: #96A64B;
+    text-align:center;
 }
 
 div#hideAdvancedSearch {
@@ -399,14 +400,13 @@
 }
 
 div#advancedSearch {
-    width:80%;
-    margin:auto;
+    margin:1em 10% 0em 10%;
 }
 
 div#searchForms {
-    width:95%;
     border: 1px solid #C8DD64;
     padding:1em;
+    text-align:left;
 }
 
 div#advancedSearch td {
@@ -416,7 +416,7 @@
 
 div#showAdvancedSearch ul.searchType {
     text-align: left;
-    margin: 1em 0em 0em 0em;
+    margin: 1em 2px 0em 0em;
     padding:0px;
 }
 

Modified: trunk/mashup/java/modules/www/search.jsp
==============================================================================
--- trunk/mashup/java/modules/www/search.jsp    (original)
+++ trunk/mashup/java/modules/www/search.jsp    Mon Jan 21 16:12:06 2008
@@ -445,35 +445,35 @@
         <li id="mashups-tab" class="<%
                 if (query == null || query.equalsIgnoreCase("mashups")) {
                     %>this-<%
-                } %>tab"><a href="#" 
onclick="showSearch('searchMashups')">Mashups</a></li>
-        <li id="mashups-tab-right" class="<%
+                } %>tab"><a href="#" 
onclick="showSearch('searchMashups')">Mashups</a></li
+        ><li id="mashups-tab-right" class="<%
                 if (query == null || query.equalsIgnoreCase("mashups")) {
                     %>this-<%
-                } %>tab-right"><img src="images/blank.gif" width="8"/></li>
-        <li id="comments-tab" class="<%
+                } %>tab-right"><img src="images/blank.gif" width="8"/> </li
+        ><li id="comments-tab" class="<%
                 if (query != null && query.equalsIgnoreCase("comments")) {
                     %>this-<%
-                } %>tab"><a href="#" 
onclick="showSearch('searchComments')">Comments</a></li>
-        <li id="comments-tab-right" class="<%
+                } %>tab"><a href="#" 
onclick="showSearch('searchComments')">Comments</a></li
+        ><li id="comments-tab-right" class="<%
                 if (query != null && query.equalsIgnoreCase("comments")) {
                     %>this-<%
-                } %>tab-right"><img src="images/blank.gif" width="8"/></li>
-        <li id="activity-tab" class="<%
+                } %>tab-right"><img src="images/blank.gif" width="8"/> </li
+        ><li id="activity-tab" class="<%
                 if (query != null && query.equalsIgnoreCase("activity")) {
                     %>this-<%
-                } %>tab"><a href="#" 
onclick="showSearch('searchActivity')">Recent Activity</a></li>
-        <li id="activity-tab-right" class="<%
+                } %>tab"><a href="#" 
onclick="showSearch('searchActivity')">Recent Activity</a></li
+        ><li id="activity-tab-right" class="<%
                 if (query != null && query.equalsIgnoreCase("activity")) {
                     %>this-<% }
-                %>tab-right"><img src="images/blank.gif" width="8"/></li>
-        <li id="toprated-tab" class="<%
+                %>tab-right"><img src="images/blank.gif" width="8"/> </li
+        ><li id="toprated-tab" class="<%
                 if (query != null && query.equalsIgnoreCase("toprated")) {
                     %>this-<%
-                } %>tab"><a href="#" 
onclick="showSearch('searchSpecial')">Special Queries</a></li>
-        <li id="toprated-tab-right" class="<%
+                } %>tab"><a href="#" 
onclick="showSearch('searchSpecial')">Special Queries</a></li
+        ><li id="toprated-tab-right" class="<%
                 if (query != null && query.equalsIgnoreCase("toprated")) {
                     %>this-<% }
-                %>tab-right"><img src="images/blank.gif" width="8"/></li>
+                %>tab-right"><img src="images/blank.gif" width="8"/> </li>
     </ul>
 </div>
 <div id="searchForms">
@@ -484,38 +484,32 @@
     <form id="search-mashups" action="search.jsp" method="get">
         <td>
             <input type="hidden" name="query" value="mashups"/>
-            <select id="scope-mashups" name="scope">
+            <select id="scope-mashups" name="scope" onchange="if 
($('user-mashups-option').selected) $('user-mashups').show(); else 
$('user-mashups').hide();">
                 <option value=""
-                        onclick="$('user-mashups').hide()"
                         <% if (searchScope == null || searchScope.equals("")) 
{ %>selected="selected"<% } %>
                         >
                     Everyone's mashups
                 </option>
                 <% if (RegistryUtils.isLoggedIn(registry)) { %>
                 <option value="<%=currentUser%>"
-                        onclick="$('user-mashups').hide()"
                         <% if (searchScope != null && 
searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     My mashups
                 </option>
                 <% } %>
                 <option id="user-mashups-option"
-                        value="<% if (searchScope != null) 
{%><%=searchScope%><% } %>"
-                        onclick="$('user-mashups').show()"
+                        value="<% if (searchScope != null) { 
%><%=searchScope%><% } %>"
                         <% if (searchScope != null && !searchScope.equals("") 
&& !searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     Mashups by...
-                    <input type="text" id="user-mashups"
-                           onkeyup="$('user-mashups-option').value = 
$('user-mashups').value"
-                           <% if (searchScope == null || 
searchScope.equals("") || searchScope.equals(currentUser)) { 
%>style="display:none"
-                           <%
-                           }
-                         else {
-                           %>value="<%=searchScope%>"<% } %>
-                            />
                 </option>
 
             </select>
+            <input type="text" id="user-mashups"
+                   onkeyup="$('user-mashups-option').value = 
$('user-mashups').value"
+                   <% if (searchScope == null || searchScope.equals("") || 
searchScope.equals(currentUser)) { %>style="display:none"
+                   <% }  else { %>value="<%=searchScope%>"<% } %>
+            />
         </td>
         <td>
             <input type="text" name="for" size="50"
@@ -552,16 +546,14 @@
     <form id="search-comments" action="search.jsp" method="get">
         <td>
             <input type="hidden" name="query" value="comments"/>
-            <select id="scope-comments" name="scope">
+            <select id="scope-comments" name="scope" onchange="if 
($('user-comments-option').selected) $('user-comments').show(); else 
$('user-comments').hide();">
                 <option value=""
-                        onclick="$('user-comments').hide()"
                         <% if (searchScope == null || searchScope.equals("")) 
{ %>selected="selected"<% } %>
                         >
                     Everyone's comments
                 </option>
                 <% if (RegistryUtils.isLoggedIn(registry)) { %>
                 <option value="<%=currentUser%>"
-                        onclick="$('user-comments').hide()"
                         <% if (searchScope != null && 
searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     My comments
@@ -569,21 +561,16 @@
                 <% } %>
                 <option id="user-comments-option"
                         value="<% if (searchScope != null) 
{%><%=searchScope%><% } %>"
-                        onclick="$('user-comments').show()"
                         <% if (searchScope != null && !searchScope.equals("") 
&& !searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     Comments by...
-                    <input type="text" id="user-comments"
-                           onkeyup="$('user-comments-option').value = 
$('user-comments').value"
-                           <% if (searchScope == null || 
searchScope.equals("") || searchScope.equals(currentUser)) { 
%>style="display:none"
-                           <%
-                           }
-                         else {
-                           %>value="<%=searchScope%>"<% } %>
-                            />
                 </option>
-
             </select>
+            <input type="text" id="user-comments"
+                   onkeyup="$('user-comments-option').value = 
$('user-comments').value"
+                   <% if (searchScope == null || searchScope.equals("") || 
searchScope.equals(currentUser)) { %>style="display:none"
+                   <% } else { %>value="<%=searchScope%>"<% } %>
+            />
         </td>
         <td>
             <input type="text" name="for" value="<%= searchFor == null ? "" : 
searchFor %>"
@@ -602,16 +589,14 @@
     <form id="search-activity" action="search.jsp" method="get">
         <td>
             <input type="hidden" name="query" value="activity"/>
-            <select id="scope-activity" name="scope">
+            <select id="scope-activity" name="scope" onchange="if 
($('user-activity-option').selected) $('user-activity').show(); else 
$('user-activity').hide();">
                 <option value=""
-                        onclick="$('user-activity').hide()"
                         <% if (searchScope == null || searchScope.equals("")) 
{ %>selected="selected"<% } %>
                         >
                     Everyone's recent activity
                 </option>
                 <% if (RegistryUtils.isLoggedIn(registry)) { %>
                 <option value="<%=currentUser%>"
-                        onclick="$('user-activity').hide()"
                         <% if (searchScope != null && 
searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     My recent activity
@@ -619,21 +604,16 @@
                 <% } %>
                 <option id="user-activity-option"
                         value="<% if (searchScope != null) 
{%><%=searchScope%><% } %>"
-                        onclick="$('user-activity').show()"
                         <% if (searchScope != null && !searchScope.equals("") 
&& !searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     Recent activity by...
-                    <input type="text" id="user-activity"
-                           onkeyup="$('user-activity-option').value = 
$('user-activity').value"
-                           <% if (searchScope == null || 
searchScope.equals("") || searchScope.equals(currentUser)) { 
%>style="display:none"
-                           <%
-                           }
-                         else {
-                           %>value="<%=searchScope%>"<% } %>
-                            />
                 </option>
-
             </select>
+            <input type="text" id="user-activity"
+                   onkeyup="$('user-activity-option').value = 
$('user-activity').value"
+                   <% if (searchScope == null || searchScope.equals("") || 
searchScope.equals(currentUser)) { %>style="display:none"
+                   <% } else { %>value="<%=searchScope%>"<% } %>
+            />
         </td>
         <td>
             <select id="period" name="period">
@@ -686,16 +666,14 @@
             </select>
         </td>
         <td>
-            <select id="scope-special" name="scope">
+            <select id="scope-special" name="scope" onchange="if 
($('user-special-option').selected) $('user-special').show(); else 
$('user-special').hide();">
                 <option value=""
-                        onclick="$('user-special').hide()"
                         <% if (searchScope == null || 
searchScope.equalsIgnoreCase("")) { %>selected="selected"<% } %>
                         >
                     by anyone
                 </option>
                 <% if (RegistryUtils.isLoggedIn(registry)) { %>
                 <option value="<%=currentUser%>"
-                        onclick="$('user-special').hide()"
                         <% if (searchScope != null && 
searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     by me
@@ -703,21 +681,16 @@
                 <% } %>
                 <option id="user-special-option"
                         value="<% if (searchScope != null) 
{%><%=searchScope%><% } %>"
-                        onclick="$('user-special').show()"
                         <% if (searchScope != null && !searchScope.equals("") 
&& !searchScope.equals(currentUser)) { %>selected="selected"<% } %>
                         >
                     by user ...<br/>
-                    <input type="text" id="user-special"
-                           onkeyup="$('user-special-option').value = 
$('user-special').value"
-                           <% if (searchScope == null || 
searchScope.equals("") || searchScope.equals(currentUser)) { 
%>style="display:none"
-                           <%
-                           }
-                         else {
-                           %>value="<%=searchScope%>"<% } %>
-                            />
                 </option>
-
             </select>
+            <input type="text" id="user-special"
+                   onkeyup="$('user-special-option').value = 
$('user-special').value"
+                   <% if (searchScope == null || searchScope.equals("") || 
searchScope.equals(currentUser)) { %>style="display:none"
+                   <% } else { %>value="<%=searchScope%>"<% } %>
+             />
         </td>
         <td>
             <input id="submit-special" type="submit" value="Search"/>
@@ -728,6 +701,7 @@
 </table>
 </div>
 <div class="advanced-search-link">
+    &nbsp;
     <% if (query != null) { %><a href="search.jsp">start a new search...</a><% 
} %>
 </div>
 
@@ -738,7 +712,7 @@
 
 <div id="content">
 
-<table width="100%" style="*width:97%; " height="300" border="0" 
cellpadding="5" cellspacing="0">
+<table style="width:98%" height="300" border="0" cellpadding="5" 
cellspacing="0">
 <tbody>
 <tr>
 <td valign="top">
@@ -768,22 +742,24 @@
             href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath, 
queryParams)%>&format=atom"
             target="_blank"><img title="Atom feed" 
src="images/atom.png"/></a></span>
 </div>
-<table width="100%" border="0" cellpadding="3" cellspacing="0" class="data">
+<table border="0" cellpadding="3" cellspacing="0" class="data">
 <tbody>
 <% if (results.getResultsType().equals("activity")) { %>
 <td class="headers" width="12%" colspan="2">Date</td>
 <td class="headers">Activity</td>
+<td width="80" class="headers"></td>
 <% } else if (results.getResultsType().equals("comment")) { %>
 <td width="12%" class="headers">Date</td>
 <td width="12%" class="headers">By</td>
 <td width="12%" class="headers">On</td>
 <td class="headers">Comment</td>
+<td width="80" class="headers"></td>
 <% } else { %>
 <td width="12%" class="headers">Name</td>
 <td width="12%" class="headers">Author</td>
 <td class="headers">Description</td>
+<td width="80" class="headers">Rating</td>
 <% } %>
-<td width="80" class="headers"></td>
 <%
     Iterator iter = results.getResults().iterator();
     int nextId = 0;

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to