Commit graph

89 commits

Author SHA1 Message Date
Kin Blas
349bcb190f Added textfield types tel, url, and email to the selector list of customTextInput(). The HTML5 spec says these are also represented by textfields. 2010-10-04 13:11:41 -07:00
Kin Blas
83c46b1f79 Fix for issue 83 - customSelect() expects its containing page to be mobilized before it is invoked.
- Added code to mobilize that processes page and content roles prior to form element processing. I left the code that processes page and content roles in the main processing loop just in case pages/content are injected dynamically by other roles.
2010-10-04 13:03:54 -07:00
scottjehl
c484629e84 reworked the timing and styles for the pageLoading sequences in attempt to reduce blinky behavior. Small improvements... 2010-10-03 16:43:50 -04:00
scottjehl
1317c57863 whitespace only 2010-10-03 16:01:10 -04:00
scottjehl
9d342f4d9e removed a superflous statement 2010-10-03 14:51:34 -04:00
scottjehl
13c10d4862 links with any target attr will not use ajaxClick (not just _blank) 2010-10-03 11:20:14 -04:00
scottjehl
762341fc52 moved the resetBaseURL call into the hashchange, instead of in ajaxClick 2010-10-03 09:58:26 -04:00
scottjehl
8a35ec8e37 make sure base url is reset for cached pages, in addition to newly loaded ones. 2010-10-03 09:48:52 -04:00
scottjehl
04cb593fc3 refactored base url logic to work in combination with a <base> element, so assets referenced in loaded pages have proper base paths. 2010-10-03 09:41:45 -04:00
scottjehl
71d1c7272a made sure trailing slash is only added to baseURL when it's not an empty string. 2010-10-03 08:18:57 -04:00
scottjehl
592236d915 moved a variable to local scope 2010-10-02 15:54:47 -04:00
scottjehl
6297306a5b Big overhaul of ajaxClick functionality so it'll support a base URL and properly fix relative URLS to be absolute to the page from which requests are made (both by http or xmlhttprequest) 2010-10-02 15:41:57 -04:00
scottjehl
aeb2643bdc Ajaxclick function will now detect if it's an external link, and if so, it won't use Ajax. 2010-10-02 12:18:45 -04:00
scottjehl
b6239c02f7 removed references to globalnavs, as they'll need to be managed in a different way. 2010-10-01 18:45:46 -04:00
scottjehl
3f2c23b66d added theming for headers and footers to switch statement 2010-10-01 18:45:21 -04:00
jzaefferer
f148dbdd69 Refactored $.mobilize further to optimize form and controlgroup init. Added some notes 2010-09-30 14:08:59 +02:00
scottjehl
012d79eb58 selector for datepicker hackaround was too broad. 2010-09-29 09:21:31 -07:00
scottjehl
7fe3d9a22f Merge branch 'master' of github.com:jquery/jquery-mobile 2010-09-28 08:57:31 -07:00
scottjehl
bfae696a58 removed some icon cruft from ui 2010-09-27 16:58:05 -05:00
scottjehl
75413a992b unused selector 2010-09-27 16:55:03 -05:00
scottjehl
ad9165caa7 killed the shadow 2010-09-27 16:41:20 -05:00
scottjehl
0511300702 added super sketchy workaround for a datepicker demo. We can toss these out once we figure out how we'll properly include a datepicker. 2010-09-27 16:33:37 -05:00
Kin Blas
0717106b94 Fixed issue 62: Multiple data-role="page" elements in a single document results in multiple markup insertion passes.
The function used to iterate over all pages was making reference to th e$el variable passed into mobilize(). This meant it was executing the same operation over *ALL* pages several times, once for each page in the document.

- Redefined $el in the funciton passed to the each() method.
2010-09-27 11:39:57 -07:00
scottjehl
92c49bf97e extended slider to support simple toggle switches based on select menus.
The logic will actually support multi-option selects as well, but the labels are flipped in order for switch-style controls, so if we want to support regular sliders from selects, the labels will have to be in forward order and beneath the slider bar.
2010-09-23 12:51:23 -04:00
scottjehl
149b071af1 added meta tags for fullscreen, bookmarking, etc. These will need some configurable options like jQtouch has 2010-09-22 13:54:52 -04:00
scottjehl
a78d5efbc5 made sure form controls with a role of nojs are not enhanced 2010-09-22 09:49:36 -04:00
jzaefferer
0cb179e9fe Fixed collpsible typo. 2010-09-21 23:18:00 +02:00
jzaefferer
71a80f413a Refactored mobilize to iterate over dataEls just once, removing about 10 filter calls. 2010-09-21 22:56:48 +02:00
scottjehl
3d8ad26463 added slider auto-init code to mobilize function 2010-09-21 15:25:52 -04:00
scottjehl
d35881628c removed swipe event always bound to body. 2010-09-21 15:21:28 -04:00
scottjehl
53771bbb68 rewrote mobilize function to pre-fetch elements and filter based on the results. Avg time running mobilize function on home page went from ~120ms to ~85ms. 2010-09-21 12:24:12 -04:00
scottjehl
9e37d2c1e9 added a few lines to the $mobilize function to convert the roles of header/content/footer to classes.
updated ajaxform and globalnav to accommodate change
2010-09-21 10:56:50 -04:00
scottjehl
af585dc8c7 Added support for nested urls through the following additions:
1. added the $.mobile object, for storing public options used in core and other plugins that should be made configurable externally, somehow.

2. With this change comes the first property $.mobile: subPageUrlKey, which defaults to "ui-page" and becomes the URL parameter for denoting a generated sub-page of a particular URL. For example, you can now deep-link to sub-levels of a nested listview like this:
jquerymobile.com/test/#_listview.html&ui-page=listview-2

...in which "listview-2" refers to a generated page created by _listview.html when mobilize() runs on it.

Note that this &ui-page parameter is used for splitting the hash to find the right part to use for the ajax request for the real url (_listview.html), while the ID of the actual subpage div really uses the whole thing: "_listview.html&ui-page=listview-2".

The other idea is that after the "&ui-page=" part, plugins should use an ID that reflects their widget name. For example, &ui-page=listview-2 or &ui-page=globalnav.

Before this change, subpages would use the whole hash without mentioning their parent page url, so you'd end up with blank pages if you hit refresh while viewing a generated sub-page.
2010-09-20 18:21:53 -04:00
John Resig
2484c41900 Use jQuery instead of $ to match the core style guideline. 2010-09-20 16:48:45 -04:00
scottjehl
2cafd2dc00 renamed autoform to ajaxform. All dependencies that use it are updated. 2010-09-20 10:47:49 -04:00
scottjehl
c16dee657b new attribute: data-role="nojs" can be applied to any element that should be accessibly hidden from the page for A browsers. 2010-09-19 18:21:09 -04:00
scottjehl
02a76c3f48 added the auto-init for autoforms to mobilize function 2010-09-19 18:15:02 -04:00
scottjehl
14436257f6 made sure ui-page class is only added if there's no closest('.ui-page') present on it during mobilize call 2010-09-19 18:11:39 -04:00
scottjehl
8c7205c3ad added 4 functions to $ namespace for use in external plugins 2010-09-19 18:09:05 -04:00
scottjehl
0782029b12 made $.mobilize available for externals 2010-09-19 17:57:06 -04:00
scottjehl
a3c1a3a57f uncommented line to fade in content after loading finishes 2010-09-19 15:21:28 -04:00
scottjehl
b351290a9c modified manageglobalnav function to work based on a passed element argument 2010-09-19 11:10:02 -04:00
scottjehl
456d754a87 changed initial selector to find first page so it doesn't use ui-page class 2010-09-19 10:49:28 -04:00
scottjehl
843f5810ee moved initial mobilize call after ID is set 2010-09-19 10:47:27 -04:00
scottjehl
12773bc925 changed to use classes for toggling globalnav visibility 2010-09-19 10:35:48 -04:00
scottjehl
c3d95d5fd0 changed to make sure mobilize is called on any pagechange (to accommodate generated globalnav pages. Made sure it can only be run once on a page.
also added manageGlobalnav function to show/hide globalnavs depending on whether the active page is an expanded globalnav.
2010-09-19 10:32:46 -04:00
scottjehl
1c1dc1d94f append globalnav to end of body after page change 2010-09-18 14:02:49 -04:00
scottjehl
f9f236fb8b Big update:
In starting markup, pages should now be identified with the attribute data-role="page".  This allows us to then add ui-page programatically, hiding all non-active pages, and apply ui-page-active to one page at a time to show it.

mobile.js is updated to find pages by this attribute now, instead of ui-page class.

fixes issue 32
2010-09-18 12:20:35 -04:00
scottjehl
37f16c3022 undo that last change for binding swiperight to ui-page with live. Namespaced unbinding didn't seem to work. 2010-09-18 11:15:24 -04:00
scottjehl
36dba04c6b changed automated swiperight binding to ui-page instead of body. 2010-09-18 11:12:50 -04:00