From 138bfd16df9cb583107097f32be288b8705cd035 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Jan 2014 15:36:34 +0100 Subject: localize jQuery UI date picker FS#2912 --- lib/scripts/jquery/update.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'lib/scripts/jquery/update.sh') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index 749b0f4e2..7bfe1eaf4 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -7,15 +7,15 @@ # @author Andreas Gohr # @author Stefan Grönke # @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 -qO- https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css | sed "s/font-family:[^;]*;//" > jquery-ui-theme/smoothness.css @@ -23,4 +23,18 @@ images=`gawk 'match($0, /url\("?(images\/[^\)"]+)"?\)/, m) { print m[1] }' jquer for img in $images do wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/$img -O jquery-ui-theme/$img -done \ No newline at end of file +done + +# load the localization data for jquery ui +for LNG in ../../../inc/lang/* +do + CODE=`basename $LNG` + wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js +done + +# some custom language codes +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js +wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js + -- cgit v1.2.3 From 4d4058eec6b089a303975dfd71f16fd42f55f11b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Jan 2014 15:43:34 +0100 Subject: do not keep zero size files --- 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 7bfe1eaf4..b0de441f9 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -30,6 +30,9 @@ for LNG in ../../../inc/lang/* do CODE=`basename $LNG` wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.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 -- cgit v1.2.3 From fc8dbb92180ea98835a9e9cc701afe512b8fd47b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 5 Mar 2014 16:43:08 +0100 Subject: updates jquery and jquery ui we now pull jQuery directly from jquery's CDN instead of google because google serves slightly outdated versions under the /1/ branch The updated smoothness theme currently breaks compression. Haven't figured out why, yet. --- lib/scripts/jquery/update.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/scripts/jquery/update.sh') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index b0de441f9..f299c7ecc 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -1,16 +1,17 @@ #!/bin/sh # -# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's CDN +# This script loads the latest jQuery and jQuery-UI 1.* versions from Google's and jQuery's CDN # # It also loads the 'smoothness' jQuery-UI theme and all referenced images. # # @author Andreas Gohr # @author Stefan Grönke # @link https://code.google.com/apis/libraries/devguide.html#jquery +# @link http://code.jquery.com/ # 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 +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 @@ -29,15 +30,15 @@ done for LNG in ../../../inc/lang/* do CODE=`basename $LNG` - wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-$CODE.js -O $LNG/jquery.ui.datepicker.js + wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.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://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-de.js -O ../../../inc/lang/de-informal/jquery.ui.datepicker.js -wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-pt-BR.js -O ../../../inc/lang/pt-br/jquery.ui.datepicker.js -wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-CN.js -O ../../../inc/lang/zh/jquery.ui.datepicker.js -wget -nv https://raw2.github.com/jquery/jquery-ui/master/ui/i18n/jquery.ui.datepicker-zh-TW.js -O ../../../inc/lang/zh-tw/jquery.ui.datepicker.js +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 -- cgit v1.2.3 From c173650d14a68c276101ba188fa4bf25175ccc7d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 5 Mar 2014 19:51:33 +0100 Subject: strip sourcemaps after update --- lib/scripts/jquery/update.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/scripts/jquery/update.sh') diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index f299c7ecc..719a0829d 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -42,3 +42,5 @@ wget -nv https://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepic 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 +# strip source maps +sed -i '/sourceMappingURL/d' *.min.js -- cgit v1.2.3