Commit graph

52 commits

Author SHA1 Message Date
John Bender
e741bc2da6 force close logic of custom select to run when close is clicked, centralize the binding for pagehide.remove 2011-09-23 16:32:56 -07:00
scottjehl
263193f490 Moved autoinit calls to after widgets. Made it so auto init selectors use the initSelector option, so that it can be configurable. 2011-07-27 18:42:16 -04:00
scottjehl
e07c40e3d0 exposed automatic initialization selectors on most widgets that expose options through the widget factory. Option name is "initSelector" 2011-07-26 14:22:08 -04:00
scottjehl
5dc3555373 restored dialog theming, which overrides default page theming, but not custom page theming. 2011-07-20 12:40:46 -04:00
scottjehl
2a6c7fc1b9 This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.

- Unit tests have been added and adjusted to support some internal changes involved in this commit.

- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.

- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.

- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 22:25:23 -04:00
scottjehl
b0552d79de removed some old alpha comments. Versioning covers this sort of thing. 2011-07-15 11:47:32 -04:00
Rick Waldron
5fe4bae160 jQuery core style guide conformance: jquery.mobile.dialog.js 2011-06-28 19:29:48 -04:00
scottjehl
1dd6608829 remove active button state on buttons that close dialogs. Fixes #1839 2011-06-17 02:11:59 -04:00
eddiemonge
244cda822a add white space for code standard 2011-05-31 14:44:31 -07:00
eddiemonge
0438418175 merge changes 2011-05-31 14:41:54 -07:00
Kin Blas
a5d3c05e4b Merge branch 'dialogToCodeStandards' of https://github.com/StevenBlack/jquery-mobile into StevenBlack
Fixed Conflicts:
	js/jquery.mobile.dialog.js
2011-05-31 14:14:05 -07:00
eddiemonge
d3df858eea missed an equal sign 2011-05-27 12:13:48 -07:00
eddiemonge
371efce3c3 actually use the defined variables 2011-05-26 17:20:56 -07:00
Steven Black
ab76ac33ac jquery.mobile.dialog.js: Whitespace changes and string delimiters, bringing this up to jQuery coding standards. Renamed one memory variable for legibility and clarity.
Signed-off-by: Steven Black <steveb@stevenblack.com>
2011-05-26 10:01:39 -04:00
Kin Blas
e5876e3d3b Attempt number 2 at fixing 1708 - - nightbuild close dialog throwing error 2011-05-25 17:17:21 -07:00
Kin Blas
923b047e75 Fix for issue 1708 - nightbuild close dialog throwing error
- Check the returned active object to see if it is valid before attempting to extract the transition out of it. Default to $.mobile.defaultDialogTransition if there is no active object.
2011-05-25 12:44:10 -07:00
jblas@adobe.com
729cda075a Merge branch 'master' into fastclick
Resolved Conflicts:
	js/jquery.mobile.buttonMarkup.js
	js/jquery.mobile.event.js
	js/jquery.mobile.forms.checkboxradio.js
	js/jquery.mobile.forms.select.js
	js/jquery.mobile.listview.js
2011-03-27 21:00:22 -07:00
scottjehl
ef1b0d94ae added the $.mobile.listview.prototype.options.closeBtnText option for configuring the text of dialog back/close buttons. This also Fixes #1227 (or at least a note within that already-closed issue). Documentation included. 2011-03-27 14:10:16 -04:00
scottjehl
7503f62a10 changed our two new custom data helper names to jqmData() and :jqmData() 2011-03-25 17:50:40 -04:00
Kin Blas
db89e1f24d Switch find/filter selector calls over to using the new :jqdata() pseudo selector. 2011-03-22 13:31:17 -07:00
scottjehl
ea60207c1b changed custom data method to $.fn.mobileData() and updated plugins that use it. 2011-03-09 23:27:21 -05:00
scottjehl
19f5fd7cae changed the default namespace to "" and updated the docs/demos as such 2011-03-09 22:36:14 -05:00
scottjehl
9e91fa6752 updated docs with jq namespace, found some more stragglers 2011-03-09 21:03:40 -05:00
scottjehl
ce34ece257 namespaced data- attrs to $.mobile.ns (defaults to "jq-") throughout the JS 2011-03-09 20:47:44 -05:00
Kin Blas
79c1b1fb69 Convert dialog and button over to using vclick. 2011-03-08 08:52:17 -08:00
scottjehl
b10c5c04c2 don't destroy dialogs on close. Now same-page dialogs can be reopened after close, and selects don't need to unbind dialog change events to override the destroy. 2011-01-28 14:30:24 -08:00
scottjehl
61bee4e276 fixed issue with select menus not opening again after you close them. 2011-01-26 21:02:08 -05:00
scottjehl
2c6cc45ad0 incomplete, but close to fixing the dialog-create-history entry piece. Also includes fix for nested-listview deep linking regression. 2011-01-26 14:27:10 -05:00
scottjehl
2ebf659fbd made sure linking to the same page from within a dialog closes the dialog. 2011-01-23 18:26:48 -05:00
scottjehl
be8eb3d0c6 deprecated data-back attribute on links in favor of data-direction="reverse". Updated docs and relevant demos. 2011-01-23 18:12:46 -05:00
scottjehl
9b57c46349 Refactored urlStack and updated dialog and page plugins to match. jQuery Mobile's internal history now attempts to follow the history menu when urls change from hashchange, even for changes that go multiple steps forward or back. The internal history stack is now pruned based on whether a user goes back and then changes direction, whereas before a back-button click would result in a pop off the history. Instead we now maintain an active index number in the history stack, which allows us to maintain references to transitions that are saved on pages reached through clicking the forward button as well. This fixes #636.
In the process, some other small changes should be noted:
urlStack is now urlHistory, a hash of methods and properties used for history stack management (stack, activeIndex, getActive, getPrev, getNext, addNew, clearForward, and listening Enabled). All these are documented inline and exposed on $.mobile.urlHistory (I'm not sure these will be publicly documented, but just exposed internally for plugins for now).

$.changePage has two argument changes: the "back" argument is now called "reverse"; this results in no change from an end-user standpoint, but reflects the fact that it only reverses the direction of a transition without affecting the internal history stack, and second, a new argument at the end defines whether changePage was called from a hashChange which makes that url open to history menu guessing.
2011-01-23 17:33:36 -05:00
scottjehl
9e4b0a484c Overhauled path object and exposed it and the base object via $.mobile. Form and Link handlers now use the path methods internally. Unit tests adjusted, but more are needed to fully cover the path and base propeties and methods. Fixes #566. 2011-01-22 17:42:07 -05:00
John Bender
e5d2bf1b66 added target check to $.mobile.isExternalLink 2011-01-20 23:05:37 -08:00
John Bender
ffafa78e62 added tests for external links in dialogs, small refactor for dialogClickHandler function 2011-01-20 22:20:16 -08:00
John Bender
8a5060de13 fixed issue with dialog click handler breaking transitions on external links Fixes #642 2011-01-19 23:48:30 -08:00
Pavel Karoukin
794adfeca0 Click on form in dialog prevents exit from dialog 2011-01-14 23:44:24 +08:00
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
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
b7b553da84 missed a few files in that last commit. 2010-11-11 15:08:48 -05:00
scottjehl
055bf14e3f moved changePage, pageLoading, and silentScroll methods to $.mobile obj. 2010-11-11 15:03:40 -05:00
scottjehl
a24196e550 dolla dolla bills y'all.
Fixes #126, Fixes #346
2010-11-11 10:50:28 -05:00
scottjehl
356308e6b7 updates to comments 2010-11-09 19:55:52 -05:00
scottjehl
812e4c6978 fixed support for back button closing of dialogs, utilizing new $.mobile.updateHash method. Fixes #412 2010-11-09 19:10:54 -05:00
scottjehl
734fb4d9b5 fixed theming of dialog body so it'll get C if no theme specified. Fixes #398 2010-11-08 22:20:09 -05:00
scottjehl
3392be05d3 Added close() method to dialogs: $('.ui-dialog').dialog('close') . Also, links clicked within a dialog will now close the dialog on their way to their destination, just as if the dialog were a normal page. For links that are meant only for closing the dialog, such as a "cancel" link, just link to the page that triggered the dialog to open. This pattern of linking to the previous page happens to be meaningful in non-js browsing as well. If you are generating that link on the fly, just set its href to location.href. Fixes #383 2010-11-04 22:49:28 -04:00
scottjehl
ef3fd116dc refactored to use widget factory and not be tracked via hash/history. Fixes #176 2010-10-21 16:29:05 -04:00
scottjehl
cb13c2f84a updated to use new changePage function, which no longer has a "from" arg 2010-10-21 13:12:25 -04:00
scottjehl
0ec600c1b3 Improved and expanded ARIA coverage to more components, including landmarks on common top-level page elements. Fixes #137 2010-10-10 21:17:49 -04:00