\r
import static com.google.gwt.query.client.plugins.QueuePlugin.Queue;\r
\r
-import java.util.ArrayList;\r
-import java.util.Arrays;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
import com.google.gwt.core.client.GWT;\r
import com.google.gwt.core.client.JavaScriptObject;\r
import com.google.gwt.core.client.JsArray;\r
import com.google.gwt.user.client.ui.GqUi;\r
import com.google.gwt.user.client.ui.Widget;\r
\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
/**\r
* GwtQuery is a GWT clone of the popular jQuery library.\r
*/\r
/**\r
* Removes all elements from the set of matched elements that do not pass the\r
* specified css expression. This method is used to narrow down the results of\r
- * a search. Provide a comma-separated list of expressions to apply multiple\r
- * filters at once.\r
+ * a search. \r
*/\r
+ //TODO performance bad...\r
public GQuery filter(String... filters) {\r
JsNodeArray array = JsNodeArray.create();\r
+ /*StringBuilder filterBuilder = new StringBuilder();\r
+ for (int i = 0; i < filters.length ; i++){\r
+ filterBuilder.append(filters[i]);\r
+ if (i < filters.length - 1){\r
+ filterBuilder.append(",");\r
+ }\r
+ }\r
+ \r
+ String filter = filterBuilder.toString();*/\r
+\r
for (String f : filters) {\r
for (Element e : elements) {\r
boolean ghostParent = false;\r
}\r
}\r
}\r
+ \r
return pushStack(unique(array), "filter", filters[0]);\r
}\r
\r
for (Element e : elements) {\r
allNextSiblingElements(e.getNextSiblingElement(), result, null, null, filter);\r
}\r
+ \r
return pushStack(unique(result), "nextAll", getSelector());\r
}\r
\r