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.
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.
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
- 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.
This value is set via ajaxClick and nulled out after use in a hashchange. Also, added a global var to specify ui-page selectors that should be removed from the page when the hash changes. Default is just '.ui-dialog'
Now we only really need the hashchange plugin, unless plugins like tabs and tree end up needing to track their state via hash params. (Currently, jQuery.tabs.js uses bbq for tracking state under the "tab" parameter.)
For now, this fixes#6