Commit graph

129 commits

Author SHA1 Message Date
jzaefferer
037729415c Refactored slider code a bit, just a first pass. 2010-09-21 23:31:25 +02:00
Scott González
9c6f03ca00 Only listen to mousemove/touchmove and mouseup/touchend events after mousedown/touchstart is triggered. Improves performance by not listening to all move events. 2010-09-21 17:29:43 -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
8b5a1b0a1f moved the percent fixer logic out of the if/else 2010-09-21 16:45:45 -04:00
scottjehl
a66fd2f296 Merge branch 'master' of github.com:jquery/jquery-mobile 2010-09-21 16:43:24 -04:00
scottjehl
e6707af667 added aria support 2010-09-21 16:43:07 -04:00
jzaefferer
176dfcebab Adding converter-demo. Not yet actually using cache.manifest, as that screws up testing on mobile devices. At least on Mobile Safari there is no way to clear that offline cache - none that I found so far. 2010-09-21 22:33:06 +02:00
scottjehl
3b7a717e92 more updates to slider css and js. Should have itemized commits, but this thing's still in first-pass status. 2010-09-21 16:07:23 -04:00
scottjehl
9ec0823443 needed to pass the event arg 2010-09-21 15:33:51 -04:00
scottjehl
8e3aa35931 return clicks false on handle 2010-09-21 15:32:35 -04:00
scottjehl
3d8ad26463 added slider auto-init code to mobilize function 2010-09-21 15:25:52 -04:00
scottjehl
4992d7b168 First pass at a simple slider plugin. Can be called on an input element with data-role="slider". Controls communicate both ways during use. 2010-09-21 15:25:23 -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
5ca0d616ad updated both plugins to use the new nested hash URL scheme for deep-linking. 2010-09-20 18:22:19 -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
0726fe484c added search icon 2010-09-19 19:03:16 -04:00
scottjehl
51f3fa2e2b default to no auto-submit events. 2010-09-19 19:02:21 -04:00
scottjehl
845549949c don't add ui-body class to form 2010-09-19 18:37:51 -04:00
scottjehl
ee001d1338 added logic for applying different classes and behavior to search inputs 2010-09-19 18:34:50 -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
cc58c6e0f5 added jQuery.mobile.forms.autoform.js to the manifest 2010-09-19 18:14:40 -04:00
scottjehl
5c3ab41cf3 adding autoform plugin 2010-09-19 18:12:36 -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
458e7b5d2f edited globalnav expanded button styles 2010-09-19 12:07:49 -04:00
scottjehl
b351290a9c modified manageglobalnav function to work based on a passed element argument 2010-09-19 11:10:02 -04:00
scottjehl
08f1ec9bf8 rewrite of globalnav plugin. Anything beyond 3 links auto-generates a "more..." button and creates a fully navigable, scrollable page with all the links in a grid view. 2010-09-19 10:51:21 -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
682595628f updated to use grid plugin for column layouts 2010-09-19 08:24:25 -04:00
scottjehl
b500be9657 added new grid plugin for adding classes to create flexible column layouts. 2010-09-19 08:14:48 -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
d6e17cafdd removed a couple brackets in attr() methods. 2010-09-18 11:47:07 -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
scottjehl
125cb6c156 changed globalnav logic to do the following:
- globalnav elements can now be included at the end of any ui-page div
- mobilize will create the globalnav when it finds one, append outside of ui-page to persist across pages
- when a new page is loaded that includes a globalnav, old globalnav will be replaced with the new one.
2010-09-18 10:55:37 -04:00
scottjehl
e016cfa6b7 make sure globalnav is only called once on a div 2010-09-18 10:44:46 -04:00
scottjehl
6fa401276a renamed files with jQuery.mobile. prefixes 2010-09-18 09:59:33 -04:00
scottjehl
b14ae8bc16 added support for a JS fallback for auto-numbering in listviews made from OL elements. If supported, numbering is pure CSS, otherwise, the script will generate numbering.
In both the css and the js, the counters will restart whenever a list grouping header is encountered.
2010-09-18 08:21:51 -04:00