scottjehl
16c743ac39
In android 2.1 and 1.6, the split button anchor needed to be a sibling of the overall row button div in the LI. It seems this may be due to the event handlers bound to the div button, but I'm not entirely sure that's it. Either way, this workaround is straightforward and does not introduce issues in other browsers, so aside from the additional overhead involved in re-appending the links to the LIs, this fix is good to go. Fixes #874
2011-02-03 02:57:59 -05:00
John Bender
a79799e3b3
added step tests for keypress, removed data-step attribute check in favor of html5 range step attribute
2011-02-02 23:46:20 -08:00
John Bender
3a24aa4de6
Merge branch 'external-clear' of https://github.com/ajkovar/jquery-mobile into ajkovar-external-clear
2011-02-02 23:15:58 -08:00
scottjehl
67987925b4
property should not be defined in $.mobile.
2011-02-02 20:02:04 -05:00
Alex Kovar
e3a5dd5b09
fixed base undefined error in firefox
2011-02-02 13:10:40 -06:00
Alex Kovar
2754087fc7
externalize $.mobile.urlHistory.clear function
2011-02-02 12:58:27 -06:00
scottjehl
b464b1bcec
added a workaround for the selectmenu plugin's nativeMenu in Opera. Opera browsers improperly support opacity on select elements, either hiding the menu button but not its text (in Mini), or hiding the text but not the button. Either way, it makes our hidden-select trick look really bad, or unusable. This workaround adds a class to the select in Opera, and makes the native menu visible. In the case of a false positive, that's not a bad outcome. Fixes #897
2011-02-02 12:04:18 -05:00
scottjehl
110ba9e98e
remove active button class on touchmove. This could technically use some tolerance, but it goes back to active if the select ends up opening, so I think it's fine as is, without adding more logic. Credit goes to @davibe for the change.
2011-02-02 01:41:07 -05:00
Davide Bertola
08b17e71cb
Make button look pressed on touchstart event
2011-02-02 14:28:58 +08:00
John Bender
107fc25838
minor simplification to the on ready init
2011-02-01 22:04:05 -08:00
John Bender
0a7bdfd632
whitespace in mobile core
2011-02-01 22:04:05 -08:00
unknown
9caaa9cfde
Added ability to control if $.mobile will automatically load first page/pages on dom ready using $.mobile.autoInitialize.
2011-02-01 22:04:05 -08:00
scottjehl
675deb1282
Merge remote branch 'origin/master'
2011-02-02 00:59:59 -05:00
John Bender
4ddc5c7dd5
Merge branch 'changepagefix' of https://github.com/ajkovar/jquery-mobile into ajkovar-changepagefix
2011-02-01 21:36:24 -08:00
scottjehl
a763bade42
whitespace only
2011-02-02 00:33:53 -05:00
scottjehl
4a6ec54472
no default prevention is needed in native mode, as button is a div rather than an anchor. Also bound to change to remove the active class, which makes the native menu version's button state behave better in Opera Mobile 10.1
2011-02-02 00:25:12 -05:00
scottjehl
4023e1bf68
select menus also need blurring on transition.
2011-02-02 00:11:16 -05:00
scottjehl
cfceeced2e
wrapped if condition order
2011-02-02 00:02:59 -05:00
scottjehl
91ee3fbfca
Merge remote branch 'origin/master'
2011-02-01 21:45:33 -05:00
Jesse Streb
e15ce80702
moved the setTimeout within the transition to be in the success handler of the ajax response. We now wrap the transitionPages that we call after injecting the new page into the DOM within the setTimeout which fixes the same issue but limits to pages that are injected into the DOM and makes it more clear why we have the setTimeout
2011-02-01 21:44:23 -05:00
scottjehl
0648247260
further shielding of non-native actions from native menus, and styled select within a parent div rather than anchor, when native is used.
2011-02-01 21:03:41 -05:00
scottjehl
36301b70bf
optimizations to prevent unnecessary overhead of menu markup creation or manipulation when native select option is true.
2011-02-01 20:49:07 -05:00
Kin Blas
179061a4c9
Fix for Issue #678 - Select list offset above top of screen.
...
- Wait for the "silentscroll" event before setting focus. This avoids the "feature" where the browser will automatically offset rendering of a container to make sure whatever has focus is visible.
2011-02-01 17:14:15 -08:00
scottjehl
70f4acdd04
selectmenu: moved the list building logic over to use an arrays and joins to speed things up.
2011-02-01 19:28:30 -05:00
Alex Kovar
d4c8c3cee2
fix for $.mobile.urlHistory test
2011-02-01 14:08:19 -06:00
Alex Kovar
1eed03cf0c
Fixed issue with simultaneous page transitions. Closes gh-856
...
Conflicts:
js/jquery.mobile.navigation.js
tests/unit/navigation/navigation_transitions.js
2011-02-01 14:07:17 -06:00
scottjehl
aad8ac174a
Removed the extra ways to set nativeMenu option in select plugin. Now like other plugins, the option is both available through the plugin's options (nativeMenu) or through a data-attribute (data-native-menu), which is automated through the camelcase option name. Unit tests updated
2011-02-01 13:27:35 -05:00
scottjehl
3f938fd2f9
fixed bug where a preset data-url was being prefixed by the base url, rather than replacing the whole hash. Fixes #591
2011-02-01 12:32:02 -05:00
scottjehl
6855363375
changing this selector to be more specific prevents an error in IE 7 (and win mobile). Support is coming :)
2011-02-01 11:53:32 -05:00
scottjehl
5e6e6019eb
updated to jQuery 1.5
2011-02-01 11:37:00 -05:00
Mark Schuette
f640646877
added the ability to use the default behavior of links with data-ajax=false
2011-02-01 14:13:04 +08:00
chrisvire
d3376b7b5c
Allow for data-theme attribute on list item
2011-02-01 14:03:36 +08:00
scottjehl
a5c8f86d10
links with no href attribute will not throw an error when clicked. Fixes #932
2011-02-01 01:01:41 -05:00
scottjehl
da1c615c8a
inset listviews with a single item will get appropriate visual treatment. Fixes #469
2011-02-01 00:37:24 -05:00
scottjehl
eb2845d1dc
fixed one additional back button condition mentioned in issue #930 where the back button is added to a page that is directly linked with no hash. All navigation tests passing. https://github.com/jquery/jquery-mobile/issues/issue/930
2011-02-01 00:32:59 -05:00
scottjehl
6eefb23406
changed the name of urlHistory.listeningEnabled to urlHistory.ignoreNextHashChange. The name more accurately reflects the purpose of this internal toggle. Unit tests included. Also Fixes #930
2011-01-31 23:56:56 -05:00
scottjehl
35b1df81e7
changePage was firing more than once because hash listening was not disabled long enough to prevent listening of the resulting async hashchange event after setting location.hash. This change makes urlHistory.listeningEnabled act as an internal toggle (as it used to), so it is only meant for ignoring a single hashchange event. A future change might be appropriate to change its name to something more like "ignoreNextHashChange".
...
Unit test included.
Fixes #930
2011-01-31 23:47:01 -05:00
scottjehl
3162428558
added hashListeningEnabled global flag. This is meant as a global config option for end users to disable hashchange listening (as opposed to urlHistory.listeningEnabled, which is an internal toggle). Unit test included. Fixes #748
2011-01-31 23:25:36 -05:00
scottjehl
3b5b615451
whitespace and code style
2011-01-31 22:43:17 -05:00
scottjehl
d509404b72
Merge remote branch 'origin/master'
...
Conflicts:
js/jquery.mobile.navigation.js
2011-01-31 17:33:25 -05:00
scottjehl
b3a8230638
This commit includes simplifications to the hashchange event handling & changePage logic, which results in a few bug fixes and removal of some previous limitations. Details:
...
- jquery.mobile.core.js no longer creates pages from every page and dialog in the DOM automatically at domready. Instead, pages are created as they are referenced via changePage, which can speed up pageload in multi-page documents, and means local "dialogs" referenced via data-rel="dialog" no longer need a data-role="dialog" attribute when served.
- in changePage, "from" is now allowed to be undefined. This simplifies the logic involved in showing the first page, which never had a "from" page, and previously needed a custom pageChange workaround to accommodate that.
- The pageshow event is no longer used as a callback for returning false and preventing the $.mobile.activePage from being set to the newly shown page. In other words, a page always becomes $.mobile.activePage once its shown now (the only reason this was optional before was because of a dialog restriction that's no longer true)
- the hashchange event logic for showing a particular page is now greatly simplified. It either shows the page referenced in location.hash, or if there's no hash it changes to the first page in the dom. This means every pageshow (including the first one) now uses pageChange internally.
- the hashchange event listener is no longer disabled when ajaxEnabled == false. Doing this before prevented local non-ajax page navigation from working properly. To disable hashchange listening, use $.mobile.urlHistory.listeningEnabled. We might consider defining (or moving) this on the $.mobile hash later as well for easier access.
- The internal var $.mobile.startPage is now $.mobile.firstPage, because it's not necessarily the page you started on, but merely a reference to the first "page" in the dom.
- Back buttons are auto-added to every page after the first one you first visit (this includes generated pages, such as those in a multipage document or nested listviews). Keep in mind that a "back" button does not take the place of a standard "home" link, and when building an app with jQuery Mobile, it's good to make use of both (particularly on deep-linked pages). Fixes #908
2011-01-31 17:05:57 -05:00
John Bender
591593dd49
misplaced semicolon
2011-01-31 00:13:01 -08:00
adammessinger
cb4f540645
Fixes #900 - buttons with rel attribute set to external don't show active state
2011-01-30 23:43:53 -08:00
John Bender
8b5f083974
whitespace and missing semicolon in setTimeout for non webkit animationComplete
2011-01-30 22:03:30 -08:00
Alex Kovar
4830ac9e9b
tweak for animationComplete
2011-01-30 23:00:51 -06:00
Alex Kovar
62af59983f
made $.fn.animationComplete behave more consistently between webkit/non-webkit. Closes gh-918
2011-01-30 17:06:33 -06:00
scottjehl
2f9d1bce33
position loading message either center screen (if scrollTop supported), above active clicked button (if defined), or 100px off the top. Fixes #892
2011-01-30 13:34:45 -05:00
John Bender
badefe1ee1
whitespace and missing semicolon fix
2011-01-30 00:19:15 -08:00
scottjehl
29fbc9c3c5
removed the Position plugin and modified selectmenu to position its menu without it. Removes off about 3-4kb after minify.
2011-01-29 07:15:40 -08:00
scottjehl
58cb69788c
bound slider drag event handling to touch and mouse events, which allows us to support Opera Mobile and others. Fixes #852
2011-01-28 15:47:03 -08:00
scottjehl
b4c8e2f98e
moved search input clear buttons over to "tap" event
2011-01-28 15:20:56 -08:00
scottjehl
1b72203096
checks and radios no longer check when a scroll starts on top of them. Fixes #893
2011-01-28 14:39:58 -08:00
scottjehl
b10c5c04c2
don't destroy dialogs on close. Now same-page dialogs can be reopened after close, and selects don't need to unbind dialog change events to override the destroy.
2011-01-28 14:30:24 -08:00
John Bender
e5fd56985c
added global native select configuration, docs to follow. Also corrected selector error when reloading a lib in tests
2011-01-27 23:20:57 -08:00
John Bender
1afb3a08f0
whitespace corrections in core
2011-01-27 22:53:17 -08:00
John Bender
b1d356bfd7
Merge branch 'nativeselectmenu'
2011-01-27 09:50:40 -08:00
Jesse Streb
d3077b491c
[455] Am now setting the min-height of a page so that the address bar can always be hidden on a silent scroll. This helps our transitions feel smoother as the page does not jump down if the page is not taller then 100% of the window. On orientation change we also update this value.
2011-01-27 12:28:04 -05:00
Jesse Streb
378fb51225
[ #455 ] For the transitions we now have overflow: hidden in order to limit the flickering. We always scroll to the top before we start our transitions in order to make it scroll. The CSS changed to have overflow: hidden during transitions and have a height that is larger enough to keep the address bar hidden.
2011-01-27 12:28:04 -05:00
scottjehl
e2c66fad49
Merge remote branch 'origin/master'
2011-01-26 22:15:10 -08:00
John Bender
d94e25acd6
merge from origin selectmenu fixes
2011-01-26 21:35:00 -08:00
John Bender
b81248f238
fixed android select menu failure with a delay. I'm doubtful that this is the best solution to the problem but the cause was the click being passed through to the screen or the select menu itself a split second after opening. Open to alternatives. Fixes #873
2011-01-26 21:20:40 -08:00
scottjehl
9a492d06fd
allow form data to be passed to $.mobile.changePage as a query string or object.
2011-01-26 22:04:36 -05:00
scottjehl
61bee4e276
fixed issue with select menus not opening again after you close them.
2011-01-26 21:02:08 -05:00
scottjehl
d1976fa265
removed click handler on back button - used data-rel='back' instead.
2011-01-26 18:57:14 -05:00
scottjehl
fa2b1903de
only add a back button when there's a history entry to return to.
2011-01-26 17:56:20 -05:00
Kin Blas
63a82967fa
Temporary workaround for Issue 785 - jQM text input forces use of iOS auto-correction.
...
- Added code to enhanceControls() that sets the autocorrect and autocomplete attributes on all inputs of type="text" to "off". This basically disables the use of autocorrection on iOS.
- Modified the code in enhanceControls() to cache the form controls query to reduce the number of times we search for controls in the current page.
2011-01-26 14:31:47 -08:00
scottjehl
700ca984bb
finished up some navigation changes. Also added and documented a data-rel="back" attribute, which can be applied to links to enhance them to mimica the browser's back button (good for closing dialogs). In these changes, dialogs now create a history hash entry, and the back button works better for closing dialogs. Also, nested list deep-linking is restored after a recent regression. Tests in Navigation and Listview are passing. Fixes #885 . Fixes #866 .
2011-01-26 14:38:17 -05:00
scottjehl
2c6cc45ad0
incomplete, but close to fixing the dialog-create-history entry piece. Also includes fix for nested-listview deep linking regression.
2011-01-26 14:27:10 -05:00
John Bender
244e46b8ed
data-native attribute check for native select menus Fixes #847
2011-01-25 23:12:20 -08:00
John Bender
aa234961cc
whitespace correction on rebase fix
2011-01-25 22:50:55 -08:00
scottjehl
0cdf9df11c
added option for useNativeMenu. Should be updated so, when set, the custom menu markup is never created.
2011-01-25 22:43:53 -08:00
scottjehl
9ed13f86c8
hashchange event handler should still load the first url, even if Ajax is disabled. Fixes #879
2011-01-25 22:39:29 -05:00
John Bender
bc473f48a7
comments for added clarity on bindings
2011-01-24 23:55:52 -08:00
John Bender
0cdd401f3a
removed commented code from refactor
2011-01-24 23:54:22 -08:00
John Bender
23807769ac
refactor off slider to move value retrieval to closure for _create method
2011-01-24 23:53:17 -08:00
John Bender
442e4b19b0
updated slider refresh function with an extra param for preventing validation on its input Fixes #468
2011-01-24 23:38:50 -08:00
scottjehl
3df24fab6d
fixed a regression in safari where images wouldn't load properly because base was being set after html was appended.
2011-01-25 00:29:19 -05:00
scottjehl
5d5336d8b0
fixed firefox regression. check if base is set/supported before setting.
2011-01-24 23:56:53 -05:00
scottjehl
0ba9acfc33
added support for URL updating via a preset data-url on the page div when it is sent from the server.
...
If data-url is set on a page div when it returns from the server, it's value will be used to replace the url in the hash, and as the base url for future requests if it adds additional segments (such as a trailing slash). This will enable developers to work around the limitation of directory links requiring a trailing slash, and will also allow developers to specify a new url after a redirect occurs (such as after a login). Fixes #867
2011-01-24 19:35:45 -05:00
scottjehl
a5b8e42fc1
updated jQuery to 1.5rc1. This update includes Nokia support in jQuery core, which is getting closer in JQM itself.
2011-01-24 17:56:32 -05:00
scottjehl
80b0d9ef4b
Merge branch 'master' of github.com:jquery/jquery-mobile
2011-01-24 13:05:04 -05:00
scottjehl
4a9b374eea
make sure change events fire whenever custom checks/radios change.
2011-01-24 13:04:41 -05:00
Kin Blas
1dad50e536
Fix for the header/footer positioning problem, mentioned in issue 58, that is caused by the browser url/nav bar scrolling offscreen due to the silentScroll() call triggered when the document is first loaded.
...
- Modified silentScroll() to trigger a "silentscroll" event. This was necessary because programatically scrolling the window does not generate "scroll" events.
- Got rid of the hideAfterDelay() function that was not used.
- Added startShowTimer() and clearShowTimer() functions.
- Added event handlers for "resize" and "silentscroll" events. This causes headers/footers to be positioned properly as "scroll" and "orientationchange" events cause the visual viewport to resize.
Issues this fix causes:
- On some Android platforms, clicking in textfields/textareas trigger a "resize" event. This causes the footer to show up in the minimized visual viewport, right above the keyboard.
2011-01-24 07:11:19 -08:00
scottjehl
977e075ece
improved tap event and added a quick event logger page so we can get these neglected events in order.
2011-01-23 19:34:17 -05:00
scottjehl
2e6a396278
added ajaxEnabled option. ajaxLinksEnabled and ajaxFormsEnabled are deprecated and will be removed by 1.0. Fixes #851
2011-01-23 19:03:35 -05:00
scottjehl
2ebf659fbd
made sure linking to the same page from within a dialog closes the dialog.
2011-01-23 18:26:48 -05:00
scottjehl
be8eb3d0c6
deprecated data-back attribute on links in favor of data-direction="reverse". Updated docs and relevant demos.
2011-01-23 18:12:46 -05:00
scottjehl
9b57c46349
Refactored urlStack and updated dialog and page plugins to match. jQuery Mobile's internal history now attempts to follow the history menu when urls change from hashchange, even for changes that go multiple steps forward or back. The internal history stack is now pruned based on whether a user goes back and then changes direction, whereas before a back-button click would result in a pop off the history. Instead we now maintain an active index number in the history stack, which allows us to maintain references to transitions that are saved on pages reached through clicking the forward button as well. This fixes #636 .
...
In the process, some other small changes should be noted:
urlStack is now urlHistory, a hash of methods and properties used for history stack management (stack, activeIndex, getActive, getPrev, getNext, addNew, clearForward, and listening Enabled). All these are documented inline and exposed on $.mobile.urlHistory (I'm not sure these will be publicly documented, but just exposed internally for plugins for now).
$.changePage has two argument changes: the "back" argument is now called "reverse"; this results in no change from an end-user standpoint, but reflects the fact that it only reverses the direction of a transition without affecting the internal history stack, and second, a new argument at the end defines whether changePage was called from a hashChange which makes that url open to history menu guessing.
2011-01-23 17:33:36 -05:00
John Bender
b671753039
moved page above core in the makefile, build xml, and manifest under js. Fixes #619
2011-01-22 22:31:16 -08:00
scottjehl
9e4b0a484c
Overhauled path object and exposed it and the base object via $.mobile. Form and Link handlers now use the path methods internally. Unit tests adjusted, but more are needed to fully cover the path and base propeties and methods. Fixes #566 .
2011-01-22 17:42:07 -05:00
scottjehl
6fb50fd289
use inArray instead of indexOf. Fixes #828
2011-01-22 14:04:04 -05:00
scottjehl
fbb2fc2c60
lengthened timer for Android, and added a check to let through the same event type for double-taps.
2011-01-21 18:29:28 -05:00
scottjehl
aa0a61c407
followup on previous commit. made sure devices with both touch and mouse events work with either input type. Also fixed regression with radio inputs.
2011-01-21 18:13:02 -05:00
scottjehl
38c1c24e5d
moved check/uncheck event on label to touchend/mouseup. Fixes #753
2011-01-21 17:45:22 -05:00
scottjehl
a1cb31a2c7
navbar removes active state but doesn't apply new one. Now it does. Useful in js-generated links. Fixes #669
2011-01-21 16:20:33 -05:00
scottjehl
37f9680c0f
only the first image should be an icon/thumb. Fixes #699
2011-01-21 15:33:40 -05:00
John Bender
e5d2bf1b66
added target check to $.mobile.isExternalLink
2011-01-20 23:05:37 -08:00
John Bender
ffafa78e62
added tests for external links in dialogs, small refactor for dialogClickHandler function
2011-01-20 22:20:16 -08:00
scottjehl
52f86f2f9a
make sure first textnode of li is used in listview title, regardless of newline chars. Test included. Fixes #715
2011-01-20 17:48:44 -05:00
scottjehl
bfa6f6a3af
Merge remote branch 'origin/master'
2011-01-20 16:28:28 -05:00
scottjehl
48b69b7a71
loading message opens above offset of active button, when possible. This makes it visible on devices that don't support scrollTop (webOS, etc)
2011-01-20 16:28:23 -05:00
Kin Blas
e4042266fb
Fix for issue 841 - Persistent footers persist even when going to other pages that don't have footers or don't have footers with the same data-id.
...
This was a regression I caused with my previous checkin. The fix is to simply null out stickyFooter in the pagebeforeshow callback.
2011-01-20 12:51:28 -08:00
Kin Blas
161f5e6ae3
Removed jquery.js from js/index.php and updated all html doc/experiments/test files that incuded "js/" so that they also include jquery.js manually.
...
This makes our include model match the include model on the CDN, and allows devs to make use of mobileinit for debugging some of the samples since that must be set up after jquery.js, but before jquery-mobile.
2011-01-20 11:26:12 -08:00
John Bender
8a5060de13
fixed issue with dialog click handler breaking transitions on external links Fixes #642
2011-01-19 23:48:30 -08:00
John Bender
dcf9a19c31
whitespace issues in mobile core
2011-01-19 21:43:36 -08:00
scottjehl
f85e4c916b
small workaround to get media query function to work on Nokia
2011-01-19 16:35:15 -05:00
Kin Blas
02c9264f0d
Fix for issue 613 - Jquery Mobile ignores original 'base' tag defined in HTML
...
- Fixed baseTagTest() in jquery.mobile.support.js, so that it uses any pre-existing base tag for testing. This fixes the bug on Webkit (Safari) where the relative paths for links were being resolved/expressed with the document path instead of the original base path.
- Modified the base code in jquery.mobile.navigation.js so that it uses the initial path of a pre-existing base tag, instead of always using the document path. This means that a document with a URL such as:
http://foo.com/a/b/c#docs/pages/index.html
That uses a base tag like:
<base href="http://foo.com/bar/ ">
Will resolve properly:
http://foo.com/bar/docs/pages/index.html
so the mobile page gets loaded properly.
- Reduced the path.get() function down to a couple of regexp replace() calls.
2011-01-18 09:18:22 -08:00
John Bender
b9bfa41846
poorly written comment
2011-01-15 23:36:59 -08:00
John Bender
f850311935
force previously created dialog for long menus. Fixes #807
2011-01-15 22:47:44 -08:00
John Bender
d4f4d474d1
whitespace cleanup for mobile forms select
2011-01-15 22:44:00 -08:00
Kin Blas
fde3aaaad5
Merge branch 'master' of https://github.com/jquery/jquery-mobile
2011-01-14 13:40:04 -08:00
Kin Blas
cd344f0440
Fix for Issue 811 - All resolution breakpoint classes added to <html> element, throws off label and form element flow on narrow screens.
...
- We were firing off our fake orientationchange event before the viewport meta tag is injected. This causes us to get the default document width for the device which is much wider than the actual device-width. We now fire off the event after the dom ready event fires.
2011-01-14 13:37:47 -08:00
maggiewachs
b6ec29a7e5
Fixed bug 676 where the switch toggle (slider) wasn't updating on select change:
...
https://github.com/jquery/jquery-mobile/issues/labels/5%20-%20Critical#issue/676
2011-01-14 16:06:18 -05:00
scottjehl
7cf5aea8e3
fixed up those busted select menu headers. Fixes #810
2011-01-14 15:49:21 -05:00
scottjehl
3b92410ff3
some additional changes to make scrolling from a select button work ok.
2011-01-14 15:16:03 -05:00
scottjehl
288fe45ff1
added option for useNativeMenu. Should be updated so, when set, the custom menu markup is never created.
2011-01-14 13:02:24 -05:00
Pavel Karoukin
5b4c23b67d
add data-url to dialog 'pages' as well
2011-01-14 23:44:25 +08:00
Pavel Karoukin
794adfeca0
Click on form in dialog prevents exit from dialog
2011-01-14 23:44:24 +08:00
scottjehl
87c7b57da9
allow scroll to work when touch start begins on a select button. Fixes #804
2011-01-14 10:35:26 -05:00
Jonathan Hinkle
0413542753
rename selectmenu's exposed "options" to "optionElems" to avoid conflict with existing variable containing configuration options
2011-01-14 22:48:51 +08:00
ehynds
9e6a3df6b1
make sure the options cache is updated after a refresh, and that the click handler reads from this cache.
2011-01-12 22:01:50 +08:00
Jesse Streb
924c2c3e9b
updated select to no longer wrap the input element as it is already jQuery object. Thanks ehynds.
2011-01-12 08:01:37 +08:00
Jesse Streb
5b238ea1ce
https://github.com/jquery/jquery-mobile/issues#issue/578 Updated to use the selector that Scott suggested in order to make checkboxes not dissappear. One issue I noticed is that the page still transitions to the 'new' page even though it is really the same page. I have a fix for this that will post in a separate drop.
2011-01-12 08:01:36 +08:00
D. Elmo Peele
1a21b0581c
Avoid triggering a 'tap' event if the event target on touchStop differs from the original touchStart target.
2011-01-12 07:47:17 +08:00
Kin Blas
5617d0c8d3
Merge branch 'delay_duplicateCachedPage' of https://github.com/medovob/jquery-mobile into pull662
...
Had to fix merge conflicts in:
js/jquery.mobile.navigation.js
2011-01-11 14:12:07 -08:00
ehynds
95819c8c60
same fix in a few other places
2011-01-12 05:30:56 +08:00
ehynds
b71cc32d78
"this" in this context is already a jquery object
2011-01-12 05:30:56 +08:00
scottjehl
44d6064fb6
Merge branch 'no_enhance_for_hidden' of https://github.com/hynkle/jquery-mobile into hynkle-no_enhance_for_hidden
2011-01-11 13:42:30 -05:00
Kin Blas
8a70cdb3de
Initial patch from pull 672 had incorrect check for backbtn data value. Changed it from $this.data("backbtn") === false to $this.data("backbtn") !== false to match the original logic that was in place prior to the patch.
...
Original patch missed a nobackbtn reference in jquery.mobile.forms.select.js.
2011-01-11 09:34:50 -08:00
Kin Blas
8050fb0d01
Merge branch 'master' of https://github.com/walkingeyerobot/jquery-mobile into pull672
2011-01-11 09:04:32 -08:00
John Bender
96d941ebe9
added the ability to disable ajax forms with data-ajax=false, attribute up for debate, Fixes #519
2011-01-08 23:47:07 -08:00
Jonathan Hinkle
6b799dad71
added 'hidden' to the types of inputs not to be enhanced by textinput
2011-01-07 12:33:59 -05:00
Kin Blas
c910f4b01f
Fix for issues:
...
470 - Multiple Footers when using data-position=fixed and data-id=[someid]
773 - The fixHeaderFooter pagebeforeshow live function is not triggered for the initial page shown
- Removed the findStickyFooter() function.
- Reworked the logic in the pagebeforeshow live function. We now add a ui-sticky-footer class to the sticky footer element. This will guarantee that we find the sticky footer if it already exists. We may at some point want to consider the use of ids on the sticky footers so that we don't have to crawl the entire document.
- Moved the live pagebeforeshow and pageshow calls outside of the DOMReady function so that they get registered as soon as the plugin is loaded. This guarantees that they will be triggered when the core plugin's DOMReady function fires.
- This fix makes issue/pull-request 765 obsolete.
2011-01-07 01:07:22 -08:00
maggiewachs
926982b4f0
Fixed bug 595, where form elements were not properly inheriting the theme. Form controls need to be enhanced after the page containers so they'll pick up on the containers' theme classes.
2011-01-05 11:55:41 -05:00
John Bender
3a9652c9cc
slider switch keyboard access tests Fixes #632
2010-12-26 23:09:11 -08:00
John Bender
06b83ad67a
slider switch now keyboard enabled
2010-12-26 17:45:25 -08:00
scottjehl
53392bc7ca
Merge branch 'issue_723' of https://github.com/ehynds/jquery-mobile into ehynds-issue_723
2010-12-23 14:34:17 -05:00
ehynds
edfafe0c01
if the close icon in a full-page select is clicked on, fire the selectmenu close handler instead of the dialog close handler
2010-12-23 13:19:34 -05:00
scottjehl
e9b076bcc0
Merge branch 'master' of https://github.com/louy/jquery-mobile into louy-master
2010-12-23 09:20:55 -05:00
John Bender
b2d58c1f30
slider keypress tests, comments, and style addition to navigation test page
2010-12-22 23:18:14 -08:00
John Bender
39729becd6
standard keyboard interaction working with slider, tests to come
2010-12-22 22:40:54 -08:00
John Bender
8ec3ae594d
added keyCodes, Home and End working for range slider
2010-12-22 16:30:55 -08:00
Louy Alakkad
4dcb65fc7a
fixing spaces
2010-12-22 07:53:07 -08:00
Louy Alakkad
59e8ee3137
Matching the jQuery code style guidelines.
2010-12-22 07:52:08 -08:00
scottjehl
fd821b7440
Merge branch 'select_multi' of https://github.com/ehynds/jquery-mobile into ehynds-select_multi
2010-12-22 10:05:40 -05:00
louy
ba99290480
Merge branch 'master' of git://github.com/jquery/jquery-mobile
2010-12-18 16:06:55 +02:00
louy
d435979daf
Allow developer to apply themes on checkboxes/radio-buttons.
2010-12-18 15:20:15 +02:00
John Bender
b8babd1003
removed console log and added test for default transition
2010-12-16 19:12:58 -08:00
John Bender
7ffec259c5
added tests for explicit transition on back
2010-12-16 18:21:46 -08:00
John Bender
67aed1320b
prefer explicit transition even when the url is popped of the stack Fixes #627
2010-12-16 18:20:17 -08:00
jzaefferer
e70c17d625
Extend nested listviews to accept more then just the title in parent list item. Currently requires predefined anchor to be present, based on discussion in ticket. Extended lists-nested.html to test both variants. Fixes #253 - only text nodes allowed in nested listview
2010-12-15 15:54:13 +01:00
Mitch Foley
ad757718c4
actually reversing backbtn logic this time.
2010-12-13 11:11:21 -05:00
Mitch Foley
df3bc91f80
renaming nobackbtn to backbtn.
2010-12-13 10:54:26 -05:00
John Bender
95ef08b269
perspective class only added on flip page transition or any transition added to the perspectiveTransitions local var in the transitionPages function Fixes #568
2010-12-13 02:21:40 -08:00
scottjehl
9420083a7b
quick update to set the base.href back to the starting path, just in case, as some browsers may retain the base href after the element is removed from the DOM. Explained better here: b2add677f0
2010-12-11 13:50:07 -05:00
Kin Blas
3062199ac6
Some tweaks to kptdobe's patch from:
...
https://github.com/jquery/jquery-mobile/pull/649
- Changed hideOnTouchEnabed to touchToggleEnabled.
- Fixed problem that would allow the toolbars to show on touchstop, if the starting state was "inline" to begin with.
- Moved the touchToggleEnabled checks in touchstart/touchstop so that they wrap the entire code in the function. We don't want to do any work if we don't need to.
- Removed the forced hide() call in touchstart.
Added the missing fadeout animation reference inthe fade.in transition rule.
2010-12-10 10:17:16 -08:00
Richard Stutfield
0a87b59a04
Navigation: delay removal of duplicateCachedPage
2010-12-10 12:27:14 +00:00
kptdobe
9c3762978e
Allow to disable headers hide on touch behavior
2010-12-09 15:02:45 +01:00
John Bender
553b58567f
added protection for nested links to ui-bar selector with tests
2010-12-09 00:16:48 -08:00
John Bender
970f46c5e0
header and footer links will now remain unstyled, Fixes #524
2010-12-08 22:16:45 -08:00
ehynds
c982b93794
fixed a bug in single selects where clicking on a selected option would un-select it. this logic should only apply to multiple selects.
2010-12-08 15:45:23 -05:00
Kin Blas
4882c068b0
Modified loadComplete() so that it always fires off the "show" event. The idea here is that calling preventDefault() on a "hide" event shouldn't prevent the "show" event from being dispatched. Calling preventDefault() on the "show" event still prevents the "to" page from becoming the active page.
...
Removed redundant target delcaration in the <a> live click callback.
2010-12-08 12:40:21 -08:00
ehynds
1d2ef4f606
removed console.log statement
2010-12-08 09:43:24 -05:00
ehynds
43a6a3bb1b
refactored header create logic to be consistent with the rest of the widget; fixed bug when using optgroups within a multiple select
2010-12-08 09:41:00 -05:00
ehynds
94ac0a88be
fix placeholder logic
2010-12-07 18:05:26 -05:00
ehynds
9e30e54159
removed extraneous comment
2010-12-07 15:49:54 -05:00
ehynds
8eb553f884
multiple select functionality
2010-12-07 15:45:20 -05:00
scottjehl
80d56e655b
Changed page navigation scripting to use data-url attributes instead of IDs for storing page URLs. This fixes a number of issues, most importantly #477 , which exposed a conflict between jQuery's selector engine that would result in un-enhanced pages whenever linking between two pages in the same directory.
...
The shift away from interal ID attribute usage also allows users to bind page events (pagecreate, pagebeforecreate) to a page div by its ID, which was a frequent cause of confusion when it didn't work as expected in former versions of the framework.
Seemingly unrelated: these commits allow you to specify data-role="dialog" in multipage and single page templates. In multipage templates, the role must be on the page (a link with data-rel alone will not work in multi-page). This addresses issue number 464, but may need further testing for obscure scenarios.
Fixes #477 (Pages are not enhanced when linking to a filename without a path)
Fixes #493 (Click the same link twice -> blank page)
Fixes #513 (closing dialog + returning to the same dialog)
Fixes #550 (changePage() not updating hash for internal pages - breaks )
Fixes #464 (Dialogs don't work within multi-pages)
Fixes #633 (Recent change to prevent same-page requests breaks select menu close button)
Fixes #599 (Page ids & page specific events)
Fixes #634 (After a bad page request, base url is not reset to current path)
booya.
2010-12-07 12:05:10 -05:00
scottjehl
91a5b8c098
Changed the way submit buttons work. Now, form input/button elements are appended to a div-based "button", invisibly filling its width and height. The user now interacts directly with the native control, rather than having to trigger a click from another anchor (which formerly prevented some native submit event handling from working).
...
A workaround is still included to ensure the input's name/value is submitted along with the form when it's not a type=reset, as this is necessary for the button data to appear in the serialized form data.
2010-12-06 11:40:28 -05:00
scottjehl
2931fffb91
blur the active/focused element on changepage sooner. Thx @goulvench
2010-12-04 14:46:41 -05:00
scottjehl
74ebc360ca
make sure hashchange event never causes additional hash changes to occur when responding with a page change
2010-12-04 13:13:55 -05:00
Jesse Streb
b725ff8f6a
https://github.com/jquery/jquery-mobile/issues#issue/493 If changePage is called with to parameter that matches the current page we simply return out of the function
2010-12-04 13:13:55 -05:00
scottjehl
b01478a5e7
make sure forms can submit via ajax AND pass the clicked button's name/value in the serialized data. Fixes #605
2010-12-03 13:08:08 -05:00
scottjehl
6dce87a2ac
hide placeholder options in selectmenu overlays. Fixes #607
2010-12-03 11:32:48 -05:00
ehynds
68150b5bec
adding optgroup support. Fixes #567
2010-12-03 10:57:21 -05:00
ehynds
8062bf0a80
finish merge of select_event_bubbling or whatever i called that branch
2010-12-03 10:47:25 -05:00
ehynds
e2eb9e9298
add disabled option support. fixes #350
2010-12-03 22:30:08 +08:00
ehynds
12f011b7cc
swap return false for event.preventDefault
2010-12-03 07:40:58 -05:00
scottjehl
9423bc199d
fixed issue with listview corner rounding when listviews have only a couple items.
2010-12-01 16:35:17 -05:00
scottjehl
ce5ea07780
don't set hash if back is true. Fixes #582
2010-12-01 12:41:27 -05:00
scottjehl
54568271d9
pageshow and pagehide now fire after the location hash is updated. Fixes #583
2010-12-01 09:52:07 -05:00
scottjehl
17f0340a0a
improved keepNative option so that it's additive on top of data-role=none and data-role=nojs.
2010-12-01 09:52:07 -05:00
scottjehl
efe4c38ad4
added the keepNative option to page plugin, which defaults to this selector "[data-role='none'], .ui-nojs". Add the attribute data-role="none" to any form control or anchor and it will not be auto-enhanced. Thx @pharaoh for the syntax suggestion. Fixes #544 , Fixes #528 , Fixes #529
2010-11-30 18:18:53 -05:00
scottjehl
419787affe
make sure submit button name/value is submitted with form values. Fixes #551
2010-11-29 10:09:26 -05:00
scottjehl
d56380fc22
refactor of jquery.mobile.core.js. Moved all of the page navigation model related scripting into jquery.mobile.navigation.js. This includes event handling for click, submit, and hashchange, all of the base tag management, path management, active link class handling, etc. All existing core tests are passing, and all demos work as expected. More tests are needed in core, and this refactor should make those tests easier to write.
2010-11-25 06:13:51 -05:00
scottjehl
3cb0e3c2d0
fixed typo in propExists. thx @johnbender
2010-11-22 15:48:14 -05:00
scottjehl
a0596434bc
moved the ID creation string escape function from core to listview. No other plugins use it.
2010-11-19 23:21:16 -05:00
scottjehl
ba5fea7f1e
removed theme option from fieldcontain. ish didn't make no sense
2010-11-19 22:52:05 -05:00
scottjehl
93179f9a3d
updated comment about license to match other jQuery projects - MIT "or" GPL
2010-11-19 22:47:47 -05:00
scottjehl
6711e11e97
made sure collapsible doesn't cause the address bar to show up on ios when clicked. Fixes #500
2010-11-19 21:32:17 -05:00
scottjehl
2ed21499d1
made sure address bar doesn't appear when opening select menu
2010-11-19 21:28:38 -05:00
scottjehl
d1c839613d
made sure corners are removed on list items that used to be first or last when new items are appended. Fixes #400
2010-11-19 21:07:34 -05:00
scottjehl
a731e48e68
made sure select button gets active button class while open
2010-11-19 19:19:51 -05:00
scottjehl
76f5c26624
cleaned up css styles - ui-selectmenu instead of ui-listview
2010-11-19 19:15:48 -05:00
scottjehl
b2e306c667
removed theme coloring for selectmenu screen when in overlay mode.
2010-11-19 17:32:09 -05:00
scottjehl
b56939faf7
updated selectmenu to use position plugin for overlay version
2010-11-19 17:31:20 -05:00
scottjehl
23ea598b83
added jquery ui position plugin
2010-11-19 17:30:22 -05:00
John Bender
d0cca83be8
tests for default resolution break points, some missing semicolons, and element reference in each loop
2010-11-19 01:20:55 -08:00
scottjehl
ea8545928e
shifted the order a little
2010-11-18 22:52:35 -05:00
scottjehl
9ff89b7115
renamed jquery.mobile.js jquery.mobile.core.js. updated build files, etc to match
2010-11-18 22:50:33 -05:00
scottjehl
909a0d0f08
removed transitions property from the configuration and updated docs to match.
2010-11-18 22:18:20 -05:00
scottjehl
e7269f4df2
moved orientationchange event trigger over to media js file. Cleaned up event bindings where orientation and breakpoint classes are applied.
2010-11-17 11:55:15 -05:00
scottjehl
82c48b2311
sorted breakpoints ascending after addition
2010-11-17 11:55:15 -05:00
scottjehl
2ade27bdcf
removed old manifest files - index.php is now used in their place.
2010-11-17 11:55:15 -05:00
scottjehl
28a10ec74d
Moved all of the media query and responsive design related scripting to jquery.mobile.media.js. This plugin can run independent of mobile core, with the exception that it does bind to orientationchange, which is defined in the events js. Fixes #388
2010-11-17 11:55:15 -05:00
scottjehl
5e90786374
added enable and disable methods to form buttons
2010-11-17 10:27:35 -05:00
Yuki KODAMA
2dea6cd721
implemented 'refresh' method for slider widget
2010-11-17 19:34:46 +09:00
Yuki KODAMA
d1e37647b8
added 'enable' and 'disable' methods to slider widget
2010-11-17 19:34:08 +09:00
scottjehl
2b226d05ce
make sure pop'd page is defined before using.
2010-11-16 12:18:42 -05:00
Richard Stutfield
6603c84ef5
remove empty line
2010-11-16 22:56:49 +08:00
Richard Stutfield
d7a9d832db
Fix form submit within a dialog.
2010-11-16 22:56:48 +08:00
Richard Stutfield
791f7aa61e
Dialog: fixed links not working in dialogs. Fixed #448 - Dialog: clicking link in dialog closes dialog and doesn't do anything else
2010-11-16 22:56:48 +08:00
scottjehl
14b4c9a167
moved $.media function over to $.mobile object
2010-11-11 21:45:17 -05:00
scottjehl
e89ebc126e
Input types can now degrade to alternate types, instead of text. First such example is type=range degrades to type=number. Fixes issue #415 , Fixes #404
2010-11-11 21:43:01 -05:00
John Resig
573db6ab28
Just compare the nodes directly to each other.
2010-11-11 19:38:20 -05:00
John Resig
67174b8966
Updating jQuery to 1.4.4.
2010-11-11 19:21:03 -05:00
Kin Blas
1b12c54bcf
Merge branch 'master' of https://github.com/jquery/jquery-mobile
2010-11-11 16:16:03 -08:00
Kin Blas
a77ca291e6
Fixed 59 - Fixed footer is anchored to the end of the page content instead of the view port.
...
- If content is less than the view port height, the footer is always anchored at the bottom of the view port.
- If the content is greater in height than the view port, then in inline mode itrests in flow, and in "fixed" mode it snaps to the bottom of the view port.
2010-11-11 16:08:45 -08:00
scottjehl
7a37d2507d
fixed error in selectmenu close function
2010-11-11 19:01:02 -05:00
scottjehl
d3a0d33791
fixed up grids and navbar again - this time to automate the column count to number of children, or 'a' when greater than 5. data-grid attribute can be set to any grid letter to trump the automated counting.
2010-11-11 17:33:07 -05:00
scottjehl
78f342b5e0
fixed up the navbar and grid plugin logic. now supports up to 5 cols
2010-11-11 17:17:45 -05:00
scottjehl
5aa980fdb4
fixed a bug with icon positioning
2010-11-11 17:17:45 -05:00
John Resig
c9a34f1da2
Add versioning information to the headers of the CSS and JS files.
2010-11-11 17:02:45 -05:00
Kin Blas
dfa1a689a4
Fixed 432 - Fullscreen positioning don't work iPhone/Android/Desktop
...
- $.mobile.activePage isn't being set till *AFTER* the "pageshow" notification, so pass in the page from our pageshow callback into the show() method.
- Also added missing getOffsetTop() call that I missed in my previous checkin.
2010-11-11 13:39:54 -08:00
scottjehl
6502377d57
just comments
2010-11-11 15:08:57 -05:00
scottjehl
b7b553da84
missed a few files in that last commit.
2010-11-11 15:08:48 -05:00
scottjehl
055bf14e3f
moved changePage, pageLoading, and silentScroll methods to $.mobile obj.
2010-11-11 15:03:40 -05:00
scottjehl
30c8a4cd5e
removed $.mobile.headExtras - useless
2010-11-11 13:38:05 -05:00
scottjehl
d498e20aca
typo on the data-iconpos check
2010-11-11 13:33:19 -05:00
scottjehl
25327445e0
null rather than undefined. woops
2010-11-11 13:33:19 -05:00
Kin Blas
1261fbc828
Bring iPad iOS 3.2.1 up to par with other platforms in terms of footer positioning.
2010-11-11 09:27:11 -08:00
scottjehl
f3c9716b52
extend rather than define
2010-11-11 11:28:02 -05:00
scottjehl
a24196e550
dolla dolla bills y'all.
...
Fixes #126 , Fixes #346
2010-11-11 10:50:28 -05:00
scottjehl
aca0062ac0
workaround that seems to get selects returning to their proper place after making a selection. Needs tuning, but works for now.
2010-11-11 00:16:54 -05:00
scottjehl
dab3cbee34
changed to null for allowing override through data-theme
2010-11-10 23:58:38 -05:00
scottjehl
3a3953cd3f
made sure text inputs / areas worked with data-theme
2010-11-10 23:54:01 -05:00
scottjehl
d03f3c6a33
nested lists were getting way small. This made em stop.
2010-11-10 23:50:14 -05:00
scottjehl
e8bd78bd27
fixed theming so data-theme and data-track-theme attrs work
2010-11-10 23:40:09 -05:00
scottjehl
0702e26221
added menuPageTheme and overlayTheme options. overlayTheme defaults to "a" to use the black stroke.
2010-11-10 23:39:48 -05:00
scottjehl
563169def9
made sure data-icon attrs work on radio and checks. Fixes #423 , Fixes #424
2010-11-10 23:19:41 -05:00
scottjehl
bf3730550f
used null where appropriate in options
2010-11-10 23:08:22 -05:00
scottjehl
049afd4568
improved defaults and added a demo page showing that all button data attrs work on selects too
2010-11-10 23:04:10 -05:00
scottjehl
532c918a26
updated data attribute support
2010-11-10 22:54:57 -05:00
scottjehl
91f287b3c6
improved enable/disable implementation
2010-11-10 22:48:31 -05:00
scottjehl
679094621f
changed to button reference
2010-11-10 22:43:30 -05:00
scottjehl
691752afd2
added aria-disabled attrs
2010-11-10 22:42:50 -05:00
scottjehl
129b68741f
moved menu building logic into _rebuild method, which is called by refresh if the option length is different than the list length (or if a true argument is passed to refresh(). Also moved mousedown events to "click", which dramatically improves keyboard navigation.
2010-11-10 22:31:05 -05:00
scottjehl
5716b89097
refactored select menu a bit to use new open and close methods
2010-11-10 21:40:20 -05:00
scottjehl
cc8c05091d
changed transition to pop and make sure history change is false
2010-11-10 19:13:36 -05:00
scottjehl
b1bded6dde
changed hideBrowserChrome function to "silentScroll". Scrolls to a particular location while disabling scroll event listening.
...
Function accepts a Y positioning argument, or defaults to 0 if undefined.
Now page transitions cache their previous scroll position when leaving, and that position will be remembered when revisting that page.
This change also includes a fix for webOS to use this new feature and set the previous scroll to the location of the clicked selectmenu (so after using the select, it'll scroll back to its location, even though webOS doesn't support scrolltop)
Fixes #355
2010-11-10 19:06:57 -05:00