diff options
author | Adrian Lang <mail@adrianlang.de> | 2011-11-10 15:43:15 +0100 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2011-11-10 15:43:15 +0100 |
commit | 16a774a8a61756df2d8fb813bfbaed98b42e3e65 (patch) | |
tree | 3a48d311e74ccbf4017330cef8af00003b0ddb34 /lib/scripts/jquery/update.sh | |
parent | 662a7b3fcc22d8327026bc1ef161a096683f1580 (diff) | |
parent | a5a71ecfcc1ed6bfca1995b39cd0abe4b8dd9eeb (diff) | |
download | rpg-16a774a8a61756df2d8fb813bfbaed98b42e3e65.tar.gz rpg-16a774a8a61756df2d8fb813bfbaed98b42e3e65.tar.bz2 |
Merge branch 'master' into stable
Conflicts:
doku.php
Diffstat (limited to 'lib/scripts/jquery/update.sh')
-rwxr-xr-x | lib/scripts/jquery/update.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh new file mode 100755 index 000000000..fde46f4d7 --- /dev/null +++ b/lib/scripts/jquery/update.sh @@ -0,0 +1,28 @@ +#!/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 + +# remove font family declarations from smoothness CSS +sed -i "s/font-family:[^;]*; \?//" jquery-ui-theme/smoothness.css |