diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-06-05 11:28:43 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-06-05 11:28:43 +0200 |
commit | 43576758311bd64506284b15a3a12f153a1c1bc2 (patch) | |
tree | 9bcb1150b954d36621beaf17a2778e0154ba3939 /lib/scripts/jquery/update.sh | |
parent | 17582ec6bab09e9d9faf53a93d22ecb4fbf2bb47 (diff) | |
download | rpg-43576758311bd64506284b15a3a12f153a1c1bc2.tar.gz rpg-43576758311bd64506284b15a3a12f153a1c1bc2.tar.bz2 |
Updated jQuery-UI, added jQuery updater, load theme in CSS dispatcher
This patch adds a simple shell script to easily update the
jQuery/jQuery-UI+theme bundle to the latest available version.
The jQuery-UI CSS theme is now loaded in lib/exe/css.php (before plugin
and template styles - 3rd party authors can override the styles).
Diffstat (limited to 'lib/scripts/jquery/update.sh')
-rwxr-xr-x | lib/scripts/jquery/update.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh new file mode 100755 index 000000000..38f38bece --- /dev/null +++ b/lib/scripts/jquery/update.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN +# +# It also loads the 'smoothness' jQuery-UI theme and all referenced images. +# +# @author Andreas Gohr <andi@splitbrain.org> +# @link https://code.google.com/apis/libraries/devguide.html#jquery + +# load jQuery +wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js -O jquery.min.js +wget -nv https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js -O jquery.js + +# load jQuery-UI +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js -O jquery-ui.min.js +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js -O jquery-ui.js + +# load the smoothness theme +mkdir -p jquery-ui-theme/images +wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css -O jquery-ui-theme/smoothness.css +images=`gawk 'match($0, /url\((images\/[^\)]+)\)/, m) { print m[1] }' jquery-ui-theme/smoothness.css` +for img in $images +do + wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img +done |