Commit graph

87 commits

Author SHA1 Message Date
scottjehl
c45b0e3560 make sure "to" arg is an object, and has a url property before setting isFormRequest to true.
Fixes #377
2010-11-04 09:56:04 -04:00
scottjehl
3cc1c76d9d improved check for activePageLink existence 2010-11-04 09:56:04 -04:00
Kin Blas
bb5708e543 Some tweaks to make page scrolling faster.
- Prevent the fixed header/footer code from traversing the entire document for each touchstart, touchend and scrollstart event.

- Make sure $.activePage is initialized with the startPage.
2010-11-04 00:27:21 -07:00
scottjehl
ea12c75940 Make sure that Ajax form submissions (both get and post) always make a new request, even if it's identical to a previous submission. When a duplicate cached result page is present, it'll be removed from the DOM after the page change is complete . Thanks @medovob for the ideas and feature request. Fixes #368, Fixes #366 2010-11-03 22:01:01 -04:00
scottjehl
fae3a93f26 remove active link class before leaving to an external page. Fixes #375 2010-11-03 18:56:21 -04:00
scottjehl
4036aa97e9 added an forceRemoval argument to make sure active states are removed when a page load error occurs. Fixes #364 2010-11-03 12:20:44 -04:00
scottjehl
f66047f410 added class 'ui-mobile-viewport-transitioning' to page parent container during transitions, and applied css to give perspective and proper dimension to the container and child pages. Also set overflow to hidden.
Fixes #347
2010-11-02 16:29:12 -04:00
scottjehl
edc1b81ba4 added ui-mobile-viewport class to parent of page element ( body in most cases). Updated css to style this class instead of body 2010-11-02 16:00:23 -04:00
scottjehl
52f834cb8f post requests update the hash with url only - but no params 2010-11-02 01:23:27 -04:00
scottjehl
fa794ca0ee made sure external form actions are submitted through http 2010-11-02 00:57:27 -04:00
scottjehl
73e006d0e6 fixed a bug in relative url handling of form submissions 2010-11-02 00:48:46 -04:00
scottjehl
5e5f9387bf implemented simple automated form submission handling for get and post requests. added demo page which includes more information about how it works. 2010-11-01 23:56:42 -04:00
scottjehl
1110f78659 additional normalization to urls for getting base url - now better accommodates starting urls that contain a filename 2010-11-01 21:28:10 -04:00
scottjehl
4f908e2c22 fixed closure arg - jQuery should have been $ 2010-11-01 14:34:39 -04:00
Jeffrey Way
aa4ff18e22 Small improvement to keep from querying the DOM more than once for the data-role=pages elements. 2010-10-29 02:21:24 +08:00
scottjehl
c8d29fb6b2 added check to make sure active link isn't in the new activepage (such as when it's appended to the new page for persistence), before removing class 2010-10-27 21:57:37 -04:00
scottjehl
77b1c3a758 moved line where # is removed to prevent base url prefixing on local anchor links 2010-10-27 16:56:03 -04:00
scottjehl
4c2a9591dc moved active class removal code into function - now called after ajax error as well as successful page change 2010-10-27 16:52:53 -04:00
scottjehl
096467e4eb made sure local # urls go through the regular page nav path, and only update the hash on success 2010-10-27 16:46:51 -04:00
scottjehl
d42aace51c removed a few chars from condition. Thx @jeffreyway for suggestions on the last few commits. 2010-10-27 16:27:10 -04:00
scottjehl
d26877fc22 used cached version of $this 2010-10-27 16:22:40 -04:00
scottjehl
f84daa9cd3 removed nullLink var 2010-10-27 16:21:27 -04:00
scottjehl
86f2d1f90a updated regexp to test for protocol or # at beginning of url. 2010-10-27 16:13:11 -04:00
scottjehl
07108b8809 simplified attr get/check 2010-10-27 15:00:56 -04:00
scottjehl
a382295724 removed a console.log 2010-10-25 11:06:43 -04:00
scottjehl
f12872c783 add/remove active class on clicked link. 2010-10-25 11:06:20 -04:00
scottjehl
4d3020d414 added px suffix to all media-min/max classes. Updated CSS usage to match. 2010-10-25 10:45:30 -04:00
scottjehl
a601db164d fixed typo in where the blank space was added. 2010-10-25 10:31:36 -04:00
scottjehl
13db7886df made sure empty min/max breakpoint classes aren't added 2010-10-24 09:43:34 -04:00
scottjehl
d7d43db120 made default breakpoints non-overrideable and exposed function $.mobile.addResolutionBreakpoints (accepts number or array of numbers) which can be used to add widths to be used in min/max media classes on HTML element. 2010-10-24 09:39:21 -04:00
scottjehl
0dcb2f2971 whitespace 2010-10-24 09:13:33 -04:00
scottjehl
e736caebfe Removed the ajaxClick function and moved its logic into the live click event handler, where it is now refactored and simplified. Thx to Jeffrey Way for ideas that went into this refactor.
Also, clicks that are triggered on anchors will now be able to make a new http request, which improves listview behavior when clicking LIs that resolve to external urls.

Included in commit is a new demo/test page with various link types to make sure they behave as expected.

Fixes #272, Fixes #264
2010-10-23 17:24:06 -04:00
scottjehl
6d54740f41 set max-width breakpoint classes as well. 2010-10-22 14:46:27 -04:00
scottjehl
38eb8aecc7 added - to prefix 2010-10-22 14:46:27 -04:00
scottjehl
e0f9c24b94 should have been minwidth prefixes, and now adding all that apply, rather than just the greatest. 2010-10-22 14:46:26 -04:00
scottjehl
732b66057a resize and orientationchange now auto-add maxwidth classes to HTML element for common width breakpoints (defaults: 320,480,768,1024), which can be used in css targeting in place of media queries (for shorthand, and more importantly, to support IE, which may be opted-in to A support). 2010-10-22 13:58:08 -04:00
scottjehl
70bba7064a Added a support test $.support.dynamicBaseTag and workaround for browsers that don't support dynamically updating BASE tag (Firefox is the only one I've seen so far. In those browsers, when a new page is fetched, any elements with href and src attributes will have their attribute prefixed with a proper base url (if they don't already start with an external site http address, "/", "#", or any protocol such as "mailto:, etc).
In the process, the BASE element and related functions are only implemented if that support is true, and BASE urls now use a full URL path when set, to avoid issues with browsers that may need that.

Fixes #263, Fixes #221
2010-10-22 12:31:25 -04:00
scottjehl
e71cb716a2 Merge branch 'master' of github.com:jquery/jquery-mobile
Conflicts:
	js/jquery.mobile.js
2010-10-21 16:47:32 -04:00
scottjehl
5ad3d04084 several changes that allow for changing pages without hash changes:
- allowed prevention of hash listening during a particular hash change
- allowed $.activePage to remain set on previous page when an untracked page is open (return pageshow event false to use this feature)
- moved setting and resetting to base urls and made sure they update at the right moment for both new pages and those previously visited.
- changePage now accepts an array as first argument, allowing you to specify both [from,to] pages, whereas non-array types would refer to the "to" page, assuming "from" should be the currently viewed page
- error requests never generate a hash change now
- edited the ajax error to appear in the right location when scrolled

Essentially, plugins can now create page changes that are not tracked in history, which is a dialog critical bug.
2010-10-21 16:28:17 -04:00
John Resig
89a5f47065 Updated some queries to make sure more of them hit querySelectorAll/matchesSelector. 2010-10-21 14:30:42 -04:00
scottjehl
06e6ceb519 moved $activePage to $.activePage, so it's exposed for external plugins 2010-10-21 14:04:47 -04:00
scottjehl
b8cf201a88 ajaxClick only updates the hash if the clicked element doesn't match the new unHashedSelectors var. So far, this only includes [data-rel=dialog] 2010-10-21 13:16:48 -04:00
scottjehl
0d8956cf0c big refactor of hashchange event handler - moved logic over to changePage function. 2010-10-21 13:11:46 -04:00
scottjehl
b15b9153a4 changed ajax response injection to avoid filtering-out script elements that are included in the page div. Fixes #145 2010-10-20 18:32:00 -04:00
scottjehl
b211de4bb3 updated triggered events to pagebeforeshow / pagebeforehide 2010-10-20 16:01:38 -04:00
scottjehl
73be0bb64b removed extra $ causing error in direct-url scenarios 2010-10-20 14:20:38 -04:00
scottjehl
33052b7349 expose after domready 2010-10-20 12:48:05 -04:00
scottjehl
b27e9e6d51 exposed pageContainer via $.pageContainer, for other plugins to append 2010-10-20 12:00:18 -04:00
scottjehl
863e971cd9 created $pageContainer reference - for appending pages. Fixes #260 2010-10-20 11:49:08 -04:00
scottjehl
8f78c67b1b gave startPage a $ prefix 2010-10-20 11:48:00 -04:00