From 43576758311bd64506284b15a3a12f153a1c1bc2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 5 Jun 2011 11:28:43 +0200 Subject: 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). --- lib/scripts/jquery/update.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 lib/scripts/jquery/update.sh (limited to 'lib/scripts/jquery/update.sh') 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 +# @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 -- cgit v1.2.3 From 67fd10d7d6376d0033f3bee5b62b5ec2b80b5a9a Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 5 Nov 2011 12:05:34 +0100 Subject: Remove font family declarations from css in the jquery update script --- lib/scripts/jquery/update.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/scripts/jquery/update.sh') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index 38f38bece..fde46f4d7 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -23,3 +23,6 @@ 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 -- cgit v1.2.3