[mashup-dev] svn commit r15425 - in trunk/mashup/java/modules:
core/src/org/wso2/mashup/webapp/utils www
svn at wso2.org
svn at wso2.org
Tue Apr 1 00:56:01 PDT 2008
Author: channa
Date: Tue Apr 1 00:55:53 2008
New Revision: 15425
Log:
Added filtering by mashup for activities. MASHUP-726.
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java
trunk/mashup/java/modules/www/search.jsp
Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java (original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java Tue Apr 1 00:55:53 2008
@@ -87,6 +87,9 @@
if (params[2] != null) {
queryString += "&scope=" + params[2];
}
+ if (params[0] != null) {
+ queryString += "&onmashup=" + params[0];
+ }
queryString += "&activity=" + params[1] + "&period=" + params[3];
} else if (path.equals(MashupConstants.COMMENTS_QUERY_PATH) ||
Modified: trunk/mashup/java/modules/www/search.jsp
==============================================================================
--- trunk/mashup/java/modules/www/search.jsp (original)
+++ trunk/mashup/java/modules/www/search.jsp Tue Apr 1 00:55:53 2008
@@ -79,6 +79,11 @@
searchFor = searchFor.replace("%", "");
}
+ String onMashup = request.getParameter("onmashup");
+ if (onMashup == null) {
+ onMashup = "";
+ }
+
String paramTags = request.getParameter("tags");
String paramTitles = request.getParameter("titles");
String paramDescriptions = request.getParameter("descriptions");
@@ -251,6 +256,8 @@
queryPath = MashupConstants.ACTIVITY_QUERY_PATH;
if (searchScope == null || searchScope.equals("")) {
queryTitle = "Recent ";
+ } else if (onMashup != null && !onMashup.equals("")) {
+ queryTitle = "Mashup ";
} else {
queryTitle = ((currentUser.equals(searchScope) && !isFeed) ? "My" :
RegistryUtils.getFullName(request, searchScope) + "'s") + " recent ";
@@ -261,7 +268,7 @@
}
queryTitle += " activity (" + paramPeriod + " days)";
- String resourcePath = null;
+ String resourcePath = onMashup;
queryParams = new String[] { resourcePath, activity,
searchScope == null || searchScope.equals("") ? null : searchScope,
paramPeriod };
@@ -741,6 +748,8 @@
</option>
</select>
</td>
+ </tr>
+ <tr>
<td valign="top">
<input type="text" id="user-activity" autocomplete="off"
onkeyup="getUserNames('user-activity')"
@@ -789,6 +798,34 @@
</select>
</td>
<td>
+ <table style="margin-top:-3px;">
+ <tr>
+ <td>
+ <select id="mashup-activity" name="onmashup"
+ onchange="if ($('mashup-activity-option').selected) $('mashup-name').show(); else $('mashup-name').hide();">
+ <option value=""
+ <% if (onMashup == null || onMashup.equals("")) { %>selected="selected"<% } %>>
+ All Mashups
+ </option>
+ <option id="mashup-activity-option" value="<% if (onMashup != null) {%><%=onMashup%><% } %>"
+ <% if (onMashup != null && !onMashup.equals("")) { %>selected="selected"<% } %>>
+ Specific Mashup
+ </option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input type="text" id="mashup-name"
+ onkeyup="$('mashup-activity-option').value = $('mashup-name').value"
+ <% if (onMashup == null || onMashup.equals("")) { %>style="display:none"
+ <% } else { %>value="<%=onMashup%>"<% } %>
+ />
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
<input id="submit-activity" type="submit" value="Search"/>
</td>
</form>
More information about the Mashup-dev
mailing list