Commit graph

1548 commits

Author SHA1 Message Date
John Bender
15cb663e52 suggestion from @jblas to save a bit of execution 2011-09-15 10:45:27 -07:00
John Bender
416b666ca8 prevent clicks on anything but the left mouse button, also adds the which value to the events when its undefined in the vmouse plugin 2011-09-15 10:16:40 -07:00
gseguin
518894fc69 Merge branch 'issue-1899' 2011-09-14 16:22:16 -07:00
gseguin
e6eaf7cacd Fix for #1899:
Re-styled collapsible and collapsible set so the content of the collapsible now is applied the ui-btn-up-%%theme%% class. This way the border will match the border of the header button. In the meantime in the ui-collapsible-content class we remove the background image and tweak the margin/padding to make everything look good.
Combined the expand/collapse handlers into a single one and made extensive use of .toggleClass()
2011-09-14 16:02:47 -07:00
John Bender
1a385db664 prevent known hash change handling from firing from popstate hashchange Fixes #2444 2011-09-14 15:37:31 -07:00
gseguin
87ca47f162 Fix for issue #1899
Refactored some css classes
Fixed bottom corners in set with only one collapsible
2011-09-14 11:05:53 -07:00
Kin Blas
56a22727ab Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-13 00:23:33 -07:00
Kin Blas
1a92be0240 Fix for issue 2406 - Navigation from one page back to multi-page template
- Make sure that our hashchange resolves non-path hashes against the documentBase. This prevents the resulting changePath() call from incorrectly resolving against the URL for the current active (external) page.

- Fixed a problem in the push-state code. A hashchange event is *NOT* fired when navigating back (window.history.back()) from an external page to an internal page. This makes sense when you think about it since hashchange is only ever fired when the hash of the current document url changes, not when the document url itself changes. The fix was to make sure that the pushstate hashchange callback always sets a state object, even on embedded page URLs. This allows the hashchange callback to be triggered from within onPopState().
2011-09-13 00:23:03 -07:00
John Bender
f1fef48239 add open and close as noop for people who might be looping over their selects and to self document the methods for extension 2011-09-12 16:53:56 -07:00
John Bender
c426aefd76 add data attribute tag for pages loaded via ajax Fixes #2432 2011-09-12 14:06:47 -07:00
John Bender
fbd113bad4 whitespace in listview and core nav 2011-09-12 13:58:24 -07:00
John Bender
ee6027a196 prefer defined theme from prototype or data options Fixes #2423 2011-09-12 09:08:48 -07:00
John Bender
59fc26d25f fix refresh bug for new options of the same number as before 2011-09-09 17:27:26 -07:00
Ghislain Seguin
2c55c93464 Merge pull request #2419 from zachleat/master
fieldcontain comment was copy pasted on links, nojs plugins.
2011-09-09 14:16:01 -07:00
zachleat
92151822b8 Incorrect comment text on the headers of two plugins. 2011-09-09 16:07:31 -05:00
scottjehl
2dadb4dbc4 Merge remote branch 'origin/master' 2011-09-09 12:28:17 -04:00
scottjehl
2369e2fa32 improved qualifications so that iOS5 gets the old-style fixed headers and footers when touchOverflow is disabled (which is the default). 2011-09-09 12:27:59 -04:00
John Bender
729757b465 create selectOptions method so the values stay current across dom changes Fixes #2410 2011-09-09 09:00:46 -07:00
gseguin
6f5a7d1266 Fix for issue #2404
Collapsible are collapsed by default
2011-09-08 13:34:58 -04:00
scottjehl
f49e69ef84 disabled iOS5 improvements by default. Can be enabled by binding to mobileinit and setting $.mobile.touchOverflowEnabled = true; 2011-09-08 13:26:33 -04:00
scottjehl
b645781f4d implemented native overflow scrolling based on support for -[prefix]-overflow-scrolling: touch. True fixed headers and footers come supported as well. 2011-09-08 12:38:50 -04:00
scottjehl
bc036b91b0 Clock tap is busted, so this logic is here but commented-out 2011-09-08 12:38:50 -04:00
scottjehl
fda71670b4 reset scrollTop to 0, not defaultHomeScroll 2011-09-08 12:38:50 -04:00
scottjehl
1a524756f3 added a pre-transition class to set pages to display: block early and allow for their scrollTop and focus to be set before they are shown. 2011-09-08 12:38:50 -04:00
scottjehl
440be55f2b changed the name of the overflow support test and class to touchOverflow / touch-overflow 2011-09-08 12:38:50 -04:00
scottjehl
dae560d67f added support test & html class for overflow-scrolling-touch 2011-09-08 12:38:49 -04:00
scottjehl
2f63fdf3ec Merge remote branch 'origin/master' 2011-09-08 12:32:27 -04:00
scottjehl
bf02fc880d increased timeout that waits for a potential hashchange event to fire as a result of pop. 2011-09-08 12:31:59 -04:00
Kin Blas
fcbd4c3030 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-08 09:24:16 -07:00
Kin Blas
78041bc7c9 Added path.isFirstPageUrl() which is now called from loadPage() when trying to determine if the URL being loaded refers to a page that is already in the DOM. This will prevent us from duplicating the first-page in the main application document.
Also checking in the first example of how to use the pagebeforechange notification to allow for dynamically updating and re-using a page that is already in the DOM.
2011-09-08 09:21:31 -07:00
scottjehl
db3dbc04d2 Merge remote branch 'origin/master' 2011-09-08 11:59:43 -04:00
scottjehl
7be8311d4e added location.search to the original page data-url 2011-09-08 11:58:55 -04:00
Kin Blas
04623c21cf Merge branch 'master' into changepage-prevent 2011-09-07 18:07:21 -07:00
Kin Blas
6aa8c8f3b0 - Added "fromPage" option to changePage(). This used to be in there before the navigation re-work, I just added it back in.
- Added "dataUrl" option to changePage(). This allows a caller to specify a page element to change to, but specify an alternate URL for location display purposes. This is useful for dynamic applications that re-use and over-write existing page content to avoid overwhelming the DOM.

- Renamed the "beforechangepage" and "changepage" events to "pagebeforechange" and "pagechange" respectively. This was done to match the page widget naming of its notifications. Left the triggers for the old events in place but with DEPRECATED comments.

- Renamed the properties of the data object passed to the page events.
2011-09-07 18:03:38 -07:00
dtao
fa4d9c16d7 fixed typo: 'throttledResize' => 'throttledresize' 2011-09-07 10:09:00 -04:00
Kin Blas
abb812cc01 Fixes for issue 1464 - No way to stop a link from being followed with some custom event (tap, taphold)
jquery.mobile.vmouse.js:

	- Modified triggerVirtualEvent() so that it returns the virtual event instead of the isDefaultPrevented() result of the virtual event.

		- Updated all references to triggerVirtualEvent() that relied on the boolean return value to instead check the isDefaultPrevented() call on the event now returned.

			- Updated mouseEventCallback() to propagate the iDefaultPrevented(), isPropagationStopped(), and stopImmediatePropagation() values from the virtual event on to the  original mouse event.

			jquery.mobile.event.js

				- Modified the "taphold" trigger code to create a new $.Event() instead of passing the stale vmousedown event.

					- Added clearTapTimer() which is called from a new vmouseup binding, to prevent the timer from firing between the tie the finger/mouse goes up and the click event is dispatched.

					- Added some propagation tests for the "tap" event. Tests for "taphold" will have to wait until we fix the problem where multiple taphold timers are fired off when an element and one of its ancestors is bound to taphold.
2011-09-07 10:09:00 -04:00
Kin Blas
5333ab7bf7 I noticed that the code in the mouseup for the toggle switch was using a CSS3 transition, but calling the animationComplete() function which waits for an animationend event which will never come. This means we bind a new animationComplete() handler every time the toggle switch is clicked.
I removed the binding for the handler completely since it doesn't hurt to just leave the transition in place. I also removed the code that was setting the position of the slider since it really should only be set within the mouseup if the user did not change the switch setting (toggle).
2011-09-07 10:09:00 -04:00
Kin Blas
81c3957129 Fix for issue 1925 - Single tap triggers two actions, especially in android B1
- Trigger the list item and keyboard return/space key up to the "click" event instead of "vclick". This delays the dismissal of the custom select menu until the click event, thereby avoiding the case where the menu disappears before the browser dispatches it's synthesized mouse events (in the touch case) with a target of whatever element was underneath the menu.
2011-09-07 10:09:00 -04:00
scottjehl
d68d5064bc finished last-scroll remembering implementation across pages in the history stack (regardless of whether they've been removed from the DOM since last appearance). 2011-09-07 08:15:00 -04:00
Kin Blas
701b381cc4 Couple of modifications to changePage():
- Moved the setting of isPageTransitioning *AFTER* the beforechangepage notification.

- Modified the trigger("beforechangepage") call to pass the args to changePage() as an object since trigger only expects one data arg.
2011-09-06 16:56:20 -07:00
scottjehl
0d98b8fad6 changed setting of lastScroll 2011-09-06 14:29:19 -04:00
scottjehl
97539ed3bd focus on title or page div 2011-09-06 12:58:14 -04:00
scottjehl
ebafc02cfe add tabindex to page element 2011-09-06 12:58:14 -04:00
scottjehl
003505a4b9 changed minscroll to 250, better organization of lastscroll 2011-09-06 12:56:46 -04:00
scottjehl
ac67e92cbb This change sets the "lastScroll" property to each urlHistory item object, allowing us to remember previous scroll distances when returning to a page that has since been removed from the DOM. Before this change, this number was stored in data on the page element, so it is lost when the page is removed after pagehide.
Also, this change removes a reference in memory that we were keeping to the $activeClickedLink on each page. We stored this in attempt to refocus a link after returning to a page. Unfortunately, it doesn't seem that this data can be retained after pages are removed from the DOM, outside of somehow remembering a unique selector string to reach that element again (which could be achieved by adding some overhead, ala http://stackoverflow.com/questions/2068272/getting-a-jquery-selector-for-an-element )
2011-09-06 12:56:46 -04:00
scottjehl
522b48ee84 started on the change to allow default prevention on beforechangepage 2011-09-05 13:05:57 -04:00
gseguin
001e588c92 Fix for issue #2017. Clear active link on vclick so there can be only one active link at a time. 2011-08-31 21:46:39 -07:00
gseguin
e28ad6d95d re-added setting of $.mobile.activeBtnClass on selected option but only for single select lists 2011-08-31 13:33:52 -07:00
gseguin
4cb52c4908 set aria-selected on li element when li is selected 2011-08-31 11:16:11 -07:00
gseguin
3dc4b9f9fa Removed activeBtnClass from selected option 2011-08-31 10:43:23 -07:00