Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to upgrade to the latest jquery version i.e 3 #1

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4564bbe
Upgrade jQuery to 1.5.1
robfletcher Mar 24, 2011
bf425a1
jQuery 1.5.2
robfletcher Mar 31, 2011
4aac593
upgrade jQuery to 1.6
robfletcher May 5, 2011
53145be
removed intellij project files
robfletcher May 5, 2011
a5835d5
1.6 generated files
robfletcher May 5, 2011
b562a09
Updated to jQuery 1.6.1
robfletcher May 17, 2011
fcf5d1d
fix install-j-query script
robfletcher May 19, 2011
c9a8b2b
packaged new version
robfletcher May 19, 2011
c51e017
removed old jquery
bobbywarner Nov 17, 2011
3819fbc
updated version and added new 1.7 files
bobbywarner Nov 17, 2011
6622ffc
packaged v1.7 of the plugin
bobbywarner Nov 17, 2011
76e1993
Merge pull request #1 from bobbywarner/master
graemerocher Nov 17, 2011
282bd4a
Fix install script
antonevane Nov 18, 2011
c5ca8b8
Update scripts/InstallJQuery.groovy
graemerocher Nov 18, 2011
96d58b2
Merge pull request #2 from antonevane/master
graemerocher Nov 18, 2011
5a4059e
remove and ignore some files that don't need to be in the repo
Nov 21, 2011
5affe0e
update release plugin
Nov 21, 2011
8958f16
removed old jquery
bobbywarner Nov 22, 2011
15aee19
Added new jQuery files and updated version to 1.7.1
bobbywarner Nov 22, 2011
e00aba4
Merge pull request #3 from bobbywarner/master
graemerocher Nov 22, 2011
623a898
ship jQuery 1.7.2
robfletcher Jun 11, 2012
ee85357
updated to jQuery 1.8.0
robfletcher Aug 21, 2012
24b4384
Updated jQuery to 1.8.2
bobbywarner Nov 8, 2012
de38364
Updated to jQuery 1.8.3
bobbywarner Nov 14, 2012
32779bb
Update to jQuery 1.9.0, Grails 2.2.0 and Release Plugin 2.2.0
bobbywarner Jan 15, 2013
aca5343
Updated to jQuery 1.9.1
bobbywarner Feb 5, 2013
b476a9e
removed file
bobbywarner Feb 5, 2013
598112f
Update plugin metadata
rlovtangen Apr 9, 2013
1d6d2c0
Merge pull request #21 from rlovtangen/pluginmetadata
bobbywarner Apr 22, 2013
8a142f0
deleted unused files
burtbeckwith May 30, 2013
0256bee
cleanup
burtbeckwith May 30, 2013
367a0f6
Updated jQuery to 1.10.0
bobbywarner May 30, 2013
dbd6d54
Update JqueryGrailsPlugin.groovy
burtbeckwith May 30, 2013
0a50e05
Updated to jQuery 1.10.2
bobbywarner Jul 4, 2013
1e740b6
added asset-pipeline support
davydotcom Aug 1, 2013
02555ce
corrected path
davydotcom Aug 2, 2013
ea2a530
added .min.map file
dtanner Aug 23, 2013
f3b3dc6
generated docs shouldn't be in source control
burtbeckwith Nov 1, 2013
12422b4
deleted unused files
burtbeckwith Nov 1, 2013
aabd85b
cleanup
burtbeckwith Nov 1, 2013
089514b
Merge pull request #23 from dtanner/master
bobbywarner Nov 21, 2013
4d80ab1
Updated version to 1.10.2.1 for simple release with map file
bobbywarner Nov 21, 2013
bdbb386
Fixed version number
bobbywarner Nov 21, 2013
0952300
Merge pull request #22 from davydotcom/master
bobbywarner Jan 24, 2014
863c573
Updated jQuery to 1.11.0
bobbywarner Jan 24, 2014
38f7430
fixing jquery plugin
davydotcom Feb 11, 2014
8bf4900
adding file tre
davydotcom Feb 11, 2014
9fbe464
Merge pull request #25 from davydotcom/patch-asset-pipeline
bobbywarner Feb 11, 2014
dd7a1e2
Increment version for asset-pipeline fix
bobbywarner Feb 11, 2014
c10aa64
Remove reference to the deprecated ApplicationHolder class
Feb 25, 2014
56c8767
version 1.11.0.2
Feb 26, 2014
26d6821
Updated jQuery to 1.11.1
bobbywarner May 3, 2014
a7087eb
upgrade to 2.3.8, add wrapper
graemerocher May 13, 2014
e5479be
add Travis CI
graemerocher May 13, 2014
772e573
Create README.md
graemerocher May 13, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .classpath
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/groovy"/>
<classpathentry kind="src" path="grails-app/conf"/>
<classpathentry kind="src" path="grails-app/controllers"/>
<classpathentry kind="src" path="grails-app/domain"/>
<classpathentry kind="src" path="grails-app/services"/>
<classpathentry kind="src" path="grails-app/taglib"/>
<classpathentry kind="src" path="test/integration"/>
<classpathentry kind="src" path="test/unit"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="com.springsource.sts.grails.core.CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="web-app/WEB-INF/classes"/>
</classpath>
<classpathentry kind="src" path="src/groovy"/>
<classpathentry kind="src" path="grails-app/conf"/>
<classpathentry kind="src" path="grails-app/services"/>
<classpathentry kind="src" path="grails-app/taglib"/>
<classpathentry kind="src" path="scripts"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path=".link_to_grails_plugins/release-2.2.1/src/groovy">
<attributes>
<attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=".link_to_grails_plugins/release-2.2.1/src/java">
<attributes>
<attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=".link_to_grails_plugins/rest-client-builder-1.0.3/src/groovy">
<attributes>
<attribute name="org.grails.ide.eclipse.core.SOURCE_FOLDER" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.grails.ide.eclipse.core.CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/eclipseclasses"/>
</classpath>
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
out/*
target/*
.idea/*
*.log
/target
/docs
grails-jquery-*.zip
grails-jquery-*.zip.sha1
plugin.xml
.idea
*.iml
web-app/WEB-INF
3 changes: 2 additions & 1 deletion .project
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
</buildCommand>
</buildSpec>
<natures>
<nature>com.springsource.sts.grails.core.nature</nature>
<nature>org.grails.ide.eclipse.core.nature</nature>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: groovy
jdk:
- openjdk6
before_script:
- rm -rf target
script: ./travis-build.sh
env:
global:
- GIT_NAME="Graeme Rocher"
- GIT_EMAIL="graeme.rocher@gmail.com"
- secure: VeP0HS3/uVimyEPOVo3xJ2UlpHHJF3gHrvM/g1wwzg4omIl6s0ju3qInLqTbMkdLyNkMrMnL3LaoJ9gdVu5kVZPIdNpcwdMINGCAWaXb+vYl6u/Y/NFpZDmFMEZUP5JtQHzAHs3Eu0qkg0NkutcVeEbStezlXjoqQ2QNXfoRsRk=
- secure: rdJ5evoj7+ZpuV4cN6B9p7fKXRIXn0oONk3NMfJB2V7swzgYtZDWXhdb25DmAKtu+YxctB6Hg7tqWa8L5ZWyjrzM9xsjRXnh01WA/jiL6J30hRmTau1f7EGqYzaGhsTWfrSJH2Z6Kt9FtGNMAUtuG+ic0Df7WBzhz1AUTUWVG2Q=
- secure: KGXXX5Df3Jbfrp7rPhUX7MNhrjjm69ZpmW7GzsBZE0emTBPbRhpj0/h5jVr68igudUsd62mAm0Op6eEHKD7QyQcjvzHvjysabNVDwbAA/SRunrH4So4NPNbZsPuuhB6bxy8VE5NblzBINaXM8WIRmbdzjvDSagliXMOEnfWQLwY=
81 changes: 42 additions & 39 deletions JqueryGrailsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +14,66 @@
* limitations under the License.
*/

import grails.util.GrailsUtil;
import org.codehaus.groovy.grails.commons.GrailsApplication;
import org.codehaus.groovy.grails.plugins.web.taglib.*
import grails.util.Environment

import org.codehaus.groovy.grails.plugins.jquery.JQueryConfig
import org.codehaus.groovy.grails.plugins.jquery.JQueryProvider
import org.codehaus.groovy.grails.commons.ConfigurationHolder
import org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib

class JqueryGrailsPlugin {
// Only change the point release. Edit o.c.g.g.o.j.JQueryConfig.SHIPPED_VERSION when changing jQuery resource version
def version = JQueryConfig.SHIPPED_VERSION

static SHIPPED_SRC_DIR = 'jquery'
// This should match JQueryConfig.SHIPPED_VERSION but must be a literal here due to how AstPluginDescriptorReader parses this file
def version = "1.11.1-SNAPSHOT"

// the version or versions of Grails the plugin is designed for
def grailsVersion = "1.2.2 > *"
static SHIPPED_SRC_DIR = 'jquery'

def dependsOn = [:]
def grailsVersion = "1.3 > *"

def pluginExcludes = [
"web-app/css",
"web-app/images",
"web-app/js/prototype",
"web-app/js/application.js"
'docs/**',
'src/docs/**'
]

def author = "Sergey Nebolsin, Craig Jone, Marc Palmer and Finn Herpich"
def authorEmail = "nebolsin@gmail.com, craigjones@maximsc.com, marc@grailsrocks.com and finn.herpich@marfinn-software.de"
def title = "JQuery for Grails"
def description = "Provides integration for the JQuery library with grails JavascriptProvider"
def documentation = "http://grails.org/JQuery+Plugin"
def title = "jQuery for Grails"
def description = "Provides integration for the jQuery library with Grails JavascriptProvider"
def documentation = "http://grails.org/plugin/jquery"
def license = "APACHE"
def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPJQUERY" ]
def scm = [ url: "https://github.com/gpc/grails-jquery" ]
def organization = [ name: "Grails Plugin Collective", url: "http://github.com/gpc" ]
def developers = [
[name: "Sergey Nebolsin", email: "nebolsin@gmail.com"],
[name: "Craig Jones", email: "craigjones@maximsc.com"],
[name: "Marc Palmer", email: "marc@grailsrocks.com"],
[name: "Finn Herpich", email: "finn.herpich@marfinn-software.de"]
]

static jQueryVersion
static jQuerySources

def doWithSpring = {
jQueryConfig(JQueryConfig)
}

void loadConfig() {
GroovyClassLoader classLoader = new GroovyClassLoader(getClass().getClassLoader())
def confClass
try {
confClass = classLoader.loadClass('JQueryConfig')
} catch (Exception e) {
// <gulp>
}
ConfigObject config = confClass ? new ConfigSlurper().parse(confClass).merge(ConfigurationHolder.config) : ConfigurationHolder.config

JqueryGrailsPlugin.jQueryVersion = config.jquery.version instanceof String ? config.jquery.version : JQueryConfig.SHIPPED_VERSION
JqueryGrailsPlugin.jQuerySources = config.jquery.sources instanceof String ? config.jquery.sources : JqueryGrailsPlugin.SHIPPED_SRC_DIR
}
private void loadConfig(application) {
GroovyClassLoader classLoader = new GroovyClassLoader(getClass().getClassLoader())
def confClass
try {
confClass = classLoader.loadClass('JQueryConfig')
} catch (Exception e) {
// <gulp>
}
ConfigObject config = confClass ? new ConfigSlurper(Environment.current.name).parse(confClass).merge(application.config) : application.config

JqueryGrailsPlugin.jQueryVersion = config.jquery.version instanceof String ? config.jquery.version : JQueryConfig.SHIPPED_VERSION
JqueryGrailsPlugin.jQuerySources = config.jquery.sources instanceof String ? config.jquery.sources : JqueryGrailsPlugin.SHIPPED_SRC_DIR
}

def doWithApplicationContext = { applicationContext ->
// We need to init our own config first
loadConfig()
// We need to init our own config first
loadConfig(application)

if(GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
if (Environment.isDevelopmentMode()) {
JavascriptTagLib.LIBRARY_MAPPINGS.jquery = ["${JqueryGrailsPlugin.jQuerySources}/jquery-${JqueryGrailsPlugin.jQueryVersion}"]
} else {
JavascriptTagLib.LIBRARY_MAPPINGS.jquery = ["${JqueryGrailsPlugin.jQuerySources}/jquery-${JqueryGrailsPlugin.jQueryVersion}.min"]
Expand All @@ -79,14 +82,14 @@ class JqueryGrailsPlugin {
def jQueryConfig = applicationContext.jQueryConfig
jQueryConfig.init()

if(jQueryConfig.defaultPlugins) {
if (jQueryConfig.defaultPlugins) {
jQueryConfig.defaultPlugins.each { pluginName ->
jQueryConfig.plugins."$pluginName".each {fileName ->
JavascriptTagLib.LIBRARY_MAPPINGS.jquery += ["${JqueryGrailsPlugin.jQuerySources}/${fileName}"[0..-4]]
}
}
}

JavascriptTagLib.PROVIDER_MAPPINGS.jquery = JQueryProvider.class
JavascriptTagLib.PROVIDER_MAPPINGS.jquery = JQueryProvider
}
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[![Build Status](https://travis-ci.org/gpc/grails-jquery.svg)](https://travis-ci.org/gpc/grails-jquery)

jQuery Grails Plugin
=============

This is the [jQuery plugin](http://grails.org/plugin/jquery) for Grails. It adds the jQuery library to a Grails application via the `resources` or `asset-pipeline` plugins.

Anybody can contribute and releases are automated by [Travis CI](https://travis-ci.org/gpc/grails-jquery). Just send a pull request for the last version of jQuery and as soon as it is merged Travis will push out a new release.

5 changes: 1 addition & 4 deletions application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#Grails Metadata file
#Sat Oct 16 14:36:22 CEST 2010
app.grails.version=1.3.5
app.name=grails-jquery
app.grails.version=2.3.8
Loading