Commit graph

1661 commits

Author SHA1 Message Date
John Bender
2de28ee69f allow users to define keepnative on page elements 2011-10-13 14:53:36 -07:00
Eddie Monge Jr.
7c449fc791 style cleanups 2011-10-12 13:10:08 -07:00
John Bender
f0db137ed9 render prefetched pages according to their data-rel attr fixes #2335 2011-10-11 16:19:18 -07:00
John Bender
4713bf26d5 remove log statements 2011-10-11 10:47:46 -07:00
John Bender
8dd3def54b refactor for #509, move to document ready instead of using ssetTimeout 2011-10-11 10:46:19 -07:00
John Bender
3306a3242c Merge branch 'master' of https://github.com/mplatov/jquery-mobile into mplatov-master 2011-10-11 10:44:38 -07:00
John Bender
9b73a750d4 use jQuery.trim 2011-10-11 08:31:37 -07:00
John Bender
a4836ec5fd move button to enhanceWithin 2011-10-10 14:21:37 -07:00
John Bender
404010839d move slider to enhanceWith 2011-10-10 14:21:37 -07:00
John Bender
aa16aec358 move checkbox radio to enhanceWithin 2011-10-10 14:21:37 -07:00
John Bender
4ccd9b1bb3 move textinput to widget prototype enhanceWithin 2011-10-10 14:21:37 -07:00
John Bender
9e63d40298 todo for moving the keepnative to the widget itself, whitespace 2011-10-10 14:21:37 -07:00
John Bender
0e5583eae9 move to a centralized form element selector to leverage keepnative 2011-10-10 14:21:36 -07:00
John Bender
1b6ac290d2 add keepNativeSelector method to page widget for use in child form creat bindings 2011-10-10 14:21:36 -07:00
Kin Blas
c297f9675b Fix for issue #2644 - Navigating to root "/" does not generate clean URL if root page has id="*"
- Fixed a bug in the hashchange handler for the pushstate/replacestate plugin that was incorrectly resolving hashchanges for ids against the current location.href, which could be a different document. We now resolve id hashes against the document URL.

- Modified changePage() so that it sets the settings.dataUrl option to the documentUrl, when navigating to the first-page of the application document. This prevents any id on the first-page from being added to the location hash. This means that URLs that used to be produced like this:

	http://site.com/apps/#first-page-id

will now display as:

		http://site.com/apps/

Developers that wish to get the old behavior back can register a pagebeforechange handler and do something like this:

	$( document ).bind( "pagebeforechange", function( e, data ) {
		var toPage = data.toPage;
		if ( typeof toPage === "object" && !data.options.dataUrl && toPage[ 0 ] === $.mobile.firstPage[ 0 ] && toPage[ 0 ].id ) {
			data.options.dataUrl = "#" + toPage[ 0 ].id;
		}
	});

The handler above will make sure that any page changes to the first-page will always display as:

	http://site.com/apps/#first-page-id
2011-10-10 11:04:04 -07:00
scottjehl
f0403f9d9f set native touch overflow enabling back to false 2011-10-07 18:48:38 -04:00
John Bender
71b0eb0552 move $.fn.text invocation to $.fn.getEncodedTest where the content is being re-added to the dom for xss safety Fixes #2550 2011-10-04 18:25:54 -07:00
Mat Marquis
54465515d7 Fixes #2593 — Prevents application of ‘ui-corner-bl’ and ‘ui-corner-tl’ classes to ‘ui-li-thumb’ elements that have a class of ‘ui-li-icon.’ 2011-10-04 18:02:52 -04:00
Todd Parker
a783c740e8 Merge pull request #2609 from Wilto/voiceover-double-buttons
Fixes #2594 — Button text is no longer read aloud twice. Thanks @Wilto!
2011-10-04 14:10:29 -07:00
Mat Marquis
3c3a777158 Fixes #2594 — Button text is no longer read aloud twice (and treated as two separate navigable items) in iOS VoiceOver. 2011-10-04 16:45:14 -04:00
Todd Parker
32ed8cfbbd Merge pull request #2607 from Wilto/collapsible-status-text
Fixes #2595 — Hidden “click to expand contents” text now updates. Thanks @rogerjohansson and @Wilto
2011-10-04 12:44:03 -07:00
John Bender
57079e1d6b add the ability to disable native orientation change support Fixes #793
the frequency of the triggered event in certain android releases ( 2.1, 2.2) appears to be dependent on a host of things other than an actual orientation change, eg alerts, zoom, and scrolling. This provides a way for the user to disable it in favor for using throttled resize while still making use of the window.orientation where its available for reliability
2011-10-04 11:54:26 -07:00
toddparker
ff9720281b Added another check for orientation change event for Android 2.1 2011-10-04 11:54:25 -07:00
John Bender
a0ddaab8e3 fix for incorrect portrait of lanscape value
The value attached to the event passed into handlers was based soley on screensize which is problematic given that some implementations (eg Android 2.3) don't change the screensize until after the event is fired. The orientation property appears to report a better value where it is provided so the solution is to prefer what it reports and then fallback to the screensize caculation where necessary.
2011-10-04 11:54:25 -07:00
John Bender
a20bb72a29 whitespace in events 2011-10-04 11:54:25 -07:00
Mat Marquis
4ed1e6ac11 Fixes #2595 — Hidden “click to expand contents” text now changes depending on current expanded/hidden state. 2011-10-04 14:01:08 -04:00
Kin Blas
8a25599b82 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-30 12:43:30 -07:00
Kin Blas
98eda9a0f4 Fixes #2582 - Refreshing a page with #&ui-state=dialog causes page duplication
- Modified loadPage() to call isFirstPage() with fileUrl instead of absUrl. Since fileUrl is the same as absUrl, but with the dialogHashKey stripped off, it will allow us to match against the url for the first-page.
2011-09-30 12:38:16 -07:00
Kin Blas
5a76ae7ed2 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-30 09:19:15 -07:00
Kin Blas
bafc18723b Fixes #2574 - namespace pollution on 'search' variable (1.0rc1)
- There was a typo in the var declaration in makeUrlAbsolute(). Changed the ';' in the middle of the declaration to ','.
2011-09-30 09:17:05 -07:00
scottjehl
b4a7db2f1d brought back these orientation rules as they're important in iOS5 layouts. 2011-09-29 18:38:15 -04:00
Kin Blas
47812171f1 Fixes #2570 - Refreshing a page with #&ui-state=dialog causes syntax error
- This was a regression from my fix to loadPage() for detecting un-enhanced pages by @id as a fallback. In this particular case dataUrl was being used to create an id selector, and of course if the dataUrl is an empty string we end up using "#" as the selector. The fix is to simply check for a non-empty dataUrl.
2011-09-29 15:16:21 -07:00
scottjehl
e29346daf5 Merge remote branch 'origin/master' 2011-09-29 14:47:24 -04:00
scottjehl
a93c4878aa removed media classes JS - deprecated since Beta 1. Use CSS3 Media Queries with a polyfill instead :) Docs are updated to link to old code in case anyone still needs a backwards-port 2011-09-29 14:47:05 -04:00
scottjehl
ea3a34e055 changed comment in JS 2011-09-29 14:46:06 -04:00
Kin Blas
bb8326876b Fixes #2212 - Collapsible heading vclick issue
- Switch to using "click" instead of "vclick" on collapsible headers since that is the only reliable way to prevent uncaught/mismatched clicks from firing on a different element.
2011-09-29 00:43:01 -07:00
Kin Blas
972500bbbc Re-merge pull request #1550 from MaxThrax/master.
- Not sure what happened when I originally merged this back on 05/02/2011, but here it is again!
2011-09-28 22:08:30 -07:00
Kin Blas
d64eaf0500 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-28 11:40:33 -07:00
Kin Blas
34fb7b2dc1 Fixes #2537 - Add new pageremove event
- Modified the pagehide callback in $.mobile._bindPageRemove() so that it fires off a "pageremove" event. Callbacks can prevent the removal of the page by simply calling preventDefault() on the pagremove event object that is passed to their callback.
2011-09-28 11:37:46 -07:00
gseguin
b0969d1bcf Merge branch 'issue-2527' 2011-09-28 11:03:18 -07:00
gseguin
b84a68edaa Missing semi-colon 2011-09-28 10:57:46 -07:00
gseguin
5a97fd7b05 Fix for #2527
Use ui-body-* instead of ui-btn-up-* for collapsible content
2011-09-28 10:57:24 -07:00
Todd Parker
ee35ca635f Merge pull request #2556 from Wilto/master
Assorted CSS adjustments. Fixes #1392, Fixes #2513. Thanks Wilto!
2011-09-28 10:54:17 -07:00
Kin Blas
ca9df1197a Fixes #2529 - Transition to the same page
- So it seems just allowing changePage() to process same toPage and fromPage is not enough. I modified the CSS3 keyframe

animation plugin so that it only removes the ui-page-active class from the fromPage if it is *NOT* the same as the toPage.

- I also re-ordered the in/out transition rules for forward/reverse transitions so that the user always views some sort of animation/motion.
2011-09-28 09:14:52 -07:00
John Bender
ac0288a5ba create getEncodedText helper and update custom select for use Fixes #2547 2011-09-27 15:19:35 -07:00
Mat Marquis
085a104005 Fixes #2538 — Button wasn’t getting the appropriate “has-count” class. 2011-09-27 16:47:11 -04:00
scottjehl
9b86fddf89 disabled touch overflow scrolling by default. overridable through $.mobile.touchOverflowEnabled. 2011-09-27 12:37:10 -04:00
scottjehl
47480d69f9 when touch overflow scrolling is supported and enabled, user scaling can create serious usability issues where it's difficult to get zoomed back out. This disables user scaling when that overflow scrolling is enabled (currently only projected for ios5 support) 2011-09-27 12:36:24 -04:00
Kin Blas
a975878fb4 Disabled the workaround for issue 785 (jQM text input forces use of iOS auto-correction) on iOS 5 devices since it appears to be fixed. This is still a problem on iOS 4.x and earlier.
- We don't have a specific test for iOS 5 so we use $.support.touchOverflow as an iOS 5 and later indicator. Yes, I feel dirty.
2011-09-26 11:39:30 -07:00
Kin Blas
6cd1e1b141 Fix for issue 2529 - Transition to the same page
- Added a new allowSamePageTransition option to the changePage() method default settings.

By default, we prevent changePage() requests when the fromPage and toPage are the same element, but folks that generate content manually/dynamically and reuse pages want to be able to transition to the same page. To allow
this, they will need to change the default value of allowSamePageTransition to true, *OR*, pass it in as an option when they manually call changePage().

It should be noted that our default transition animations assume that the formPage and toPage are different elements, so they may behave unexpectedly. It is up to the developer that turns on the allowSamePageTransitiona option
to either turn off transition animations, or make sure that an appropriate animation transition is used.

	// To toggle the default behavior for all changePage() calls,
	// set the default value of allowSamePageTransition to whatever
	// you want it to be. The default is false.

	$.mobile.changePage.defaults.allowSamePageTransition = true;

	// To specify the behavior when manually calling changePage(),
	// pass it as an option. If not specified, the default value
	// specified by $.mobile.changepage.defaults.allowSamePageTransition
	// is used.

	$.mobile.changePage( "#reused-page", { allowSamePageTransition: true } );
2011-09-26 10:23:47 -07:00