Commit graph

1083 commits

Author SHA1 Message Date
Kin Blas
7df38d9abf Upgrade to jQuery 1.6.1 to pick up :checked fixes. 2011-05-13 15:27:09 -07:00
Steven Black
f8516d4dbe jquery.mobile.support.js: Whitespace changes only. Bring code up to jQuery coding standards in anticipation of adding Opera Mini feature detection. Passes jsHint except for the James Padolsey/ jdalton non-UA-based IE version check, which is OK. All tests pass.
Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-05-11 20:47:37 -04:00
Todd Parker
b80689a1dc Merge pull request #1522 from markandey/master
If 'input' element has id string with dots in it, code fails. Fixed by tweaking the regex to escape dots in the selector. Thanks markandy and eddiemonge
2011-05-10 12:12:19 -07:00
Kin Blas
4f4bb4d309 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-05-09 14:24:49 -07:00
Kin Blas
24fc06b234 Issue 1592 - Make sure we set lastval on create so we don't compare against the stirng "undefined" on first keyup/change event. 2011-05-09 14:23:06 -07:00
Todd Parker
084bbbd839 Merge pull request #1573 from marcoos/master
fix for issue 1530: Page title is changing when I use popup select menu (Dropdown). Thanks marcoos.
2011-05-09 13:03:02 -07:00
Kin Blas
1387fd457f Merge branch 'filterspeed' of https://github.com/nsaleh/jquery-mobile into pull-1475
Resolved Conflicts:
	js/jquery.mobile.navigation.js
		- Removed these changes as they are not related.
2011-05-09 12:27:44 -07:00
Nabil Saleh
4ffb0a5f33 - code cleanup
- added class-based hiding
2011-05-09 13:25:13 +02:00
Kin Blas
e597ccb381 Fix for issue 1580 - phonegap: Pages with data-ajax="false" on form fail to load
In the $.ajax() callback, we look for elements with @href, @src, and @data-ajax="false" elements, the code then assumes that matching elements will have either @href or @src, which of course forms don't ... they have @action ... so the code throws an exception because thisUrl is undefined.

- I reworked the code to handle action and check to make sure we have an attribute and url string before attempting to use them.
2011-05-06 13:05:56 -07:00
Kin Blas
e775f5e83a Fix for Issue 1578 - Can't load file:// pages
This was caused by this checkin:

4b4ee54a72

The change caused the base tag to be reset to file:// (literally with no path).

All that was missing was a small tweak to base.reset() to use the new initialPath variable instead of docBase.
2011-05-06 10:28:31 -07:00
scottjehl
4b4ee54a72 This change sets the base tag properly on page load and page changes, corresponding with the recent change to absolute path hash urls. Images and other assets will direct relative to the document in which they reside. This may not cover new path situations Kin has documented, but it does fix the regression so things work as they did before the change. Tested in non-base supporting browsers to verify it works there too. The following page should have an image in the content, verifying the fix http://jquerymobile.com/test/#/test/docs/about/intro.html . Fixes #1508 2011-05-06 09:37:41 -04:00
Marek Stepien
50ee33a84f fix for issue 1530: Page title is changing when I use popup select menu ( Dropdown) 2011-05-05 23:26:41 +02:00
scottjehl
131cb2423f updated to 1.6 2011-05-04 22:24:36 -04:00
Paul Nicholls
91126e4e85 Issue #1514 (Regex breaking Firefox >3.6)
Remove greedy matches from start and end of regex - there's no need for them, and they cause immense slowdown (on the order of 3-4 seconds on medium-size pages loaded via ajax).
2011-05-03 10:48:06 +12:00
Kin Blas
af3b8ce3ae Merge pull request #1544 from StevenBlack/TransitionsToStandard.
Transitions to standard
2011-05-02 14:23:36 -07:00
mark.dawn@gmail.com
4bccf1d8a6 some string literal fixes 2011-05-02 13:30:36 +05:30
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
Steven Black
b78c6ea372 jquery.mobile.transition.js: code to jQuery core standards, part deux.
Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-05-01 21:19:30 -04:00
Steven Black
2c444ef34d jquery.mobile.transition.js: code to jQuery core standards.
Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-05-01 21:16:06 -04: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
Nabil Saleh
eefbdecf0a further cleanup 2011-04-29 10:50:10 +02:00
Nabil Saleh
3339a272e5 code cleanup 2011-04-29 10:41:36 +02:00
Nabil Saleh
ca767ff3aa code cleanup 2011-04-29 10:09:04 +02: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
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
mark.dawn@gmail.com
20fb94df98 Merge remote-tracking branch 'origin/master' 2011-04-27 23:50:51 +05:30
scottjehl
7c8f8e9406 updated jQuery to 1.6 RC 2011-04-27 07:53:59 -07: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
mark.dawn@gmail.com
69a0a47a0c XPATH Selector was not well formed of type label[for=ID]
let say id of an inputbox is x.y.z then query
$("label[for=x.y.z]") gonna fail
$("label[for=\"x.y.z\"]") gonna work
2011-04-26 19:31:43 +05:30
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
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
Nabil Saleh
b10c71814c further performance optimization:
- hiding all elements at once
2011-04-20 17:31:57 +02: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
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
Nabil Saleh
9cb8673e68 data-filter performance optimization
- algorithmic optimization of listview.filter
- functional optimization by supporting data-filtertext attribute

includes patch from mathieucarbou: f58631d07d
2011-04-19 11:25:48 +02:00
John Bender
dbd68472b4 whitespace and comment fixes 2011-04-18 22:35:13 -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
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