Commit graph

604 commits

Author SHA1 Message Date
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