2011-04-12 01:18:19 +00:00
|
|
|
# The files to include when compiling the JS files
|
|
|
|
|
JSFILES = js/jquery.ui.widget.js \
|
2011-04-11 22:57:02 +00:00
|
|
|
js/jquery.mobile.widget.js \
|
|
|
|
|
js/jquery.mobile.media.js \
|
|
|
|
|
js/jquery.mobile.support.js \
|
|
|
|
|
js/jquery.mobile.vmouse.js \
|
|
|
|
|
js/jquery.mobile.event.js \
|
|
|
|
|
js/jquery.mobile.hashchange.js \
|
|
|
|
|
js/jquery.mobile.page.js \
|
|
|
|
|
js/jquery.mobile.core.js \
|
|
|
|
|
js/jquery.mobile.navigation.js \
|
2011-07-28 23:15:48 +00:00
|
|
|
js/jquery.mobile.navigation.pushstate.js \
|
Changes to allow 3rd party transitions. Developers can now register a custom transition by adding their transition handler to the $.mobile.transitionHandlers dictionary. The name of the custom transition is used as the key within the transtionsHandlers dictionary, and should be the same name used within the @data-transtion attribute.
The expected prototype for a transitionHandler is as follows:
function handler(name, reverse, $to, $from)
The name parameter is the name of the transition as specified by @data-transition attribute, reverse is a boolean that is false for a normal transition, and true for a reverse transition. The $to param is a jQuery collection containing the page that is being transitioned "to", and $from is an optional collection that tells us what page we are transitioning "from". Because $from is optional, handler developers should take care and check $from to make sure it is not undefined before attempting to dereference it.
In addition to registering custom transition by name, developers can specify a handler to use in the case where a transition name is specified and does not exist within the $.mobile.transitionHanlders dictionary. Within jQuery Mobile, the default handler for unknown transition types is the $.mobile.css3Transition() handler. This handler always assumes that the transition name is to be used as a CSS class to be placed on the $to and $from elements. To change the default handler, simply set $.mobile.defaultTransitionHandler to you function handler:
$.mobile.defaultTransitionHandler = myTransitionHandler;
The changes to make all this necessary are as follows:
- Created $.mobile.noneTransitionHandler which is the default transitionHandler for the framework that simply adds and removes the page active class on the $from and $to pages with no animations.
- Moved class based transition code into a new plugin jquery.mobile.transition.js file. This plugin, when present, overrides the noneTransitionHandler as the defaultTranstionHandler for the framework so that CSS3 animation transitions are available.
- Removed code related to the setting/removal of the ui-mobile-viewport-perspective class. The css3TransitionHandler plugin takes care of automatically placing a "viewport-<transition name>" class on the viewport (body) element. This allows any other transition to specify properties on the viewport that are necessary to accomplish the transition.
- changed the CSS class ui-mobile-viewport-perspective to viewport-flip to match code changes. This makes it more apparent that setting -webkit-perspective is only used with the flip transition.
- Updated js/index.php, Makefile and build.xml to include the new jquery.mobile.transition.js file.
2011-04-26 21:06:10 +00:00
|
|
|
js/jquery.mobile.transition.js \
|
2011-07-26 17:49:10 +00:00
|
|
|
js/jquery.mobile.degradeInputs.js \
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
js/jquery.mobile.dialog.js \
|
|
|
|
|
js/jquery.mobile.page.sections.js \
|
|
|
|
|
js/jquery.mobile.collapsible.js \
|
2011-11-18 21:24:07 +00:00
|
|
|
js/jquery.mobile.collapsibleSet.js \
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
js/jquery.mobile.fieldContain.js \
|
|
|
|
|
js/jquery.mobile.grid.js \
|
|
|
|
|
js/jquery.mobile.navbar.js \
|
|
|
|
|
js/jquery.mobile.listview.js \
|
|
|
|
|
js/jquery.mobile.listview.filter.js \
|
|
|
|
|
js/jquery.mobile.nojs.js \
|
2011-04-11 22:57:02 +00:00
|
|
|
js/jquery.mobile.forms.checkboxradio.js \
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
js/jquery.mobile.forms.button.js \
|
|
|
|
|
js/jquery.mobile.forms.slider.js \
|
2011-04-11 22:57:02 +00:00
|
|
|
js/jquery.mobile.forms.textinput.js \
|
2011-08-12 17:39:36 +00:00
|
|
|
js/jquery.mobile.forms.select.custom.js \
|
2011-04-11 22:57:02 +00:00
|
|
|
js/jquery.mobile.forms.select.js \
|
|
|
|
|
js/jquery.mobile.buttonMarkup.js \
|
|
|
|
|
js/jquery.mobile.controlGroup.js \
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
js/jquery.mobile.links.js \
|
|
|
|
|
js/jquery.mobile.fixHeaderFooter.js \
|
2011-09-07 22:08:12 +00:00
|
|
|
js/jquery.mobile.fixHeaderFooter.native.js \
|
2011-04-11 22:57:02 +00:00
|
|
|
js/jquery.mobile.init.js
|
|
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# The files to include when compiling the CSS files
|
|
|
|
|
CSSFILES = css/structure/jquery.mobile.core.css \
|
2011-10-17 21:36:50 +00:00
|
|
|
css/structure/jquery.mobile.transitions.css \
|
|
|
|
|
css/structure/jquery.mobile.grids.css \
|
|
|
|
|
css/structure/jquery.mobile.headerfooter.css \
|
|
|
|
|
css/structure/jquery.mobile.navbar.css \
|
|
|
|
|
css/structure/jquery.mobile.button.css \
|
|
|
|
|
css/structure/jquery.mobile.collapsible.css \
|
|
|
|
|
css/structure/jquery.mobile.controlgroup.css \
|
|
|
|
|
css/structure/jquery.mobile.dialog.css \
|
|
|
|
|
css/structure/jquery.mobile.forms.checkboxradio.css \
|
|
|
|
|
css/structure/jquery.mobile.forms.fieldcontain.css \
|
|
|
|
|
css/structure/jquery.mobile.forms.select.css \
|
|
|
|
|
css/structure/jquery.mobile.forms.textinput.css \
|
|
|
|
|
css/structure/jquery.mobile.listview.css \
|
|
|
|
|
css/structure/jquery.mobile.forms.slider.css
|
2011-11-09 09:39:25 +00:00
|
|
|
CSSTHEMEFILES = css/themes/${THEME}/jquery.mobile.theme.css
|
2011-04-11 22:57:02 +00:00
|
|
|
|
2011-10-13 22:28:06 +00:00
|
|
|
|
|
|
|
|
|
2011-04-11 22:57:02 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Helper Variables
|
|
|
|
|
# The command to replace the @VERSION in the files with the actual version
|
|
|
|
|
VER = sed "s/v@VERSION/$$(git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd")/"
|
2011-11-17 23:53:32 +00:00
|
|
|
VER_MIN = "/*! jQuery Mobile v$$(git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd") jquerymobile.com | jquery.org/license */"
|
2011-11-09 09:39:25 +00:00
|
|
|
VER_OFFICIAL = $(shell cat version.txt)
|
2011-11-17 19:47:03 +00:00
|
|
|
deploy: VER = sed "s/v@VERSION/${VER_OFFICIAL}/"
|
2011-11-17 23:53:32 +00:00
|
|
|
deploy: VER_MIN = "/*! jQuery Mobile v${VER_OFFICIAL} jquerymobile.com | jquery.org/license */"
|
2011-11-09 09:39:25 +00:00
|
|
|
|
|
|
|
|
# The output folder for the finished files
|
|
|
|
|
OUTPUT = compiled
|
2011-04-12 01:18:19 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# The name of the files
|
|
|
|
|
NAME = jquery.mobile
|
|
|
|
|
STRUCTURE = jquery.mobile.structure
|
|
|
|
|
deploy: NAME = jquery.mobile-${VER_OFFICIAL}
|
|
|
|
|
deploy: STRUCTURE = jquery.mobile.structure-${VER_OFFICIAL}
|
2011-04-11 22:57:02 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# The CSS theme being used
|
|
|
|
|
THEME = default
|
2010-10-15 19:33:57 +00:00
|
|
|
|
2011-04-11 22:57:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Build Targets
|
2011-04-11 22:57:02 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# When no build target is specified, all gets ran
|
|
|
|
|
all: init css js zip notify
|
2011-04-11 22:57:02 +00:00
|
|
|
|
|
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Build and minify the CSS files
|
|
|
|
|
css: init
|
|
|
|
|
# Build the CSS file with the theme included
|
2011-11-17 19:47:03 +00:00
|
|
|
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.css
|
2011-11-09 09:39:25 +00:00
|
|
|
@@cat ${CSSTHEMEFILES} ${CSSFILES} >> ${OUTPUT}/${NAME}.css
|
|
|
|
|
# ..... and then minify it
|
|
|
|
|
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.css
|
|
|
|
|
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${NAME}.css >> ${OUTPUT}/${NAME}.min.css
|
|
|
|
|
# Build the CSS Structure-only file
|
2011-11-17 19:47:03 +00:00
|
|
|
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${STRUCTURE}.css
|
2011-11-09 09:39:25 +00:00
|
|
|
@@cat ${CSSFILES} >> ${OUTPUT}/${STRUCTURE}.css
|
|
|
|
|
# ..... and then minify it
|
2011-11-15 17:04:16 +00:00
|
|
|
@@echo ${VER_MIN} > ${OUTPUT}/${STRUCTURE}.min.css
|
2011-11-09 09:39:25 +00:00
|
|
|
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${STRUCTURE}.css >> ${OUTPUT}/${STRUCTURE}.min.css
|
|
|
|
|
# ..... and then copy in the images
|
|
|
|
|
@@cp -R css/themes/${THEME}/images ${OUTPUT}/
|
|
|
|
|
# Css portion is complete.
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs: init css js
|
|
|
|
|
# Create the Demos/Docs/Tests/Tools
|
|
|
|
|
@@mkdir -p tmp/${NAME}
|
2011-11-19 03:01:04 +00:00
|
|
|
@@cp -R index.html docs experiments external js/jquery.js tests css/themes/${THEME}/images tmp/${NAME}/
|
2011-11-09 09:39:25 +00:00
|
|
|
@@cp ${OUTPUT}/${NAME}.min.css ${OUTPUT}/${NAME}.min.js tmp/${NAME}/
|
|
|
|
|
# ... Update the JavaScript and CSS paths
|
|
|
|
|
@@find tmp/${NAME} -type f \
|
|
|
|
|
\( -name '*.html' -o -name '*.php' \) \
|
2011-11-10 01:43:37 +00:00
|
|
|
-exec perl -pi -e \
|
|
|
|
|
's|js/"|${NAME}.min.js"|g;s|css/themes/default/|${NAME}.min.css|g;s|js/jquery.js"|jquery.js"|g' {} \;
|
|
|
|
|
# ... Move and zip up the the whole folder
|
2011-11-17 19:47:03 +00:00
|
|
|
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.docs.zip ${NAME}
|
2011-11-10 01:57:50 +00:00
|
|
|
@@mv tmp/${NAME} ${OUTPUT}/demos
|
2011-11-10 01:43:37 +00:00
|
|
|
# Finish by removing the temporary files
|
2011-11-09 09:39:25 +00:00
|
|
|
@@rm -rf tmp
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
2011-04-12 19:00:05 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Create the output directory. This is in a separate step so its not dependant on other targets
|
|
|
|
|
init:
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
# Building jQuery Mobile in the "${OUTPUT}" folder
|
2011-04-13 17:47:21 +00:00
|
|
|
@@rm -rf ${OUTPUT}
|
2011-11-09 09:39:25 +00:00
|
|
|
@@rm -rf tmp
|
|
|
|
|
@@mkdir -p ${OUTPUT}
|
|
|
|
|
# -------------------------------------------------
|
2011-04-11 22:57:02 +00:00
|
|
|
|
2010-10-15 20:49:40 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Build and minify the JS files
|
|
|
|
|
js: init
|
|
|
|
|
# Build the JavaScript file
|
2011-11-17 19:47:03 +00:00
|
|
|
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.js
|
2011-11-09 09:39:25 +00:00
|
|
|
@@cat ${JSFILES} >> ${OUTPUT}/${NAME}.js
|
|
|
|
|
# ..... and then minify it
|
|
|
|
|
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.js
|
2011-11-26 18:39:54 +00:00
|
|
|
@@java -XX:ReservedCodeCacheSize=64m \
|
|
|
|
|
-jar build/google-compiler-20111003.jar \
|
|
|
|
|
--js ${OUTPUT}/${NAME}.js \
|
|
|
|
|
--js_output_file ${OUTPUT}/${NAME}.tmp.js
|
|
|
|
|
@@cat ${OUTPUT}/${NAME}.tmp.js >> ${OUTPUT}/${NAME}.min.js
|
|
|
|
|
@@rm ${OUTPUT}/${NAME}.tmp.js
|
2011-11-09 09:39:25 +00:00
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Output a message saying the process is complete
|
|
|
|
|
notify: init
|
|
|
|
|
@@echo "The files have been built and are in: " $$(pwd)/${OUTPUT}
|
|
|
|
|
# -------------------------------------------------
|
2010-10-15 22:00:49 +00:00
|
|
|
|
|
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# Zip up the jQm files without docs
|
2011-11-19 03:01:04 +00:00
|
|
|
zip: init css js
|
2011-11-09 09:39:25 +00:00
|
|
|
# Packaging up the files into a zip archive
|
2011-11-15 17:04:16 +00:00
|
|
|
@@mkdir tmp
|
2011-11-19 03:01:04 +00:00
|
|
|
@@cp -R ${OUTPUT} tmp/${NAME}
|
|
|
|
|
# ... And remove the Zipped docs so they aren't included twice (for deploy scripts)
|
|
|
|
|
@@rm -rf tmp/${NAME}/${NAME}.docs.zip
|
2011-11-17 19:47:03 +00:00
|
|
|
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.zip ${NAME}
|
2011-11-15 17:04:16 +00:00
|
|
|
@@rm -rf tmp
|
2011-11-09 09:39:25 +00:00
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
2010-10-15 22:00:49 +00:00
|
|
|
|
|
|
|
|
|
2011-05-13 23:01:31 +00:00
|
|
|
|
2011-11-09 09:39:25 +00:00
|
|
|
# -------------------------------------------------
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# For jQuery Team Use Only
|
|
|
|
|
#
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# Push the latest git version to the CDN. This is done on a post commit hook
|
2011-11-19 03:01:04 +00:00
|
|
|
latest: init css js zip
|
2011-11-09 09:39:25 +00:00
|
|
|
# Time to put these on the CDN
|
2011-11-17 01:35:25 +00:00
|
|
|
@@scp -qr ${OUTPUT}/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/latest/
|
2011-11-09 09:39:25 +00:00
|
|
|
# Do some cleanup to wrap it up
|
|
|
|
|
@@rm -rf ${OUTPUT}
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# Build the nightly backups. This is done on a server cronjob
|
2011-11-19 03:01:04 +00:00
|
|
|
nightlies: init css js docs zip
|
2011-11-09 09:39:25 +00:00
|
|
|
# Time to put these on the CDN
|
|
|
|
|
@@mkdir -p tmp/nightlies
|
|
|
|
|
@@mv ${OUTPUT} tmp/nightlies/$$(date "+%Y%m%d")
|
2011-11-17 01:35:25 +00:00
|
|
|
@@scp -qr tmp/nightlies/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/nightlies/
|
2011-11-09 09:39:25 +00:00
|
|
|
# Do some cleanup to wrap it up
|
|
|
|
|
@@rm -rf tmp
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Deploy a finished release. This is manually done.
|
2011-11-19 03:01:04 +00:00
|
|
|
deploy: init css js docs zip
|
2011-11-09 09:39:25 +00:00
|
|
|
# Deploying all the files to the CDN
|
|
|
|
|
@@mkdir tmp
|
2011-11-19 03:01:04 +00:00
|
|
|
@@cp -R ${OUTPUT} tmp/${VER_OFFICIAL}
|
2011-11-17 01:35:25 +00:00
|
|
|
@@scp -qr tmp/* jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/
|
2011-11-09 09:39:25 +00:00
|
|
|
@@rm -rf tmp/${VER_OFFICIAL}
|
|
|
|
|
@@mv ${OUTPUT}/demos tmp/${VER_OFFICIAL}
|
2011-11-17 01:35:25 +00:00
|
|
|
# Create the Demos/Docs/Tests/Tools for jQueryMobile.com
|
2011-11-17 01:04:22 +00:00
|
|
|
# ... By first replacing the paths
|
|
|
|
|
@@find tmp/${VER_OFFICIAL} -type f \
|
|
|
|
|
\( -name '*.html' -o -name '*.php' \) \
|
|
|
|
|
-exec perl -pi -e \
|
2011-11-17 01:35:25 +00:00
|
|
|
's|src="(.*)${NAME}.min.js"|src="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.js"|g;s|href="(.*)${NAME}.min.css"|href="//code.jquery.com/mobile/${VER_OFFICIAL}/${NAME}.min.css"|g;s|src="(.*)jquery.js"|src="//code.jquery.com/jquery-1.6.4.js"|g' {} \;
|
2011-11-17 01:04:22 +00:00
|
|
|
# ... So they can be copied to jquerymobile.com
|
2011-11-17 01:35:25 +00:00
|
|
|
@@scp -qr tmp/* jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/
|
2011-11-09 09:39:25 +00:00
|
|
|
# Do some cleanup to wrap it up
|
|
|
|
|
@@rm -rf tmp
|
|
|
|
|
@@rm -rf ${OUTPUT}
|
|
|
|
|
# -------------------------------------------------
|
|
|
|
|
|
2011-11-15 17:04:16 +00:00
|
|
|
|