aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-01-29 11:17:44 +0100
committerManolo Carrasco <manolo@apache.org>2015-01-29 11:33:38 +0100
commit48e377fad3d655638e2e3d7192bba43abc214981 (patch)
treea29a1edb5b86e5cf3040ba1d1c9f099c6812c4f9
parent23429096299a7de4b8f0b6538ee947c385bff106 (diff)
downloadgwtquery-48e377fad3d655638e2e3d7192bba43abc214981.tar.gz
gwtquery-48e377fad3d655638e2e3d7192bba43abc214981.zip
Handle JsonBuilder wrappers in $ method
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java4
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java1
2 files changed, 4 insertions, 1 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index 418bfdb0..ba59cadd 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -33,6 +33,7 @@ import com.google.gwt.dom.client.OptionElement;
import com.google.gwt.dom.client.SelectElement;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.dom.client.TextAreaElement;
+import com.google.gwt.query.client.builders.JsonBuilder;
import com.google.gwt.query.client.css.HasCssValue;
import com.google.gwt.query.client.css.TakesCssValue;
import com.google.gwt.query.client.css.TakesCssValue.CssSetter;
@@ -285,6 +286,9 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
if (JsUtils.isElement(o)) {
return $(JsUtils.<Element> cast(o));
}
+ if (o instanceof JsonBuilder) {
+ return new GQuery(((JsonBuilder) o).getDataImpl());
+ }
if (o instanceof JavaScriptObject) {
return $((JavaScriptObject) o);
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
index e48ba9bd..48285d8e 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
@@ -14,7 +14,6 @@
package com.google.gwt.query.client.plugins.events;
import static com.google.gwt.query.client.GQuery.$;
-import static com.google.gwt.query.client.GQuery.console;
import com.google.gwt.core.client.Duration;
import com.google.gwt.dom.client.Element;