portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r891663 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/toolbox/toolbox.jsp
Date Thu, 17 Dec 2009 12:03:26 GMT
Author: woonsan
Date: Thu Dec 17 12:03:20 2009
New Revision: 891663

URL: http://svn.apache.org/viewvc?rev=891663&view=rev
Log:
JS2-1057: Fixing keywords search

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=891663&r1=891662&r2=891663&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
Thu Dec 17 12:03:20 2009
@@ -347,6 +347,7 @@
     
     var loadPortletsInCategory = function(e) {
         var category = ('string' == typeof(e) ? e : null);
+        var keywords = null;
         if (!category) {
 	        var categories = Y.Node.getDOMNode(e.target);
 	        category = categories.options[categories.selectedIndex].value;
@@ -354,10 +355,17 @@
         if (!category) {
             return;
         }
+        var option = Y.Node.one("#<portlet:namespace/>categories").one("[value='" +
category + "']");
+        if (option) {
+            keywords = option.getAttribute("keywords").replace(/\s*,\s*/g, " | ");
+        }
+        if (!keywords) {
+            keywords = category;
+        }
         Y.Cookie.set("toolboxcat", category);
         var uri = "${portalContextPath}/services/portletregistry/definition/?_type=json";
         uri += "&max=" + pagination.portlet.pageSize + "&begin=0";
-        uri += "&query=" + category;
+        uri += "&query=" + encodeURIComponent(keywords);
         pagination.portlet.uri = uri;
         var request = Y.io(uri, { on: { complete: onLoadPortletComplete } });
         Y.Node.getDOMNode(Y.Node.one("#<portlet:namespace/>form")).query.value = "";



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