aboutsummaryrefslogtreecommitdiffstats
path: root/samples/src/main/java
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2010-10-25 07:16:40 +0000
committerManolo Carrasco <manolo@apache.org>2010-10-25 07:16:40 +0000
commit37b548a54f2d5f7f7bcd561376287564706e429c (patch)
treeecc32b8bb9b0b87a22a9ad15b3969a32fd63484c /samples/src/main/java
parente97a75d695fe591cf155af252350e6275670f32f (diff)
downloadgwtquery-37b548a54f2d5f7f7bcd561376287564706e429c.tar.gz
gwtquery-37b548a54f2d5f7f7bcd561376287564706e429c.zip
deleted stars example which was moved to gwtquery-plugins, and little changes to samples module
Diffstat (limited to 'samples/src/main/java')
-rw-r--r--samples/src/main/java/gwtquery/samples/GwtQueryPlugin.gwt.xml6
-rw-r--r--samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java185
-rw-r--r--samples/src/main/java/gwtquery/samples/client/GwtQueryPluginModule.java37
-rw-r--r--samples/src/main/java/gwtquery/samples/client/GwtQuerySampleModule.java10
-rw-r--r--samples/src/main/java/gwtquery/samples/public/GwtQueryBench.html13
-rw-r--r--samples/src/main/java/gwtquery/samples/public/GwtQueryPlugin.html206
-rw-r--r--samples/src/main/java/gwtquery/samples/public/html/gwtbench.html4
-rw-r--r--samples/src/main/java/gwtquery/samples/public/html/iframebench.html4
8 files changed, 122 insertions, 343 deletions
diff --git a/samples/src/main/java/gwtquery/samples/GwtQueryPlugin.gwt.xml b/samples/src/main/java/gwtquery/samples/GwtQueryPlugin.gwt.xml
deleted file mode 100644
index 352c5c66..00000000
--- a/samples/src/main/java/gwtquery/samples/GwtQueryPlugin.gwt.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<module>
- <inherits name='com.google.gwt.query.Query'/>
- <inherits name='gwtquery.Plugins'/>
- <entry-point class='gwtquery.samples.client.GwtQueryPluginModule'/>
-</module>
-
diff --git a/samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java b/samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java
index 99ff78c4..7f00702f 100644
--- a/samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java
+++ b/samples/src/main/java/gwtquery/samples/client/GwtQueryBenchModule.java
@@ -18,11 +18,11 @@ import com.google.gwt.query.client.impl.SelectorEngineNative;
import com.google.gwt.query.client.impl.SelectorEngineNativeIE8;
import com.google.gwt.query.client.impl.SelectorEngineSizzle;
import com.google.gwt.query.client.impl.SelectorEngineSizzleGwt;
+import com.google.gwt.query.client.impl.SelectorEngineSizzleIE;
import com.google.gwt.query.client.impl.SelectorEngineXPath;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.IncrementalCommand;
-import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
@@ -46,11 +46,9 @@ import com.google.gwt.user.client.ui.RootPanel;
* min=200 Minimum time running each selector
* track=false Don't draw the horse race
* ask=false Run default benchmarks, don't ask the user.
- * wait=6000 Number of milliseconds to wait to insert the test html stuff in the iframes
- *
*/
public class GwtQueryBenchModule implements EntryPoint {
-
+
public interface Benchmark {
String getId();
String getName();
@@ -58,6 +56,33 @@ public class GwtQueryBenchModule implements EntryPoint {
}
/**
+ * Benchmark for dynamic selectors
+ */
+ private class DynamicBenchmark implements Benchmark {
+
+ protected SelectorEngineImpl engine;
+ private String id;
+
+ DynamicBenchmark(SelectorEngineImpl engine, String name) {
+ this.id = name;
+ this.engine = engine;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ String name = engine.getClass().getName().replaceAll("^.*\\.", "");
+ return name;
+ }
+
+ public int runSelector(DeferredGQuery dq) {
+ return engine.select(dq.getSelector(), gwtiframe).getLength();
+ }
+ }
+
+ /**
* Benchmark for the compiled selectors
*/
private class GQueryCompiledBenchmark implements Benchmark {
@@ -73,10 +98,6 @@ public class GwtQueryBenchModule implements EntryPoint {
return id;
}
- public int runSelector(DeferredGQuery dq) {
- return dq.array(gwtiframe).getLength();
- }
-
public String getName() {
if (name == null) {
MySelectors s = GWT.create(MySelectors.class);
@@ -88,35 +109,12 @@ public class GwtQueryBenchModule implements EntryPoint {
}
return name;
}
- }
-
- /**
- * Benchmark for dynamic selectors
- */
- private class DynamicBenchmark implements Benchmark {
-
- protected SelectorEngineImpl engine;
- private String id;
-
- DynamicBenchmark(SelectorEngineImpl engine, String name) {
- this.id = name;
- this.engine = engine;
- }
-
- public String getId() {
- return id;
- }
public int runSelector(DeferredGQuery dq) {
- return engine.select(dq.getSelector(), gwtiframe).getLength();
- }
-
- public String getName() {
- String name = engine.getClass().getName().replaceAll("^.*\\.", "");
- return name;
+ return dq.array(gwtiframe).getLength();
}
}
-
+
/**
* Benchmark for external libraries
*/
@@ -131,6 +129,10 @@ public class GwtQueryBenchModule implements EntryPoint {
return id;
}
+ public String getName() {
+ return id;
+ }
+
public int runSelector(DeferredGQuery dq) {
return runSelector(id, dq.getSelector());
}
@@ -138,20 +140,26 @@ public class GwtQueryBenchModule implements EntryPoint {
public native int runSelector(String id, String selector) /*-{
return eval("$wnd." + id + "benchmark('" + selector + "')");
}-*/;
-
- public String getName() {
- return id;
- }
}
- private int min_time = 200;
+ public static native void exportIframeReadyCallback(GwtQueryBenchModule bench) /*-{
+ $wnd.iframebench_ready_callback = function() {
+ bench.@gwtquery.samples.client.GwtQueryBenchModule::iframeReadyCallback()();
+ };
+ }-*/;
+
+ private boolean ask = true;
- private boolean shareIframes = true;
+ private Function askBenchMarks = new Function(){
+ public void f() {
+ if (!running && ask) {
+ selectPanel.center();
+ } else {
+ runBenchMarks.f();
+ }
+ }
+ };
- private boolean useTrack = true;
- private boolean ask = true;
- private int waitToLoad = 6000;
-
/**
* List of available benchmarks.
*/
@@ -159,6 +167,7 @@ public class GwtQueryBenchModule implements EntryPoint {
new GQueryCompiledBenchmark("gwt_compiled"),
new DynamicBenchmark((SelectorEngineImpl)GWT.create(SelectorEngineImpl.class), "gwt_dynamic"),
new DynamicBenchmark(new SelectorEngineSizzle(), "gwt_sizzle_jsni"),
+ new DynamicBenchmark(new SelectorEngineSizzleIE(), "gwt_sizzle_ie_jsni"),
new DynamicBenchmark(new SelectorEngineSizzleGwt(), "gwt_sizzle_java"),
new DynamicBenchmark(new SelectorEngineJS(), "gwt_domassist_java"),
new DynamicBenchmark(new SelectorEngineXPath(), "gwt_xpath"),
@@ -171,34 +180,35 @@ public class GwtQueryBenchModule implements EntryPoint {
new IframeBenchmark("sizzle"),
new IframeBenchmark("domassistant")
};
-
/**
* Pre-selected benchmarks
*/
private String[] defaultBenchmarks = {"gwt_compiled", "gwt_dynamic", "jquery", "prototype", "dojo"};
private DeferredGQuery dg[];
- private FlexTable grid = new FlexTable();
- private Element gwtiframe;
- private Benchmark[] selectedBenchmarks;
- private double trackWidth;
- private PopupPanel selectPanel = new PopupPanel();
- private Function askBenchMarks = new Function(){
- public void f(Element e) {
- selectPanel.center();
- }
- };
+ private FlexTable grid = new FlexTable();
+ private Element gwtiframe;
+ private int min_time = 200;
+ private boolean running = false;
/**
* Main function to run all the selected benchmarks
*/
private Function runBenchMarks = new Function() {
- public void f(Element elem) {
+ public void f() {
+
+ // Force to stop the race
+ if (running) {
+ running = false;
+ $("#startrace").text("Run Again");
+ return;
+ }
+ running = true;
selectedBenchmarks = readBenchmarkSelection();
selectPanel.hide();
- $("#startrace").hide();
+ $("#startrace").text("Stop Race");
$("#results").show();
initResultsTable(dg, selectedBenchmarks);
@@ -215,6 +225,10 @@ public class GwtQueryBenchModule implements EntryPoint {
double winTime = Double.MAX_VALUE;
public boolean execute() {
+ // The race has been stopped
+ if (!running) {
+ return false;
+ }
if (benchMarkNumber >= selectedBenchmarks.length) {
benchMarkNumber = 0;
numCalls = 0;
@@ -239,7 +253,7 @@ public class GwtQueryBenchModule implements EntryPoint {
d(selectorNumber, i, (((int) (totalTimes[i] * 100)) / 100.0) + " ms");
if (totalTimes[i] <= min) {
flagWinner(selectedBenchmarks[i].getId());
- $("#startrace").show();
+ $("#startrace").text("Run Again");
setResultClass(selectorNumber, i);
}
}
@@ -278,10 +292,20 @@ public class GwtQueryBenchModule implements EntryPoint {
});
}
};
+ private Benchmark[] selectedBenchmarks;
+ private PopupPanel selectPanel = new PopupPanel();
+ private boolean shareIframes = true;
- private static native String showCapabilities() /*-{
- return window + " " + $wnd + " " + document.querySelectorAll + " " + $doc.querySelectorAll;
- }-*/;
+ private double trackWidth;
+
+ private boolean useTrack = true;
+
+ public void iframeReadyCallback() {
+ writeTestContent($(".ibench").contents().find("body").get(0));
+ gwtiframe = $(".ibench").eq(0).contents().get(0);
+ $("#startrace").text("Start Race");
+ $("#startrace").click(ask ? askBenchMarks: runBenchMarks);
+ }
/**
* EntryPoint
@@ -290,9 +314,6 @@ public class GwtQueryBenchModule implements EntryPoint {
final MySelectors m = GWT.create(MySelectors.class);
- System.out.println(showCapabilities());
- System.out.println($("body"));
-
dg = m.getAllSelectors();
String par = Window.Location.getParameter("min");
@@ -311,28 +332,25 @@ public class GwtQueryBenchModule implements EntryPoint {
if (par != null && "false".equals(par)) {
ask = false;
}
- par = Window.Location.getParameter("wait");
- if (par != null) {
- waitToLoad = Integer.parseInt(par);
- }
+ exportIframeReadyCallback(this);
initSelects(benchmarks);
initIFrames();
$("#results").hide();
}
+ private void d(int selnumber, int benchnumber, double time, int found) {
+ String text = found < 0 ? "Error" : "" + (((int) (time * 10)) / 10.0) + " ms | " + found + " found";
+ d(selnumber, benchnumber, text);
+ }
+
private void d(int selnumber, int benchnumber, String text) {
grid.setText(selnumber + 1, benchnumber + 1, text);
Element td = grid.getCellFormatter().getElement(selnumber + 1, benchnumber + 1);
DOM.scrollIntoView((com.google.gwt.user.client.Element) td);
}
- private void d(int selnumber, int benchnumber, double time, int found) {
- String text = found < 0 ? "Error" : "" + (((int) (time * 10)) / 10.0) + " ms | " + found + " found";
- d(selnumber, benchnumber, text);
- }
-
private void flagWinner(String idWinner) {
GQuery g = $("#" + idWinner + "horse" + " nobr");
$(".flag").appendTo(g).show();
@@ -355,21 +373,8 @@ public class GwtQueryBenchModule implements EntryPoint {
} else {
$(i.replaceAll("%ID%", "iframe")).appendTo(document).hide();
}
-
- $("#startrace").text("Loading ...");
- // Wait a while until the iframe/s have been loaded
- new Timer() {
- public void run() {
- writeTestContent($(".ibench").contents().find("body").get(0));
- gwtiframe = $(".ibench").eq(0).contents().get(0);
- $("#startrace").text("Start Race");
- $("#startrace").click(ask ? askBenchMarks: runBenchMarks);
-
- }
- }.schedule(waitToLoad);
}
-
/**
* Reset the result table
*/
@@ -462,11 +467,6 @@ public class GwtQueryBenchModule implements EntryPoint {
}
}
- private void setResultClass(int selNumber, int winNumber) {
- Element e = grid.getCellFormatter().getElement(selNumber + 1, winNumber + 1);
- $(e).addClass("win").siblings().attr("class", "").addClass("tie").eq(0).removeClass("tie");
- }
-
private Benchmark[] readBenchmarkSelection() {
ArrayList<Benchmark> bs = new ArrayList<Benchmark>();
for (Element e : $("input", selectPanel.getElement()).elements()) {
@@ -481,6 +481,11 @@ public class GwtQueryBenchModule implements EntryPoint {
}
return bs.toArray(new Benchmark[bs.size()]);
}
+
+ private void setResultClass(int selNumber, int winNumber) {
+ Element e = grid.getCellFormatter().getElement(selNumber + 1, winNumber + 1);
+ $(e).addClass("win").siblings().attr("class", "").addClass("tie").eq(0).removeClass("tie");
+ }
/**
* This ugly method is used to initialize a huge html String
diff --git a/samples/src/main/java/gwtquery/samples/client/GwtQueryPluginModule.java b/samples/src/main/java/gwtquery/samples/client/GwtQueryPluginModule.java
deleted file mode 100644
index c9c11394..00000000
--- a/samples/src/main/java/gwtquery/samples/client/GwtQueryPluginModule.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gwtquery.samples.client;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.query.client.Function;
-import static com.google.gwt.query.client.GQuery.$;
-import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.Window;
-
-import gwtquery.plugins.collapser.Collapser;
-import static gwtquery.plugins.ratings.Ratings.Ratings;
-import static gwtquery.plugins.widgets.Widgets.Widgets;
-
-public class GwtQueryPluginModule implements EntryPoint {
-
- public void onModuleLoad() {
-
- $(".outer").eq(0).after("<button id='enhance'>Enhance</button>");
- $("#enhance").one(Event.ONCLICK, null, new Function() {
- @Override
- public boolean f(Event e) {
- $(e).attr("disabled", "true");
- $("input").as(Ratings).rating();
- return true;
- }
- });
- $(".btn:nth-child(odd)").as(Widgets).button()
- .addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent clickEvent) {
- Window.alert("You Clicked the Button");
- }
- }).end();
-
- $(".collapsible").as(Collapser.Collapser).apply();
- }
-} \ No newline at end of file
diff --git a/samples/src/main/java/gwtquery/samples/client/GwtQuerySampleModule.java b/samples/src/main/java/gwtquery/samples/client/GwtQuerySampleModule.java
index ce237220..6f69fa80 100644
--- a/samples/src/main/java/gwtquery/samples/client/GwtQuerySampleModule.java
+++ b/samples/src/main/java/gwtquery/samples/client/GwtQuerySampleModule.java
@@ -1,5 +1,7 @@
package gwtquery.samples.client;
+import static com.google.gwt.query.client.GQuery.$;
+import static com.google.gwt.query.client.GQuery.document;
import static com.google.gwt.query.client.GQuery.lazy;
import com.google.gwt.core.client.EntryPoint;
@@ -16,12 +18,20 @@ public class GwtQuerySampleModule implements EntryPoint {
}
public void onModuleLoad() {
+ // Use compiled selectors
Sample s = GWT.create(Sample.class);
+
+ // Just a simple usage of dom manipulation, events, and lazy usage
s.allNotes().text("Hello Google I/O").
css("cursor", "pointer").
toggle(
lazy().css("color", "red").done(),
lazy().css("color", "").done()
);
+
+ // Cascade effects
+ $("<div id='id1'>content</div>").appendTo(document).hide().fadeIn(5000).fadeOut(3000);
}
+
+
}
diff --git a/samples/src/main/java/gwtquery/samples/public/GwtQueryBench.html b/samples/src/main/java/gwtquery/samples/public/GwtQueryBench.html
index 50bd5a0c..666fff94 100644
--- a/samples/src/main/java/gwtquery/samples/public/GwtQueryBench.html
+++ b/samples/src/main/java/gwtquery/samples/public/GwtQueryBench.html
@@ -64,6 +64,12 @@
font-size: 12px;
color: white;
}
+ #racefield {
+ background-image: url(images/bench/grass-texture-small.jpg);
+ background-repeat: repeat;
+ -moz-border-radius: 15px;
+ border-radius: 15px;
+ }
</style>
@@ -72,11 +78,10 @@
<h2 style="color: white; border-bottom: 1px solid gray">
GWTSpeed - GWT Query benchmarks
</h2>
- <div id="startrace" style="color: red"></div>
+ <div id="startrace" style="color: red">Loading Javascript frameworks, please wait ...</div><br/>
<div id="racetrack" style="height: 0px; overflow: hidden;">
- <div id="racefield"
- style="height: 100%; padding: 15px; background-image: url(images/bench/grass-texture-small.jpg); background-repeat: repeat;">
- </div>
+ <div id="racefield">
+ </div>
</div>
<div id ="results" style="display: block; height: 200px; overflow-y:scroll; overflow-x: hidden; margin: 0">
diff --git a/samples/src/main/java/gwtquery/samples/public/GwtQueryPlugin.html b/samples/src/main/java/gwtquery/samples/public/GwtQueryPlugin.html
deleted file mode 100644
index bd9cd2fc..00000000
--- a/samples/src/main/java/gwtquery/samples/public/GwtQueryPlugin.html
+++ /dev/null
@@ -1,206 +0,0 @@
-<html>
-<head>
- <title>GQuery Demo</title>
- <script language="javascript"
- src="gwtquery.samples.GwtQueryPlugin.nocache.js"></script>
- <link href='gquery-star-ratings.css' type="text/css" rel="stylesheet"/>
-
-</head>
-<body>
-
-<div class="outer">
- <div id="tab-Overview" class="collapsible">
- <h2>What is this?</h2>
-
- <p>
- The <strong>Star Rating Plugin</strong> is a plugin
- for the jQuery Javascript library that creates a non-obstrusive
- star rating control based on a set of radio input boxes.
- </p>
-
- <h2>What does it do?</h2>
- <ul>
- <li>
- It turns a collection of radio boxes into a neat star-rating
- control.
- </li>
- <li>
- It creates the interface based on standard form elements, which
- means the
- basic functionality will still be available even if Javascript
- is disabled.
- </li>
- <li>
- <strong style="color: rgb(0, 153, 0);">NEW</strong> (12-Mar-08):
- In read only mode (using the 'readOnly' option or
- <code>disabled</code> property), the plugin is a neat way of
- displaying star-like values without any additional code
- </li>
- </ul>
-
- <h2>How do I use it?</h2>
-
- <p>
- Just add the <code><strong>star</strong></code> class to your radio
- boxes
- </p>
- <table cellspacing="5" width="100%">
- <tr>
- <td valign="top">
- <pre class="code"><code class="html">&lt;input name="star1" type="radio"
- class="star"/&gt;
- &lt;input name="star1" type="radio" class="star"/&gt;
- &lt;input name="star1" type="radio" class="star"/&gt;
- &lt;input name="star1" type="radio" class="star"/&gt;
- &lt;input name="star1" type="radio" class="star"/&gt;</code></pre>
- </td>
- <td valign="top" width="10">&raquo;</td>
- <td valign="top" width="180">
- <input name="star1" type="radio" class="star"/>
- <input name="star1" type="radio" class="star"/>
- <input name="star1" type="radio" class="star"/>
- <input name="star1" type="radio" class="star"/>
- <input name="star1" type="radio" class="star"/>
- </td>
- </tr>
- </table>
-
- <p>
- Use the <code><strong>checked</strong></code> property to specify
- the initial/default value of the control
- </p>
- <table cellspacing="5" width="100%">
- <tr>
- <td valign="top">
- <pre class="code"><code class="html">&lt;input name="star2" type="radio"
- class="star"/&gt;
- &lt;input name="star2" type="radio" class="star"/&gt;
- &lt;input name="star2" type="radio" class="star" checked="checked"/&gt;
- &lt;input name="star2" type="radio" class="star"/&gt;
- &lt;input name="star2" type="radio" class="star"/&gt;</code></pre>
- </td>
- <td valign="top" width="10">&raquo;</td>
- <td valign="top" width="180">
- <input name="star2" type="radio" class="star"/>
- <input name="star2" type="radio" class="star"/>
- <input name="star2" type="radio" class="star"
- checked="checked"/>
- <input name="star2" type="radio" class="star"/>
- <input name="star2" type="radio" class="star"/>
- </td>
- </tr>
- </table>
-
- <p>
- Use the <code><strong>disabled</strong></code> property to use a
- control for display purposes only
- </p>
- <table cellspacing="5" width="100%">
- <tr>
- <td valign="top">
- <pre class="code"><code class="html">&lt;input name="star3" type="radio"
- class="star" disabled="disabled"/&gt;
- &lt;input name="star3" type="radio" class="star" disabled="disabled"/&gt;
- &lt;input name="star3" type="radio" class="star" disabled="disabled"
- checked="checked"/&gt;
- &lt;input name="star3" type="radio" class="star" disabled="disabled"/&gt;
- &lt;input name="star3" type="radio" class="star" disabled="disabled"/&gt;</code></pre>
- </td>
- <td valign="top" width="10">&raquo;</td>
- <td valign="top" width="180">
- <input name="star3" type="radio" class="star"
- disabled="disabled"/>
- <input name="star3" type="radio" class="star"
- disabled="disabled"/>
- <input name="star3" type="radio" class="star"
- disabled="disabled" checked="checked"/>
- <input name="star3" type="radio" class="star"
- disabled="disabled"/>
- <input name="star3" type="radio" class="star"
- disabled="disabled"/>
- </td>
- </tr>
- </table>
-
- <h2>What about split stars and 'half ratings'???</h2>
-
- <p>
- Use metadata plugin to pass advanced settings to the plugin via the
- class property.
- </p>
- <table cellspacing="5" width="100%">
- <tr>
- <td valign="top">
- <pre class="code"><code class="html">&lt;input name="adv1" type="radio"
- class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"
- checked="checked"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star {split:4}"/&gt;
- &lt;input name="adv1" type="radio" class="star
- {split:4}"/&gt;</code></pre>
- </td>
- <td valign="top" width="10">&raquo;</td>
- <td valign="top" width="180">
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"
- checked="checked"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- <input name="adv1" type="radio" class="star {split:4}"/>
- </td>
- </tr>
- </table>
-
- <p>
- Use custom selector
- </p>
- <table cellspacing="5" width="100%">
- <tr>
- <td valign="top">
- <script>$(function() { // wait for document to load
- $('input.wow').rating();
- });</script>
- <pre class="code"><code class="js">$(function(){ // wait for document to
- load
- $('input.wow').rating();
- });</code></pre>
- <pre class="code"><code class="html">&lt;input name="adv2" type="radio"
- class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"
- checked="checked"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow {split:4}"/&gt;
- &lt;input name="adv2" type="radio" class="wow
- {split:4}"/&gt;</code></pre>
- </td>
- <td valign="top" width="10">&raquo;</td>
- <td valign="top" width="180">
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"
- checked="checked"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- <input name="adv2" type="radio" class="wow {split:4}"/>
- </td>
- </tr>
- </table>
- </div>
- <!--// tab-Overview //-->
-</div>
-
-</body>
-</html>
- \ No newline at end of file
diff --git a/samples/src/main/java/gwtquery/samples/public/html/gwtbench.html b/samples/src/main/java/gwtquery/samples/public/html/gwtbench.html
index deb7ac1e..913ae711 100644
--- a/samples/src/main/java/gwtquery/samples/public/html/gwtbench.html
+++ b/samples/src/main/java/gwtquery/samples/public/html/gwtbench.html
@@ -1,6 +1,10 @@
<html>
<head>
<title>Gwt</title>
+ <script type="text/javascript">
+ // Notify the application that the content can be written
+ window.parent.iframebench_ready_callback();
+ </script>
</head>
<body>
</body>
diff --git a/samples/src/main/java/gwtquery/samples/public/html/iframebench.html b/samples/src/main/java/gwtquery/samples/public/html/iframebench.html
index 44f42393..f14ef183 100644
--- a/samples/src/main/java/gwtquery/samples/public/html/iframebench.html
+++ b/samples/src/main/java/gwtquery/samples/public/html/iframebench.html
@@ -32,6 +32,10 @@
return $$(sel).length;
}
</script>
+ <script type="text/javascript">
+ // Notify the application that the content can be written
+ window.parent.iframebench_ready_callback();
+ </script>
</head>
<body>
</body>