Commit graph

2182 commits

Author SHA1 Message Date
scottjehl
e830f6221b added fade out in transition handler file 2012-01-13 17:27:01 +07:00
scottjehl
eda70bd3b3 added fade out in transition handler 2012-01-13 17:27:01 +07:00
scottjehl
6a28fd4b13 removed commented out line 2012-01-13 17:27:01 +07:00
scottjehl
7a8821fb71 Much of the scripting in nav.js's transitionPages function was tied to the animation sequence for our css3transitionhandler. For example, the order was, scroll to top, run transitions, then scroll to the remembered location of the new page (there's more involved, but that's the gist of it). If we want to expand beyond this sequence, much of that scripting needs to move to the css3transitionhandler itself, and also to our "none" transition handler, which comes with nav model.
This commit moves all that logic into the transition handlers, and should provide a better starting point for adding different transition sequences, such as fade-out, scroll, fade-in.

In the process of making this change, the reFocus function was made public as $.mobile.focusPage.
2012-01-13 17:27:01 +07:00
Ghislain Seguin
22ec6cf3ed Fixed wrong line break 2012-01-13 17:26:21 +07:00
Mat Marquis
42536ecafe Added download builder metadata. 2012-01-13 17:26:21 +07:00
jblas@adobe.com
d4c7123c85 Fix for issue #2933 - get_orientation() and hence getScreenHeight() doesn't work on some devices
It seems that some device/browser vendors use window.orientation values 0 and 180 to denote the "default" orientation. For iOS devices, and most other smart-phones tested, the default orientation is always "portrait", but in some Android and RIM based tablets, the default orientation is "landscape".

- Modified the orientationchange plugin so that it injects a landscape orientation media query into the document to figure out what the initial orientation is, it then makes adjustments to a portrait_map if necessary, so that we can properly decode the window.orientation value whenever get_orientation() is called.
2012-01-13 17:25:55 +07:00
John Bender
0c006605d1 obviate the need for stub definition of define when using vanilla /js require 2012-01-13 17:25:54 +07:00
John Bender
b3048e4be5 switch to explicit false check to avoid undefined issues 2012-01-13 17:25:54 +07:00
John Bender
799c0b6b5b ensure defaultTransitionHandler is defined after the navigation has been loaded 2012-01-13 17:25:53 +07:00
John Bender
fe32fd5b17 ensure defaultTransitionHandler is defined after the navigation has been loaded 2012-01-13 17:25:53 +07:00
Mat Marquis
3d62715b3c Fixing navigation bug caused by dialog markup changes. 2012-01-13 17:25:52 +07:00
Mat Marquis
20b0434207 Moved .ui-dialog to element wrapping dialog header/content/footer, switched overlay non-theming class to .ui-dialog-page. 2012-01-13 17:25:52 +07:00
Mat Marquis
eb9968c2b6 Partial dialog refactor, in progress. 2012-01-13 17:25:52 +07:00
Mat Marquis
6e5d454880 Ensured the hover delay only applies to touch devices, logic that was mysteriously absent from my previous commit. 2012-01-13 17:25:51 +07:00
Mat Marquis
00b328b6cb Added slight delay before application of hover/down classes on touch devices, to prevent unintentional hover-ish behavior when the user intent is to scroll. 2012-01-13 17:25:50 +07:00
zachleat
ebcf7a62c3 This might be a little overzealous, but I think the outline around the entire flip switch looks better than the clipped handle outline. 2012-01-13 17:25:50 +07:00
zachleat
e19ee8d953 Fix for browsers with JavaScript but without box-shadow enabled. outline: 0; outline-width: 2px; doesn't work, requires an outline-style to be set. 2012-01-13 17:25:50 +07:00
zachleat
3ca5a8a85e Per @toddparker's comment, added boxshadow to link buttons. Also changed focus class on sliders to add to the handle, while excluding the toggle switch. 2012-01-13 17:25:50 +07:00
zachleat
0c722fb8f7 Nerf, you guys use tabs. 2012-01-13 17:25:50 +07:00
zachleat
5cc81797ba First stab at more consistent focus classes on form elements, using .ui-focus. Links will still contain outline property. 2012-01-13 17:25:50 +07:00
Jake Boone
5f4c0a4914 Remove ui-btn-down class on scrollstart 2012-01-13 17:25:50 +07:00
Gabriel Schulhof
ee7d94068b [custom select] Use $(window).width() and not window.innerWidth - same for height 2012-01-13 17:25:47 +07:00
Ghislain Seguin
3cf6c65b88 Changed $.extend to be non destructive 2012-01-13 17:25:47 +07:00
Ghislain Seguin
02baaf67f7 Expose jquery.mobile as an AMD module if running in an AMD env 2012-01-13 17:25:46 +07:00
Ghislain Seguin
09c709ef0f Added dep on buttonMarkup 2012-01-13 17:25:46 +07:00
Ghislain Seguin
c7b81d3e59 Named the module for testability 2012-01-13 17:24:55 +07:00
Ghislain Seguin
adda6b7638 Added dep on page and page.sections (for nested lists) 2012-01-13 17:24:54 +07:00
Ghislain Seguin
e27ddb8c4a Added dep on textinput 2012-01-13 17:24:54 +07:00
Ghislain Seguin
fbab839995 Added dep on grid 2012-01-13 17:24:54 +07:00
John Bender
797378b1af fix bug to allow pagebeforecreate bindings to prevent enhancement 2012-01-13 17:24:51 +07:00
John Bender
66a818223a added page and page section dependencies to custom select 2012-01-13 17:24:51 +07:00
John Bender
526ee3453b added dialog to custom select deps 2012-01-13 17:24:51 +07:00
John Bender
ac6eb10913 alpha order deps 2012-01-13 17:24:51 +07:00
John Bender
7dc692dc3a add transition dep to navigation 2012-01-13 17:24:51 +07:00
John Bender
7a4c507e96 add page and listview dep to custom select 2012-01-13 17:24:51 +07:00
Ghislain Seguin
517c9588ca Added dep on "jquery.mobile.buttonMarkup" wherever needed 2012-01-13 17:24:50 +07:00
Ghislain Seguin
e419648b44 Added temporary dependency on mobile.widget 2012-01-13 17:24:50 +07:00
Gabriele Rabbiosi
b0fb85a38d Substituted wrong semicolon with comma inside a list of variable
declaration
2012-01-13 17:24:50 +07:00
John Bender
18f4d3d5e0 fix improperly camel cased module references 2012-01-13 17:24:50 +07:00
Ghislain Seguin
fdc51cfdfb Fixed casing 2012-01-13 17:24:50 +07:00
Ghislain Seguin
c6e49f7b07 Discovered r.js' pragmas use them instead of the hacky solution provided by amd-stripper.js 2012-01-13 17:24:49 +07:00
Ghislain Seguin
f3e3121166 Specified more dependencies 2012-01-13 17:23:19 +07:00
Ghislain Seguin
6f13267af7 Moved r.js and require.js to external 2012-01-13 17:21:45 +07:00
Ghislain Seguin
5299b7ef44 Use original r.js, externalized stripping of define/require to amd-stripper.js 2012-01-13 17:21:45 +07:00
Ghislain Seguin
43de7d9c32 Added amd-stripper.js 2012-01-13 17:21:45 +07:00
Ghislain Seguin
6efb8eb9b2 Updated AMD stripping regexp 2012-01-13 17:21:44 +07:00
Ghislain Seguin
c6b6dff530 Not much, really 2012-01-13 17:21:27 +07:00
Ghislain Seguin
9a4ec07b62 Renamed r.js to r-jqm.js 2012-01-13 17:21:26 +07:00
Ghislain Seguin
c9cdf7f984 Fixed deps 2012-01-13 17:21:26 +07:00
Ghislain Seguin
5d479d9252 Fixed deps 2012-01-13 17:21:26 +07:00
Ghislain Seguin
fe537db42d use define instead of require
use order plugin for init (not ideal)
2012-01-13 17:21:26 +07:00
Ghislain Seguin
dbe10647d2 Actually need order! plugin for controlgroup at least 2012-01-13 17:21:26 +07:00
Ghislain Seguin
e058f75923 Up'd to 1.0.2 2012-01-13 17:21:26 +07:00
Ghislain Seguin
46ea93cea1 Added dep on jquery.mobile.core 2012-01-13 17:20:44 +07:00
Ghislain Seguin
eed95e982d removeClass( "ui-link" ) on first anchor in the li 2012-01-13 17:20:44 +07:00
Ghislain Seguin
88d5f0f89a Removed dep on jqm.core 2012-01-13 17:20:44 +07:00
Ghislain Seguin
f8cf21438a Removed ref to order
Added dir exclusion regex for build
2012-01-13 17:20:44 +07:00
Ghislain Seguin
38585bc377 Not using order after all 2012-01-13 17:20:44 +07:00
Ghislain Seguin
4a1f43dbba Moved $.support.mediaquery to jquery.mobile.media
Set dependencies
2012-01-13 17:20:43 +07:00
Ghislain Seguin
dbedf643d3 Specified dependencies 2012-01-13 17:20:43 +07:00
Ghislain Seguin
a39240924d Added collapsibleSet 2012-01-13 17:20:43 +07:00
Ghislain Seguin
b6e6febb76 Added dep on vmouse 2012-01-13 17:20:43 +07:00
Ghislain Seguin
65cdb13bc7 Added dep on jquery.mobile.buttonMarkup 2012-01-13 17:20:25 +07:00
Ghislain Seguin
17e298d5c1 Added r.js 2012-01-13 17:20:25 +07:00
Ghislain Seguin
323a52c195 Whitespace change 2012-01-13 17:20:25 +07:00
Ghislain Seguin
135642954f Modified shimming condition 2012-01-13 17:20:25 +07:00
Ghislain Seguin
7fd83103f2 Added almond.js 2012-01-13 17:20:25 +07:00
Ghislain Seguin
3f56ebf6ca Added RequireJS 1.0 2012-01-13 17:20:25 +07:00
Ghislain Seguin
a76b08de7d Removed 2012-01-13 17:20:25 +07:00
Ghislain Seguin
eb78d79937 Added module for docs 2012-01-13 17:20:24 +07:00
Ghislain Seguin
a4fc1f6f9d Added jQuery AMD shim to support jQuery < 1.7 2012-01-13 17:20:24 +07:00
Ghislain Seguin
d280d6ac9d Fixed path to almond.js
Excluded order plugin
2012-01-13 17:20:24 +07:00
Ghislain Seguin
a95e7957e2 added order plugin to the baseUrl directory 2012-01-13 17:20:24 +07:00
Ghislain Seguin
07b85a1e34 AMDized 2012-01-13 17:20:24 +07:00
Ghislain Seguin
1b45da3955 AMD build file 2012-01-13 17:20:23 +07:00
Ghislain Seguin
c771ef1f6b Main AMD module 2012-01-13 17:20:23 +07:00
Ghislain Seguin
db632f9152 Added requirejs v1.0 2012-01-13 17:20:23 +07:00
Ghislain Seguin
1ca9fb6b01 AMDized 2012-01-13 17:20:23 +07:00
Ghislain Seguin
3f1543a451 AMDized 2012-01-13 17:20:23 +07:00
scottjehl
262b7dc62b Merge remote branch 'origin/master' 2012-01-13 14:48:21 +07:00
scottjehl
845dc1ef73 use existing elem instead of creating a new one. 2012-01-13 14:46:35 +07:00
Ghislain Seguin
bc6cfbfb53 Added jQuery as a param to the define shim 2012-01-12 23:19:36 -08:00
Ghislain Seguin
323601ad25 Back by popular demand (also needed by event tests) 2012-01-12 22:35:27 -08:00
Ghislain Seguin
1630a18dd6 Added dependency on jquery.mobile.transitions 2012-01-12 21:43:41 -08:00
Ghislain Seguin
948d39b898 Added dependency on jquery 2012-01-12 21:22:00 -08:00
Ghislain Seguin
5b8f2be9d2 Added wrapper to export as an AMD modules
removed jquery.mobile.exports
2012-01-12 17:45:47 -08:00
Ghislain Seguin
caca24a36a Removed unused app.build.js 2012-01-12 17:44:33 -08:00
Mat Marquis
c35e6f2fde Comment typo, made a TODO about globalizing the testing method added in the previous commit. 2012-01-12 18:56:09 -05:00
Mat Marquis
abfec80413 Fixes a false positive for 3D transform support on Android 2.3 (possibly others). 2012-01-12 18:56:09 -05:00
Mat Marquis
8da75eb6b5 Fixes #2553 — Addresses issue where underlying checkboxes/radio buttons were not being updated when enhanced buttons were clicked. 2012-01-12 17:28:08 -05:00
Ghislain Seguin
9e935c31f6 Merge branch 'out-in-transition'
Conflicts:
	css/structure/index.php
	docs/_assets/js/jqm-docs.js
	index.html
2012-01-12 09:56:48 -08:00
Ghislain Seguin
efb9b807b7 AMDized transition code 2012-01-12 09:36:46 -08:00
scottjehl
682ef80cf9 added missing files 2012-01-12 14:46:49 +07:00
scottjehl
fa4645c236 no longer need this class addition 2012-01-12 12:54:16 +07:00
scottjehl
6d4d0e14e6 code style 2012-01-12 12:50:47 +07:00
scottjehl
ca98419cb0 class name was body instead of overlay. Fixed 2012-01-12 11:53:30 +07:00
toddparker
9726f21e09 SetScrollBack to 10 (from 250), CSS tweaks to table 2012-01-11 22:07:04 -05:00
toddparker
0fb9024473 Turned maxTransitionWidth to false by default
Useful for testing, we may set this back to a value once we've seen
more feedback. Improved the comment a bit.
2012-01-11 20:53:41 -05:00
Mat Marquis
6db136ff12 Merge branch 'out-in-transition' of github.com:jquery/jquery-mobile into out-in-transition 2012-01-11 18:04:17 -05:00
Mat Marquis
f7d59da646 Updated 3d transform test to accomodate FF10. 2012-01-11 16:28:08 -05:00
jblas@adobe.com
86f74cbe39 Fix for issue #3416 - getTopOffset() should subtract scrollTop not add it.
- Modified private utility function getTopOffset() so that it subracts scrollTop from top instead of adding it.
2012-01-11 11:44:58 -08:00
scottjehl
347014530e if there's an overlay theme, we're going to remove it from the page container. First though, check that the incoming page isn't a dialog with the same overlay theme. If so, don't remove the class, as it'll remove it for the next one too 2012-01-11 23:29:50 +07:00
scottjehl
5b6401327f By caching the href value to data and switching the href to a #, we can avoid address bar showing in iOS on every click. The click handler resets the href during its initial steps if this data is present. Note that the address bar will still likely drop down when you click the browser's back button. The only time the back button will not drop the address bar appears to be when the back button does not trigger a pushstate operation - so pushstate would either have to be disabled, or the page would have to be local (multipage), or the page would need to be a dialog (since then going back would only be a hashchange).
Still, progress.
2012-01-11 10:50:22 +07:00
scottjehl
e4d7ff92e8 special case for dialogs - the theme class will apply to the page container when a dialog is shown, and that class will be removed when the dialog is hidden. This allows the transition to appear to affect only the inset window portion of the dialog page. 2012-01-11 10:01:47 +07:00
Mat Marquis
1f5449e552 Added page turning transition. 2012-01-10 14:10:45 -05:00
John Bender
0b07290873 fix timing issue where the pushstate plugin expected popstate generated hashchanges to happen before a given timeout 2012-01-10 10:47:56 -08:00
scottjehl
67aec832cb removed old commented out code 2012-01-10 14:07:07 +07:00
scottjehl
6e2f1cd64f moved the hide loader call back to nav again 2012-01-10 14:06:24 +07:00
scottjehl
7e0de23e61 added reference to flow transition fallback 2012-01-10 13:00:55 +07:00
scottjehl
4f570f3095 one too many transition js refs 2012-01-10 12:59:24 +07:00
scottjehl
c09c767bd5 added fallback transition for flow 2012-01-10 12:51:27 +07:00
scottjehl
8d0c2402ca better check for supporting fallback 2012-01-10 12:51:27 +07:00
scottjehl
d1edb4f98c better comment 2012-01-10 12:50:44 +07:00
scottjehl
0dd88f4f88 implemented fallback transition definitions for non-3D-supporting browsers, for all transitions except "fade". By default, these are all set to fall back to "fade", and they'll fall back to "none" if 3D is unsupported and no fallback is defined. They can be overridden at mobileinit, like any other jQM default. 2012-01-10 12:50:44 +07:00
Mat Marquis
0b80c12778 Updated page transition scripting/support test to allow for Firefox. 2012-01-10 12:50:22 +07:00
scottjehl
69558f2cbd Added a new core option called maxTransitionWidth, which defaults to 1000. Accepts any number or false value. If it's not false, the handler will use a "none" transition when the window width is wider than the specified value. This is useful because transitions get very wonky on wider screens. 2012-01-10 12:50:22 +07:00
scottjehl
70ef725952 removed "none" transition handler from Nav.js. Updated the new out-in transition handler so that it supports "none" transitions in addition to our new default css3 animation sequence. The new transition handler is set as the default, and available publicly as $.mobile.defaultTransitionHandler and $.mobile.transitionHandlers["default"]. 2012-01-10 12:50:21 +07:00
scottjehl
c37ad79ed0 updated make and concat files for new transition handler 2012-01-10 12:50:05 +07:00
scottjehl
bc2b4faf0b renamed the new transition handler transition.js 2012-01-10 12:49:52 +07:00
scottjehl
fd236692ea lowercased 2012-01-10 12:48:58 +07:00
scottjehl
f72eb291f6 woops. add it whether it's supported or not :) 2012-01-10 12:48:57 +07:00
scottjehl
965f7e2681 add class for 3d transform support 2012-01-10 12:48:57 +07:00
scottjehl
0cafec13bd fixed a typo in the query 2012-01-10 12:48:57 +07:00
scottjehl
f80d855847 Added a feature test for css 3d transforms, which will allow us to conditionally apply the flip transition (AKA cartwheel, where unsupported). 2012-01-10 12:48:57 +07:00
scottjehl
72fe72f772 added new filename to make and combiner files 2012-01-10 12:48:57 +07:00
scottjehl
86dfe99a1b changed filename 2012-01-10 12:48:40 +07:00
scottjehl
42bcd90a47 changed plugin name to outInTransitionHandler, as the sequence has nothing to do with "fade" specifically. 2012-01-10 12:48:40 +07:00
scottjehl
d01da49798 brought back the height settings, and fixed a typo between addClass and removeClass 2012-01-10 12:48:40 +07:00
scottjehl
cb151b5d9a don't use pre transitioning class, or viewport class for this transition handler. Instead, activate page early, then scroll to desired spot, and transition in. In order to make this work, I had to add an argument to the end of the promise, letting navigation know that the page is already focused, so don't do it over again. This should make for a smooth transition from point-a to point-b, without a visible scroll jump. Needs testing! 2012-01-10 12:48:39 +07:00
scottjehl
f46135b6fd add back viewport transitioning class 2012-01-10 12:48:39 +07:00
scottjehl
cb49d27006 don't scroll at the end. scroll halfway through instead 2012-01-10 12:48:39 +07:00
scottjehl
a73e04bf19 an attempt at simplification. not there yet... 2012-01-10 12:48:22 +07:00
scottjehl
594eb7b37c added fade out in transition handler 2012-01-10 12:44:42 +07:00
scottjehl
9afa2eaa5e changed filename 2012-01-10 12:43:11 +07:00
scottjehl
9aea79e744 changed plugin name to outInTransitionHandler, as the sequence has nothing to do with "fade" specifically. 2012-01-10 12:43:11 +07:00
scottjehl
10a65c9d78 brought back the height settings, and fixed a typo between addClass and removeClass 2012-01-10 12:43:11 +07:00
scottjehl
445d11c704 don't use pre transitioning class, or viewport class for this transition handler. Instead, activate page early, then scroll to desired spot, and transition in. In order to make this work, I had to add an argument to the end of the promise, letting navigation know that the page is already focused, so don't do it over again. This should make for a smooth transition from point-a to point-b, without a visible scroll jump. Needs testing! 2012-01-10 12:43:11 +07:00
scottjehl
955a37f1e8 add back viewport transitioning class 2012-01-10 12:43:10 +07:00
scottjehl
c72595c462 don't scroll at the end. scroll halfway through instead 2012-01-10 12:43:10 +07:00
scottjehl
0a267cea64 position loader fixed by default, then check if it's positioned correctly and if not, switch to an absolute positioned scheme, with updates on scroll (or scrollstop in iOS 4). 2012-01-10 12:43:10 +07:00
Todd Parker
41d63056c6 All new loader hotness
Created a new loader that has a circle baked into the animated gif so
there's less of a chance of artifacts in bad browsers. The edge is
chunky because it's a gif but then added 1px of padding to the loader
parent and that the border-radius can smooth this out in iOS. Actually
looks sharp in Android too because of interaction effects between these
rounded corners. Loader spin is faster and more compressed (16 colors).
Removed the body-a class on the spinner since we're just setting this to
flat black = one less gradient to render.
2012-01-10 12:43:10 +07:00
scottjehl
47bf7a9d38 an attempt at simplification. not there yet... 2012-01-10 12:43:10 +07:00
scottjehl
0a3be2ecf3 default transition type goes to fade 2012-01-10 12:43:10 +07:00
Todd Parker
dac79b5cfa Loader design tweaks
Removed the spin class from the loader container, tweaked opacity and
added slight glow to bottom of loader, increased padding. Downloaded a
fresh loader image.
2012-01-10 12:43:09 +07:00
scottjehl
b820de1afc removed code to set css3transitionhandler as the default 2012-01-10 12:43:09 +07:00
scottjehl
f5dd6fb8ea added fade out in transition handler file 2012-01-10 12:43:09 +07:00
scottjehl
597e6bd07a added fade out in transition handler 2012-01-10 12:40:23 +07:00
scottjehl
195d4dc47e removed commented out line 2012-01-10 12:40:23 +07:00
scottjehl
821df23a7d Much of the scripting in nav.js's transitionPages function was tied to the animation sequence for our css3transitionhandler. For example, the order was, scroll to top, run transitions, then scroll to the remembered location of the new page (there's more involved, but that's the gist of it). If we want to expand beyond this sequence, much of that scripting needs to move to the css3transitionhandler itself, and also to our "none" transition handler, which comes with nav model.
This commit moves all that logic into the transition handlers, and should provide a better starting point for adding different transition sequences, such as fade-out, scroll, fade-in.

In the process of making this change, the reFocus function was made public as $.mobile.focusPage.
2012-01-10 12:40:23 +07:00