From c8468e91ffa2c0ef2734b9c01f660c92b6370266 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Sat, 17 Mar 2012 20:39:27 +0000 Subject: [PATCH] move the example plugin to the plugins namespace --- .../java/gwtquery/jsquery/client/JsQuery.java | 22 +++++++----------- .../client/{ => plugins/menu}/JsMenu.java | 2 +- .../client/{ => plugins/menu}/jsmenu.diff | 0 .../java/gwtquery/jsquery/public/JsQuery.html | 2 +- .../public/{ => plugins/menu}/arrow_right.gif | Bin .../public/{ => plugins/menu}/arrowdown.png | Bin .../public/{ => plugins/menu}/demo.html | 2 +- .../public/{ => plugins/menu}/myshadow.png | Bin .../public/{ => plugins/menu}/style.css | 0 jsquery/src/main/webapp/index.html | 1 + 10 files changed, 12 insertions(+), 17 deletions(-) rename jsquery/src/main/java/gwtquery/jsquery/client/{ => plugins/menu}/JsMenu.java (99%) rename jsquery/src/main/java/gwtquery/jsquery/client/{ => plugins/menu}/jsmenu.diff (100%) rename jsquery/src/main/java/gwtquery/jsquery/public/{ => plugins/menu}/arrow_right.gif (100%) rename jsquery/src/main/java/gwtquery/jsquery/public/{ => plugins/menu}/arrowdown.png (100%) rename jsquery/src/main/java/gwtquery/jsquery/public/{ => plugins/menu}/demo.html (99%) rename jsquery/src/main/java/gwtquery/jsquery/public/{ => plugins/menu}/myshadow.png (100%) rename jsquery/src/main/java/gwtquery/jsquery/public/{ => plugins/menu}/style.css (100%) diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java b/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java index d18a5d8c..f5f2b386 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java +++ b/jsquery/src/main/java/gwtquery/jsquery/client/JsQuery.java @@ -1,5 +1,7 @@ package gwtquery.jsquery.client; +import gwtquery.jsquery.client.plugins.menu.JsMenu; + import java.util.logging.Logger; import com.google.gwt.core.client.EntryPoint; @@ -26,22 +28,14 @@ public class JsQuery implements EntryPoint { // testJs(); } + /** + * Useful to paste js code here and test in dev mode + */ private native static void testJs() /*-{ var l = @gwtquery.jsquery.client.utils.JsQueryUtils::log(Ljava/lang/Object;); + window = $wnd; + document = $doc; + $ = $wnd.$; - var options = {minWidth: 120, arrowSrc: 'arrow_right.gif', copyClassAttr: true, onClick: function(e, menuItem){ - alert('you clicked item "' + $(this).text() + '"'); - }}; - $('#menuone').menu(options); - - var items = [ {src: 'test', url:'http://www.jquery.com'}, - {src: ''}, // separator - {src: 'test2', subMenu: [ {src: 'sub 1'}, - {src: 'sub 2', url: 'http://p.sohei.org', target: '_blank'}, - {src: 'sub 3'}]}]; - $('#menutwo').menu(options, items); - - }-*/; - } diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java b/jsquery/src/main/java/gwtquery/jsquery/client/plugins/menu/JsMenu.java similarity index 99% rename from jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java rename to jsquery/src/main/java/gwtquery/jsquery/client/plugins/menu/JsMenu.java index 3c73eef9..28ce5699 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/client/JsMenu.java +++ b/jsquery/src/main/java/gwtquery/jsquery/client/plugins/menu/JsMenu.java @@ -1,4 +1,4 @@ -package gwtquery.jsquery.client; +package gwtquery.jsquery.client.plugins.menu; /** * diff --git a/jsquery/src/main/java/gwtquery/jsquery/client/jsmenu.diff b/jsquery/src/main/java/gwtquery/jsquery/client/plugins/menu/jsmenu.diff similarity index 100% rename from jsquery/src/main/java/gwtquery/jsquery/client/jsmenu.diff rename to jsquery/src/main/java/gwtquery/jsquery/client/plugins/menu/jsmenu.diff diff --git a/jsquery/src/main/java/gwtquery/jsquery/public/JsQuery.html b/jsquery/src/main/java/gwtquery/jsquery/public/JsQuery.html index 2006d2e7..de1c3800 100644 --- a/jsquery/src/main/java/gwtquery/jsquery/public/JsQuery.html +++ b/jsquery/src/main/java/gwtquery/jsquery/public/JsQuery.html @@ -9,7 +9,7 @@ + -- 2.39.5