summaryrefslogtreecommitdiff
path: root/lib/scripts/jquery/update.sh
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-09-29 20:17:39 +0200
committerAndreas Gohr <andi@splitbrain.org>2014-09-29 20:17:39 +0200
commit6c1ae996157551dcf5bb4e7e8922677bb3d3d358 (patch)
treeb3a4162367176a4e2ebadbd6ab31753c1b042be0 /lib/scripts/jquery/update.sh
parent35f3340eb3b989194a496861abfb5b3d3c9a630d (diff)
parent57271d078b9c433bec79d75cb44dadcafeae07df (diff)
downloadrpg-6c1ae996157551dcf5bb4e7e8922677bb3d3d358.tar.gz
rpg-6c1ae996157551dcf5bb4e7e8922677bb3d3d358.tar.bz2
Merge branch 'master' into stable
* master: (214 commits) release preparations postgresql auth plugin: correct function name parse AT parameter: first strtotime then timestamp remove config option move more strings to lang.php move strings to lang.php add placeholders for create page text phpdocs parserutils improve some scrutinizer issues visibility plugin methods use config cascade for loading of localizations reformatting config cascade add lang files to cascading work around missing gzopen on certain systems #865 translation update fix scrutinizer issues fixed typos in docblock comments do not allow empty passwords clean user credentials from control chars added filter method to INPUT class translation update ...
Diffstat (limited to 'lib/scripts/jquery/update.sh')
-rwxr-xr-xlib/scripts/jquery/update.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh
index 719a0829d..741fcff1c 100755
--- a/lib/scripts/jquery/update.sh
+++ b/lib/scripts/jquery/update.sh
@@ -1,46 +1,50 @@
#!/bin/sh
#
-# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's and jQuery's CDN
+# This script loads the latest jQuery and jQuery-UI 1.* versions from jQuery's CDN
#
# It also loads the 'smoothness' jQuery-UI theme and all referenced images.
#
# @author Andreas Gohr <andi@splitbrain.org>
# @author Stefan Grönke <stefan@gronke.net>
-# @link https://code.google.com/apis/libraries/devguide.html#jquery
# @link http://code.jquery.com/
+# Adjust version for jQuery-UI here - there's no good latest link
+JQUI_VERSION='1.11.0'
+JQUI_HOST="https://code.jquery.com/ui/$JQUI_VERSION"
+JQUI_GIT="https://raw.githubusercontent.com/jquery/jquery-ui/$JQUI_VERSION/ui"
+
# load jQuery
wget -nv http://code.jquery.com/jquery-latest.min.js -O jquery.min.js
wget -nv http://code.jquery.com/jquery-latest.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
+wget -nv "$JQUI_HOST/jquery-ui.min.js" -O jquery-ui.min.js
+wget -nv "$JQUI_HOST/jquery-ui.js" -O jquery-ui.js
# load the smoothness theme
mkdir -p jquery-ui-theme/images
-wget -nv -qO- https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css | sed "s/font-family:[^;]*;//" > jquery-ui-theme/smoothness.css
+wget -nv -qO- "$JQUI_HOST/themes/smoothness/jquery-ui.css" | sed "s/font-family:[^;]*;//" > 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
+ wget -nv "$JQUI_HOST/themes/smoothness/$img" -O jquery-ui-theme/$img
done
# load the localization data for jquery ui
for LNG in ../../../inc/lang/*
do
CODE=`basename $LNG`
- wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js
+ wget -nv "$JQUI_GIT/i18n/datepicker-$CODE.js" -O $LNG/jquery.ui.datepicker.js
if [ ! -s "$LNG/jquery.ui.datepicker.js" ]; then
rm -f $LNG/jquery.ui.datepicker.js
fi
done
# some custom language codes
-wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js
-wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js
-wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js
-wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js
+wget -nv "$JQUI_GIT/i18n/datepicker-de.js" -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js
+wget -nv "$JQUI_GIT/i18n/datepicker-pt-BR.js" -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js
+wget -nv "$JQUI_GIT/i18n/datepicker-zh-CN.js" -O ../../../inc/lang/zh/jquery.ui.datepicker.js
+wget -nv "$JQUI_GIT/i18n/datepicker-zh-TW.js" -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js
# strip source maps
sed -i '/sourceMappingURL/d' *.min.js