Permalink
Browse files

started taglib. initial resources moved in. autocomplete done.

  • Loading branch information...
1 parent 81c096e commit a8bd2b5353b8a274c082cb19cbb42c8453b39161 @swestfall committed Jul 24, 2011
Showing with 3,834 additions and 187 deletions.
  1. +36 −1 jqueryui-widget-testApp/grails-app/conf/BootStrap.groovy
  2. +11 −0 ...idget-testApp/grails-app/controllers/grails/jqueryui/widget/testApp/AutoCompleteController.groovy
  3. +6 −0 jqueryui-widget-testApp/grails-app/controllers/grails/jqueryui/widget/testApp/StockController.groovy
  4. +13 −0 jqueryui-widget-testApp/grails-app/domain/grails/jqueryui/widget/testApp/Stock.groovy
  5. +13 −0 jqueryui-widget-testApp/grails-app/views/autoComplete/index.gsp
  6. +48 −0 jqueryui-widget-testApp/grails-app/views/autoComplete/localData.gsp
  7. +13 −8 jqueryui-widget-testApp/grails-app/views/layouts/main.gsp
  8. +25 −0 jqueryui-widget-testApp/jqueryui-widget-testApp-grailsPlugins.iml
  9. +25 −0 jqueryui-widget-testApp/jqueryuiWidget-inplacePlugin-grailsPlugins.iml
  10. +15 −178 jqueryui-widget-testApp/web-app/css/main.css
  11. +39 −0 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/AutoCompleteTagLib.groovy
  12. +14 −0 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/UtilTagLib.groovy
  13. +79 −0 jqueryui-widget/src/groovy/grails/jqueryui/widget/GrailsJQueryUIWidgetUtil.groovy
  14. +919 −0 jqueryui-widget/src/java/org/json/JSONArray.java
  15. +28 −0 jqueryui-widget/src/java/org/json/JSONException.java
  16. +1,635 −0 jqueryui-widget/src/java/org/json/JSONObject.java
  17. +18 −0 jqueryui-widget/src/java/org/json/JSONString.java
  18. +78 −0 jqueryui-widget/src/java/org/json/JSONStringer.java
  19. +445 −0 jqueryui-widget/src/java/org/json/JSONTokener.java
  20. +323 −0 jqueryui-widget/src/java/org/json/JSONWriter.java
  21. +51 −0 jqueryui-widget/web-app/js/pluginResources.js
@@ -1,7 +1,42 @@
-class BootStrap {
+import grails.jqueryui.widget.testApp.Stock
+
+ class BootStrap {
def init = { servletContext ->
+
+ new Stock(company: '3m Co', price: 71.72, change: 0.02, percentChange: 0.03, lastChange: new Date()).save()
+ new Stock(company: 'Alcoa Inc', price: 29.01, change: 0.42, percentChange: 1.47, lastChange: new Date().parse('MM/dd/yyyy', '02/01/2005')).save()
+ new Stock(company: 'Altria Group Inc', price: 83.81, change: 0.28, percentChange: 0.34, lastChange: new Date().parse('MM/dd/yyyy', '07/07/2011')).save()
+ new Stock(company: 'American Express Company', price: 52.55, change: 0.01, percentChange: 0.02, lastChange: new Date().parse('MM/dd/yyyy', '08/12/2007')).save()
+ new Stock(company: 'American International Group, Inc.', price: 64.13, change: 0.31, percentChange: 0.49, lastChange: new Date()).save()
+ new Stock(company: 'AT&T Inc.', price: 31.61, change: -0.48, percentChange: -1.54, lastChange: new Date()).save()
+ new Stock(company: 'Boeing Co.', price: 75.43, change: 0.53, percentChange: 0.72, lastChange: new Date().parse('MM/dd/yyyy', '02/01/2005')).save()
+ new Stock(company: 'Caterpillar Inc.', price: 67.27, change: 0.92, percentChange: 1.39, lastChange: new Date().parse('MM/dd/yyyy', '08/12/2007')).save()
+ new Stock(company: 'Citigroup, Inc.', price: 49.37, change: 0.02, percentChange: 0.04, lastChange: new Date().parse('MM/dd/yyyy', '01/28/2007')).save()
+ new Stock(company: 'E.I. du Pont de Nemours and Company', price: 40.48, change: 0.51, percentChange: 1.28, lastChange: new Date()).save()
+ new Stock(company: 'Exxon Mobil Corp', price: 68.1, change: -0.43, percentChange: -0.64, lastChange: new Date()).save()
+ new Stock(company: 'General Electric Company', price: 34.14, change: -0.08, percentChange: -0.23, lastChange: new Date().parse('MM/dd/yyyy', '08/12/2007')).save()
+ new Stock(company: 'General Motors Corporation', price: 30.27, change: 1.09, percentChange: 3.74, lastChange: new Date().parse('MM/dd/yyyy', '12/20/2002')).save()
+ new Stock(company: 'Hewlett-Packard Co.', price: 36.53, change: -0.03, percentChange: -0.08, lastChange: new Date().parse('MM/dd/yyyy', '02/01/2005')).save()
+ new Stock(company: 'Honeywell Intl Inc', price: 38.77, change: 0.05, percentChange: 0.13, lastChange: new Date().parse('MM/dd/yyyy', '07/07/2011')).save()
+ new Stock(company: 'Intel Corporation', price: 19.88, change: 0.31, percentChange: 1.58, lastChange: new Date().parse('MM/dd/yyyy', '01/28/2007')).save()
+ new Stock(company: 'International Business Machines', price: 81.41, change: 0.44, percentChange: 0.54, lastChange: new Date()).save()
+ new Stock(company: 'Johnson & Johnson', price: 64.72, change: 0.06, percentChange: 0.09, lastChange: new Date()).save()
+ new Stock(company: 'JP Morgan & Chase & Co', price: 45.73, change: 0.07, percentChange: 0.15, lastChange: new Date().parse('MM/dd/yyyy', '08/12/2007')).save()
+ new Stock(company: 'McDonald\'s Corporation', price: 36.76, change: 0.86, percentChange: 2.40, lastChange: new Date().parse('MM/dd/yyyy', '01/28/2007')).save()
+ new Stock(company: 'Merck & Co., Inc.', price: 40.96, change: 0.41, percentChange: 1.01, lastChange: new Date().parse('MM/dd/yyyy', '07/07/2011')).save()
+ new Stock(company: 'Microsoft Corporation', price: 25.84, change: 0.14, percentChange: 0.54, lastChange: new Date()).save()
+ new Stock(company: 'Pfizer Inc', price: 27.96, change: 0.4, percentChange: 1.45, lastChange: new Date().parse('MM/dd/yyyy', '02/01/2005')).save()
+ new Stock(company: 'The Coca-Cola Company', price: 45.07, change: 0.26, percentChange: 0.58, lastChange: new Date()).save()
+ new Stock(company: 'The Home Depot, Inc.', price: 34.64, change: 0.35, percentChange: 1.02, lastChange: new Date().parse('MM/dd/yyyy', '01/28/2007')).save()
+ new Stock(company: 'The Procter & Gamble Company', price: 61.91, change: 0.01, percentChange: 0.02, lastChange: new Date()).save()
+ new Stock(company: 'United Technologies Corporation', price: 63.26, change: 0.55, percentChange: 0.88, lastChange: new Date().parse('MM/dd/yyyy', '12/20/2002')).save()
+ new Stock(company: 'Verizon Communications', price: 35.57, change: 0.39, percentChange: 1.11, lastChange: new Date().parse('MM/dd/yyyy', '07/07/2011')).save()
+ new Stock(company: 'Wal-Mart Stores, Inc.', price: 45.45, change: 0.73, percentChange: 1.63, lastChange: new Date()).save()
+
}
+
def destroy = {
}
+
}
@@ -0,0 +1,11 @@
+package grails.jqueryui.widget.testApp
+
+class AutoCompleteController {
+
+ def index = { }
+
+ def localData = {
+ List stocks = Stock.findAll().collect() {return it.company.toString()}
+ return [stocks: stocks]
+ }
+}
@@ -0,0 +1,6 @@
+package grails.jqueryui.widget.testApp
+
+class StockController {
+
+ def index = { }
+}
@@ -0,0 +1,13 @@
+package grails.jqueryui.widget.testApp
+
+class Stock {
+
+ String company
+ Float price
+ Float change
+ Float percentChange
+ Date lastChange
+
+ static constraints = {
+ }
+}
@@ -0,0 +1,13 @@
+<%--
+ Created by IntelliJ IDEA.
+ User: swestfall
+ Date: 7/24/11
+ Time: 6:21 AM
+ To change this template use File | Settings | File Templates.
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8" %>
+<html>
+ <head><title>Simple GSP page</title></head>
+ <body>Place your content here</body>
+</html>
@@ -0,0 +1,48 @@
+<%--
+ Created by IntelliJ IDEA.
+ User: swestfall
+ Date: 7/24/11
+ Time: 6:22 AM
+ To change this template use File | Settings | File Templates.
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8" %>
+<html>
+ <head>
+ <title>Example of jQueryUI AutoComplete with Local DataSource</title>
+ <meta name="layout" content="main"/>
+ </head>
+ <body>
+ <div class="examplePageContainer">
+
+ <h2>Example of jQueryUI AutoComplete with Local DataSource</h2>
+ <a href="http://jqueryui.com/demos/autocomplete/#default">jQueryUI Example</a>
+
+
+ <div class="exampleContainer">
+ <h3>Pre-Existing Markup</h3>
+ <label for="tags">Tags:</label>
+ <input id="tags"/>
+ <jqueryui:jquiAutoComplete
+ id="tags"
+ namespace="grails.jqueryui.components"
+ renderMarkup="false"
+ config="${[
+ source: stocks
+ ]}"/>
+ </div>
+
+ <div class="exampleContainer">
+ <h3>Tag Creates Markup</h3>
+ <label for="tags2">Tags:</label>
+ <jqueryui:jquiAutoComplete
+ id="tags2"
+ namespace="grails.jqueryui.components"
+ config="${[
+ source: stocks
+ ]}"/>
+ </div>
+
+ </div>
+ </body>
+</html>
@@ -1,18 +1,23 @@
<!DOCTYPE html>
<html>
<head>
- <title><g:layoutTitle default="Grails" /></title>
- <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
- <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
- <g:layoutHead />
- <g:javascript library="jquery" />
+ <title><g:layoutTitle default="Grails"/></title>
+ <link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}"/>
+ <link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon"/>
+ <g:layoutHead/>
+ <g:javascript library="jquery" plugin="jquery"/>
<jqui:resources/>
+ <jqueryui:javascript />
</head>
<body>
<div id="spinner" class="spinner" style="display:none;">
- <img src="${resource(dir:'images',file:'spinner.gif')}" alt="${message(code:'spinner.alt',default:'Loading...')}" />
+ <img src="${resource(dir: 'images', file: 'spinner.gif')}" alt="${message(code: 'spinner.alt', default: 'Loading...')}"/>
</div>
- <div id="grailsLogo"><a href="http://grails.org"><img src="${resource(dir:'images',file:'grails_logo.png')}" alt="Grails" border="0" /></a></div>
- <g:layoutBody />
+ <div id="grailsLogo">
+ <a href="http://grails.org">
+ <img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails" border="0"/>
+ </a>
+ </div>
+ <g:layoutBody/>
</body>
</html>
@@ -1,12 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="web" name="GrailsWeb">
+ <configuration>
+ <webroots>
+ <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/web-app" relative="/" />
+ <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/web-app" relative="/" />
+ </webroots>
+ <sourceRoots />
+ </configuration>
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/hibernate-1.3.7">
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/hibernate-1.3.7/target/classes" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/hibernate-1.3.7/target/test-classes" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/hibernate-1.3.7/web-app/plugins" />
</content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/src/groovy" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/grails-app/services" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/grails-app/taglib" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/web-app/plugins" />
+ </content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/grails-app/taglib" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/web-app/plugins" />
+ </content>
<content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/tomcat-1.3.7">
<sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/tomcat-1.3.7/src/groovy" isTestSource="false" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/tomcat-1.3.7/target/classes" />
@@ -1,12 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="web" name="GrailsWeb">
+ <configuration>
+ <webroots>
+ <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/web-app" relative="/" />
+ <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11/web-app" relative="/" />
+ </webroots>
+ <sourceRoots />
+ </configuration>
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/hibernate-1.3.7">
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/hibernate-1.3.7/target/classes" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/hibernate-1.3.7/target/test-classes" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/hibernate-1.3.7/web-app/plugins" />
</content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/src/groovy" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/grails-app/services" isTestSource="false" />
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/grails-app/taglib" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-1.6.1.1/web-app/plugins" />
+ </content>
+ <content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11">
+ <sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11/grails-app/taglib" isTestSource="false" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11/target/classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11/target/test-classes" />
+ <excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/jquery-ui-1.8.11/web-app/plugins" />
+ </content>
<content url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/tomcat-1.3.7">
<sourceFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/tomcat-1.3.7/src/groovy" isTestSource="false" />
<excludeFolder url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget/plugins/tomcat-1.3.7/target/classes" />
Oops, something went wrong. Retry.

0 comments on commit a8bd2b5

Please sign in to comment.