Commit graph

2335 commits

Author SHA1 Message Date
Scott Jehl
fa152fa977 Merge pull request #1548 from edelabar/patch-1.
Fix for calendar widget creating multiple calendars in multi-page HTML
2011-05-02 08:35:26 -07:00
Eric DeLabar
ae8b1c45fc The each callback in the pagecreate method was creating multiple calendars when used with a multi-page html file because it was not scoped to the current page but instead to the entire document. 2011-05-02 08:22:26 -07:00
John Bender
91f5a3492b added two more test conditions to ensure a single active button per radio button set and a single checked input 2011-05-02 01:00:04 -07:00
John Bender
cabd45283b test to verify that clicking radio buttons changes checked state and ui btn active 2011-05-02 00:54:59 -07:00
John Bender
377c0067a7 remove checked state from radio button inputs that are not checked. use jquery attr accessor instead of expando to guarantee consistent values. Fixes #1532. 2011-05-02 00:53:51 -07:00
Scott Jehl
d9e47627ed Merged pull request #1533 from StevenBlack/NavigationToStandard.
jquery.mobile.navigation.js: Changes throughout the file for jQuery codin
2011-04-29 07:40:53 -07:00
Steven Black
520b8e22d4 More formatting changes to meet JQuery Core Style Guidelines.
)) -> ) )
...and others.

Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-04-29 08:22:03 -04:00
Steven Black
7447ba01f7 jquery.mobile.navigation.js: Changes throughout the file for jQuery coding standards including:
* whitespace within parenthesis
* double quotes
* line breaking for object key assignments
Also made several changes suggested by jsHint.
All tests pass as before -- still failing first three tests as before.

Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-04-28 21:12:01 -04:00
John Bender
39e3f1be95 Merged pull request #1494 from rs/master.
Fix an alert(false) on app init when $.mobile.loadingMessage is set to false
2011-04-28 15:03:31 -07:00
John Bender
ceea4bca66 remove ie debug alert 2011-04-28 15:02:59 -07:00
toddparker
51908bdaeb Updated the radiobutton page to fix the sample code that showed two data-role attributes on a single element. 2011-04-28 17:29:37 -04:00
Todd Parker
0cccfda568 Merged pull request #1427 from mariozaizar/master.
Small typo in "Current browser support" link. Thanks mariozaizar!
2011-04-28 13:43:07 -07:00
Todd Parker
e3cc3f55dc Merged pull request #1481 from cwt137/master.
Patch for bug #1480. Thanks cwt137.
2011-04-28 13:11:57 -07:00
John Bender
31604bb75a removed uncecessary clone for event names array to fix the tests 2011-04-27 22:04:00 -07:00
Todd Parker
c2e65107c0 Merged pull request #1503 from eddiemonge/eddie_listview.
micro-optimizations and styling changes to listview.js
2011-04-27 13:34:39 -07:00
Kin Blas
9dc190f22e Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-04-27 07:54:52 -07:00
scottjehl
7c8f8e9406 updated jQuery to 1.6 RC 2011-04-27 07:53:59 -07:00
scottjehl
026a7bc968 updated jQuery to 1.6 RC 2011-04-27 09:56:15 -04:00
Kin Blas
52a666d71f Check $from before dereferencing it. 2011-04-26 16:36:31 -07: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
Kin Blas
14f73b27ee 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 13:53:11 -07:00
Kin Blas
3a164c6cc8 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-04-22 10:56:55 -07:00
Kin Blas
f7749504b8 Modified the vclick handler code in navgation.js so that it doesn't place the ui-btn-active class on any links meant for interactivity.
Removed the return false in the vclick handler of collapsible and replaced it with a preventDefault(). The only reason we were returning false was to stopPropagation() so that the vclick handler in navigation.js  didn't place a ui-btn-active on it.
2011-04-22 10:53:24 -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
70a86c748f added a sequenced test to make sure that opening a dialog sized select menu resulted in that same dialog many times. also moved one of the event tests over to core 2011-04-21 22:32:37 -07:00
John Bender
cf23361a19 added the single call to local function focus button to ensure menu height calculation is accurate Fixes #1453 2011-04-21 22:30:39 -07:00
Kin Blas
2d2e6d7741 Fix for issue 1461 - Tops of pages missing after dialog click in Safari and iPhone.
- Delayed the setting of focus till *AFTER* the scroll position is restored.
2011-04-21 15:31:21 -07:00
eddiemonge
279d71828a left a test piece of code in previously 2011-04-21 14:40:58 -07:00
eddiemonge
d7bab1f9a5 micro-optimizations and styling changes to listview.js 2011-04-21 14:33:49 -07:00
Kin Blas
1ec80bdc80 I broke button states in my last checkin. I was passing in the wrong element (document) into the new function that finds the button element. 2011-04-21 10:56:04 -07:00
Olivier Poitrey
b4b80cd200 Fix an alert(false) when $.mobile.loadingMessage is false 2011-04-21 15:43:50 +02:00
Kin Blas
d4c7b5da66 Fix from @brukhabtu for issue 1492 - Errors when trying to delete DOM elements.
- Check for existence of the bindings object before attempting to use it. Apparently jQuery core strips off any data bindings of an element before calling teardown on it to remove special event handlers.
2011-04-20 18:06:21 -07:00
John Bender
b0e3d5fbf1 select test cleanup, added test to check that the dialog hash key is removed when a large select menu item is clicked Fixes #1454 2011-04-19 23:28:11 -07:00
John Bender
16a38a61ea fixed custom select dialog menu transition issues by preceding backward through history. This tightly couples the closing of custom select dialog menus to our hash change history implementation because of how it handles dialogs in dialogs. 2011-04-19 23:28:11 -07:00
John Bender
01c40c2525 select whitespace fixes 2011-04-19 23:28:11 -07:00
cwt137
357b87fab9 Corrects comment that was wrong. Changes "header" to "footer". Fixes bug #1480 2011-04-19 22:00:25 -07:00
Kin Blas
7d9af0b2a8 Fix for issue 1157 - Collapsible block prevents page scrolling on iPhone 4
- When we switched to virtual mouse events, I just did a straight translation of the code that existed which basically did the collapse/expand on mouseup. In order to factor in scrolling, I needed to move that code into a vclick handler and stopPropagation() and preventDefault() to make sure the button doesn't activate.
2011-04-19 16:57:13 -07:00
John Bender
dbd68472b4 whitespace and comment fixes 2011-04-18 22:35:13 -07:00
John Bender
49b1b780ed test alterations for absolute navigation 2011-04-18 21:46:53 -07:00
John Bender
8e42b52767 beginning to move to absolute hashes in all cases, still some more work to do 2011-04-18 21:46:53 -07:00
toddparker
3ec9069166 Merge remote branch 'origin/master' 2011-04-18 17:35:42 -07:00
toddparker
fb8ef84434 Fixed a typo, thanks Steven. 2011-04-18 17:35:27 -07:00
Kin Blas
c31ee33a0f Fix for 1407 - Bad scroll performance since A4 on iPhone 3G
- Modified vmouse code so that it uses $.data() instead of $().data() which is significantly faster.

- Modified the navigation and buttonMarkup code so they stop using live(). The vmouse code triggers several events during the touch events, which in turn causes the underlying event code to call $.closest() with the selector used during the live() call to figure out if the event should be handled. This turns out to be very expensive, so instead, we now just bind directly to the document, and walk the DOM manually to figure out if we should handle it. This is much faster since we are avoid triggering multiple nested function calls.
2011-04-18 16:13:50 -07:00
toddparker
cdd8b745ca Added documentation on the auto-updating title and data-attr in the anatomy of a page. 2011-04-18 14:51:48 -07:00
toddparker
188913012b Merge remote branch 'origin/master' 2011-04-18 14:40:58 -07:00
scottjehl
472cbb1778 moved calls into one. #cleaning 2011-04-17 14:24:47 -07:00
scottjehl
b649f17d9d one call to $.type 2011-04-17 12:11:03 -07:00
Kin Blas
8c71ee5dff Fix for issue 1458 - Listview thumbnails aren't rendering correctly.
Needed to modify _itemApply() to look for the first image that is the first child of its parent. I may need to tweak this at a later point because the selector is still too general.
2011-04-14 23:36:58 -07:00
John Bender
b83d81962e tests for dialog query param support 2011-04-14 21:49:50 -07:00
John Bender
2242684e59 added support for query params with dialog hash keys 2011-04-14 21:49:50 -07:00