Commit graph

97 commits

Author SHA1 Message Date
scottjehl
8ba4c27300 Ya'll can scale your pages now. Fixes #1645. Note: we originally disabled user zooming to work around a bug in iOS that automatically zooms the page beyond the constraints of the viewport on orientation change. We are not working around this bug at all now, but you are free to include any meta tag you'd like, or better yet, consider this polyfill: http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ 2011-05-17 17:28:19 -04:00
Kin Blas
19c06952fd 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 14:06:10 -07:00
John Bender
dfab3d7920 increased two test timeouts to give slower ci test browser time work, also included a small whitespace fix to nav 2011-04-21 23:17:08 -07:00
John Bender
49b1b780ed test alterations for absolute navigation 2011-04-18 21:46:53 -07:00
John Bender
b83d81962e tests for dialog query param support 2011-04-14 21:49:50 -07:00
John Bender
a267a3077c added tests to verify that dialogs referencing themselves with query params don't do anything 2011-04-14 21:49:50 -07:00
scottjehl
d97a964884 been meaning to do this for a while. 2011-04-14 16:04:47 -04:00
Kin Blas
8ca008ee23 It doesn't get any true-er with an extra 'u'! 2011-04-13 18:09:41 -07:00
John Bender
ac736c6053 moved previous strip query tests to tests for cleanHash 2011-04-12 01:16:20 -07:00
John Bender
aee4c631da removed stripQuery helper to reduce confusion and complexity as striping the query param from a url is much more complex than a hash as it was originally intended for 2011-04-12 01:14:05 -07:00
John Bender
cdc0f139ce tests for nested pages/query params 2011-04-12 01:05:36 -07:00
John Bender
8d3dc2cbc2 query param href/actions require absolute path prefixes when no relative path information is contained in the hash 2011-04-12 00:22:42 -07:00
John Bender
193762da19 tests for handling query params in makeAbsolute path helper, moved path helper tests to helper test file 2011-04-11 23:42:01 -07:00
John Bender
b1da5f0d06 added tests to make sure links that reference the pages they are defined within don't transition Fixes #1360 2011-04-04 23:47:16 -07:00
John Bender
3a85ef61ac removed global pre test setup that used QUnit.start :(, and fixed spurious test failures from changePage being fired by the library after it had been redefined in the tests 2011-04-01 02:11:15 -07:00
John Bender
f63b1bf911 moved page title tests to sequence to stabalize their behavior 2011-03-31 22:47:40 -07:00
John Bender
89775d233a whitespace in navigation core tests and fixtures page 2011-03-31 22:18:54 -07:00
scottjehl
776e23ee95 simplified test, but in general, the nav test suite feels brittle. Maybe because of our usage of async tests. Anyway, I was able to get all tests to pass once. 2011-03-31 13:38:49 -04:00
scottjehl
b18756eceb fixed the last breaking pages unit test 2011-03-31 13:19:51 -04:00
scottjehl
d8aac11a4f merging unit test addtions for page titles 2011-03-31 12:56:30 -04:00
John Bender
6d37ad6bbb added addtional test to cover issue 1305 2011-03-30 01:08:15 -07:00
John Bender
215aded824 fixed path detection for when linking from embedded pages to file paths Fixes #1305 2011-03-30 01:08:15 -07:00
John Bender
32f1264491 corrected poor async start order 2011-03-30 01:08:15 -07:00
John Bender
7b4842eabc test for dialogs within dialogs 2011-03-28 00:41:33 -07:00
John Bender
73a39ab7ec fixed poorly chosen selector in test and moved generated anchor markup into hidden page 2011-03-27 02:07:31 -04:00
John Bender
7df9e245f4 test namespace additions and type fix for core 2011-03-21 23:36:32 -07:00
John Bender
63e8f6bfcb resolved merge conflicts and fixed 2 tests 2011-03-15 23:57:17 -07:00
scottjehl
d08ff23765 fixed up path.clean test so it passes 2011-03-14 00:20:26 -04:00
scottjehl
0d9627d54e Added viewport meta elements to the markup of every template and removed the metaViewportContent option from code and docs. IE does not support generated viewport tags. 2011-03-14 00:20:23 -04:00
John Bender
129b586666 tests for url root in params / path.clean Fixes #1039 2011-03-12 14:37:45 -08:00
John Bender
ccea5be445 removed console log 2011-03-12 00:29:26 -08:00
John Bender
94ade0f86e fixed failing data-url regex, bizarri difference in behaviour with Regex objects and literals 2011-03-12 00:10:40 -08:00
John Bender
0aaab77e2b test for forward button dialog skipping 2011-03-10 00:13:53 -08:00
scottjehl
0bf5ce8a37 set unit test pages namespace to "nstest-" 2011-03-09 23:16:48 -05:00
scottjehl
50655de35c test description change 2011-03-09 22:41:03 -05:00
scottjehl
3cae8f8bf0 caught a few more 2011-03-09 21:03:40 -05:00
scottjehl
77ac0f009a a few more non-namespaced attrs to bring over 2011-03-09 21:03:40 -05:00
scottjehl
9e91fa6752 updated docs with jq namespace, found some more stragglers 2011-03-09 21:03:40 -05:00
John Bender
5fd1e70218 test for data-rel back and dialog fix 2011-03-04 23:34:54 -08:00
Martin Kou
df21c701b5 Fixed animationComplete return value bug. 2011-02-27 22:07:34 -08:00
John Bender
86eceb03fc added two helpers and tests for proper url stack history traversal 2011-02-25 23:24:03 -08:00
John Bender
421dc352c0 corrected js test includes and simplified to prevent further breakages 2011-02-20 18:07:17 -08:00
John Bender
709d12e4d6 resolved conflict for default dialog transition to pop 2011-02-16 22:52:14 -08:00
John Bender
8ea018147c removed old test pages for navigation and one unneeded test 2011-02-15 23:01:22 -08:00
John Bender
bec975ad3a added tests for data url regexs 2011-02-15 22:59:54 -08:00
John Bender
b1c8621309 small tweak to wait for page load in navigation tests 2011-02-14 23:34:48 -08:00
John Bender
f301018c1c added an extra parameter to data url element to match reported issue in pull request 2011-02-14 17:33:06 -08:00
John Bender
47d4a1fb0a refactor/simplification of fix for broken regex matching data url in ajax loaded pages 2011-02-14 17:25:23 -08:00
John Bender
3ca20f8362 resolved small conflict in test fixtures 2011-02-07 22:33:49 -08:00
John Bender
cbd1eb7ac9 moved page and dialog styling to qunit css to remove repition and make sure that its consistent across pages 2011-02-05 21:22:50 -08:00