Commit graph

2226 commits

Author SHA1 Message Date
Ghislain Seguin
e37c7e9bf5 Moved RequireJS plugins to external/requirejs 2012-01-27 23:36:42 -08:00
Ghislain Seguin
b15815d5d8 Ensure module paths are relative 2012-01-27 23:27:13 -08:00
Ghislain Seguin
2deb132a4f Fixed meta-module for docs
Moved dependency on jquery.mobile from jqm-docs to jquery.mobile.docs
Use order! plugin to ensure that jquery.mobile gets executed (dumped) first
Added pragmas around the jqm-docs define
2012-01-27 23:14:02 -08:00
scottjehl
4523bb241b Undoing one of my earilier changes to remove a jump-to-top that commonly happened at the start of transitions, 2012-01-27 20:39:07 +07:00
scottjehl
a2bfc27492 Implemented and documented the tapToggleBlacklist option of the fixedtoolbar plugin, which tells the plugin to ignore certain targets for tap toggling the toolbars. The default list is "a, input, select, textarea, .ui-header-fixed, .ui-footer-fixed". 2012-01-27 19:34:14 +07:00
scottjehl
5ef03c8474 Merge remote branch 'origin/master' 2012-01-27 18:43:27 +07:00
scottjehl
8232059164 Added an optional 1.0-style loading box design, configurable via a new loadingMessageTextVisible option, which defaults to false for regular loading messages, but is true for internal error messages. In order to support this change, the show loader method was modified with 3 arguments: theme, text, and text-only. Other new core options have been added to configure the theme for default and error message boxes: loadingMessageTheme and pageLoadErrorMessageTheme. 2012-01-27 18:42:22 +07:00
Ghislain Seguin
d3911f1209 Merge pull request #3475 from jasondscott/issue_1524
Issue #1524 - Taphold event fired while scrolling on Blackberry Playbook
2012-01-26 11:42:04 -08:00
scottjehl
45eb085167 ensure that fullscreen toolbars do not animate in when the page is first shown 2012-01-26 17:24:23 +07:00
scottjehl
82ddbf1318 Merge remote branch 'origin/master' 2012-01-26 17:07:26 +07:00
scottjehl
bb62031cc3 added support for the updatelayout event, so that fixed toolbars can be manually updated through this event alongside other plugins that subscribe to it. 2012-01-26 16:21:02 +07:00
scottjehl
bb17f146e4 added an argument to the show and hide methods to specify that no transition should be used, regardless of the default transition type. This is now used on pageshow, so the toolbar does not use an animated transition when the page is initially shown. 2012-01-26 16:06:44 +07:00
scottjehl
ee0573e7d2 set the default toolbars transition to slide, because it looks kinda nice 2012-01-26 15:18:33 +07:00
scottjehl
82ed98cffc some edits to make sure proper classes are toggled for the slide transition to work, if it's set. 2012-01-26 15:16:52 +07:00
scottjehl
893508710a renamed togglePageZoom option disablePageZoom 2012-01-26 14:26:26 +07:00
scottjehl
716bf7f45d removed ability to set "fullscreen" on the page itself. Instead, this should be set on the fixed toolbar elements. 2012-01-26 12:18:00 +07:00
Ghislain Seguin
022b75d111 Added comment 2012-01-25 21:05:02 -08:00
Ghislain Seguin
e1d98a7e1b Removed use of order! plugin 2012-01-25 20:54:16 -08:00
Ghislain Seguin
5ced7f81cd Added AMD text plugin 2012-01-25 15:36:49 -08:00
Ghislain Seguin
ae835d0af1 Fixes #3479
Added $.mobile.version
2012-01-25 15:21:02 -08:00
scottjehl
72b0d46dff Added updatePagePadding option to automate the use of the updatePagePadding method, with a default value of true. When true, this method calls the updatePagePadding method on webkitAnimationStart, animationstart, pageshow, and throttledresize. The animation events catch the page before it transitions in, whereas pageshow event serves the purpose of catching the page when animations are not in play, or when there's no FROM page that you're transitioning from. Lastly, the throttledresize event updates the value on resize.
This method still needs unit test coverage. Fixes #3484
2012-01-25 22:15:40 +07:00
scottjehl
9381ae8f09 this seems to be a little better on repaints. 2012-01-25 21:12:23 +07:00
scottjehl
99db3d039f Merge remote branch 'origin/master' 2012-01-25 18:26:57 +07:00
scottjehl
699001a3c6 Added an experimental "updatePagePadding" method, which allows developers to adjust the page element's padding to accommodate a taller toolbar, so there is no overlap.
Addresses Issue #3484

Caveats:

- This method must be called when the toolbar is visible, meaning you'll see a visible jump when a page is shown. For this reason, I'm hesitant to recommend this feature. It would be a lot smoother to set the page padding in a custom CSS file to make up for whatever EM height your toolbars happen to be.

- Height is set in Pixels, meaning changes in font size could  render it inaccurate. If we want to set height in ems, we'll need to add an em conversion  utility function to jQM.

- To ensure it works properly, this method will need to be called on page show, and at any time a content reflow might occur: resize, orientationchange, zoom?

This method is not currently called automatically.

It can be called like this: $(".ui-header-fixed").fixedtoolbar( "updatePagePadding" );
2012-01-25 18:26:04 +07:00
scottjehl
544cdb49d6 if the option to disable page zoom on pages that contain a fixed toolbar is true, the plugin needs to use the lock to prevent other plugins from enabling zoom again while the page is in view. Fixes #3477 2012-01-25 17:39:13 +07:00
scottjehl
56607b946c this dependency is already in the define statement, which should be enough 2012-01-25 17:32:51 +07:00
scottjehl
b39c320bec preventFocusZoom default is true on iOS platforms, false otherwise, as it is only here to address an iOS bug. 2012-01-25 17:28:25 +07:00
scottjehl
f5260ab9e5 exclude non-iOS platforms from this behavior 2012-01-25 17:24:53 +07:00
jrburke
096e90bbfe Update to relative AMD dependencies, allows proper use of source in an AMD project. 2012-01-24 14:43:24 -08:00
scottjehl
40c400d657 Merge remote branch 'origin/master' 2012-01-24 17:34:20 +07:00
scottjehl
9da89ff6db modified so that the select zoom calls manipulate the locked property, to ensure other zoom plugins don't mess with it during focus 2012-01-24 17:31:07 +07:00
scottjehl
6e12e62123 namespaced the events. 2012-01-24 17:31:07 +07:00
scottjehl
94a9b24567 added the locked property, with options to lock and unlock it when calling disable or enable, respectively. This allows a plugin to take control and ensure zoom isn't messed with while it's carrying out a zoom-specific task 2012-01-24 17:31:07 +07:00
scottjehl
edad9c1f9a window not w, evt wasn't defined. Thanks @staabm 2012-01-24 17:31:06 +07:00
scottjehl
5725b4bac9 updated to bulletproof further 2012-01-24 17:31:06 +07:00
scottjehl
6cee30d22c updated to use only the devicemotion event, for compatibility and less battery battering 2012-01-24 17:31:06 +07:00
scottjehl
460ad7197c This change brings the iOS orientationchange bug workaround up to the latest code from that external project, with an experimental attempt at iOS4.3 support on the 3GS using the devicemotion event, which may be a bad idea to use unthrottled - not sure yet. This code needs to be tested on a device with iOS5, and I imagine the check for deviceorientation will also need a check for the value of evt.gamma. At that point, we may decide to only support iOS5 for this workaround, and the code can bind only to deviceorientation and be more concise. 2012-01-24 17:31:06 +07:00
scottjehl
3a9c22eacc switched up this check so it binds the events regardless of initial state, in case it's toggled later 2012-01-24 17:31:06 +07:00
scottjehl
ae726d2d45 added files to index php 2012-01-24 17:31:06 +07:00
scottjehl
b7549b213c moved the iosfocusfix logic over to the selectmenu plugin. It's now toggled via a new option: preventFocusZoom (Default is true). 2012-01-24 17:31:06 +07:00
scottjehl
6077668af4 added a restore method, similar to a widget's destroy. Restores the meta content back to original value 2012-01-24 17:31:06 +07:00
scottjehl
db453434a8 use maximum scale instead of user-scaling, as it's more reliable for restoring zoom 2012-01-24 17:31:05 +07:00
scottjehl
29373214c6 added zoom dependency and removed internal handling of page zoom enable/disable, opting to use the zoom plugin methods instead 2012-01-24 17:31:05 +07:00
scottjehl
b07bab7b51 fixed a duplicate listing 2012-01-24 17:31:05 +07:00
scottjehl
66be09d2de A new utility: $.mobile.zoom, which as 3 members: enabled [bool], disable [function], and enable [function].
This simple utility is used to disable user scaling in devices like iOS. The disable() method disables user-scaling. The enable() method enables user-scaling. The enabled property keeps track of state.

Two other utilites are included here as well.

First, there's zoom.iosfocusfix.js, which disables zoom as a select or input element is focused, preventing iOS from zooming into that element and cropping the viewport. Zoom is restored just after the focus event fires (a half second timeout).

Then there's zoom.iosorientationfix.js, which is intended to fix the iOS orientationchange zoom bug, following the approach from this project https://github.com/scottjehl/iOS-Orientationchange-Fix. This may not  be working yet. Needs testing, and it may require that we change the values of the meta content to use maximum-scale instead of user-scalable.

Lastly, fixedtoolbar, once it lands, should use this utility to disable/enable zoom, rather than the one that's currently included in its own source.
2012-01-24 17:31:05 +07:00
Jason
a215d4c13e Issue #1524 - Fixing style - Missing white space 2012-01-23 20:00:54 -05:00
Mat Marquis
201058bc90 Cached window in show/hide functions, since I was in the neighborhood. 2012-01-23 15:54:08 -05:00
Jason
92cf8d62c4 Issue #1524 - Taphold event fired while scrolling on Blackberry Playbook
Cause: The vmousecancel event was not being fired for 'this'.

How Fixed: Bound vmousecancel event to document instead of 'this'.

How Tested: Ran the example provided with the issue
(http://jsbin.com/oruhu4/) with this change on BlackBerry Playbook v2.0
and iPad iOS 5.0.1
2012-01-23 15:44:33 -05:00
scottjehl
7f2e50430e fixed the fixed toolbar tap toggle. Footers weren't moving to bottom. This line was outta line 2012-01-23 23:47:08 +07:00
Ghislain Seguin
9f3c58caf6 Moved the conditional define call within a document.write 2012-01-22 23:15:59 -08:00