aboutsummaryrefslogtreecommitdiffstats
path: root/jsquery
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2012-03-15 10:21:58 +0000
committerManolo Carrasco <manolo@apache.org>2012-03-15 10:21:58 +0000
commitc8beedfe35a6a558c086634fc063f9c64fa88d03 (patch)
treea7f2c77ac12fe6dae650ad02d37450b4373b1153 /jsquery
parent1c9c2236c15156e6bb3fce72ecb498786b4df9de (diff)
downloadgwtquery-c8beedfe35a6a558c086634fc063f9c64fa88d03.tar.gz
gwtquery-c8beedfe35a6a558c086634fc063f9c64fa88d03.zip
method afterCreate calls the onload functions
Diffstat (limited to 'jsquery')
-rw-r--r--jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java3
-rw-r--r--jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java11
-rw-r--r--jsquery/src/main/java/gwtquery/jsquery/client/OverlayGQuery.java6
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.$")