diff options
Diffstat (limited to 'jsquery')
3 files changed, 9 insertions, 11 deletions
diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java b/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java index 1312cc55..57c3cbdd 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java +++ b/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java @@ -4,9 +4,10 @@ public abstract class JsMenu { public static native void loadPlugin() /*-{ var l = @gwtquery.jsquery.client.utils.JsQueryUtils::log(Ljava/lang/Object;); + var jQuery = $wnd.$; + var $ = $wnd.$; var window = $wnd; var document = $doc; - var jQuery = $wnd.$; (function($) { diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java b/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java index ad15715a..9514ae73 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java +++ b/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java @@ -20,8 +20,7 @@ public class JsQuery implements EntryPoint { }); OverlayGQuery.export(); - JsMenu.loadPlugin(); - onJsQueryLoad(); +// JsMenu.loadPlugin(); // testJs(); } @@ -33,12 +32,4 @@ public class JsQuery implements EntryPoint { }); }-*/; - private native static void onJsQueryLoad() /*-{ - $ = $wnd.$; - window = $wnd; - document = $doc; - - $wnd.onJsQueryLoad && $wnd.onJsQueryLoad(); - $wnd.JsQuery && $wnd.JsQuery.onLoad && $wnd.JsQuery.onLoad(); - }-*/; } diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/OverlayGQuery.java b/jsquery/src/main/java/gwtquery/jsquery/client/OverlayGQuery.java index 4708212f..59d70d4a 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/client/OverlayGQuery.java +++ b/jsquery/src/main/java/gwtquery/jsquery/client/OverlayGQuery.java @@ -80,6 +80,12 @@ public class OverlayGQuery implements ExportOverlay<GQuery> { */ @ExportAfterCreateMethod public static native void afterCreate() /*-{ + $ = $wnd.$; + window = $wnd; + document = $doc; + + $wnd.onJsQueryLoad && $wnd.onJsQueryLoad(); + $wnd.JsQuery && $wnd.JsQuery.onLoad && $wnd.JsQuery.onLoad(); }-*/; @ExportStaticMethod("$wnd.$") |