From aec0cbc946ecaa75559dd15f7f48c1edfef961b0 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 11 Nov 2010 18:47:21 -0500 Subject: [PATCH 1/4] docs updates --- docs/forms/index.html | 1 + docs/forms/plugin-eventsmethods.html | 130 +++++++++++++++++++++++++++ docs/lists/docs-lists.html | 6 ++ docs/toolbars/docs-headers.html | 7 ++ 4 files changed, 144 insertions(+) create mode 100755 docs/forms/plugin-eventsmethods.html diff --git a/docs/forms/index.html b/docs/forms/index.html index 6f0675c7..7d1262b8 100755 --- a/docs/forms/index.html +++ b/docs/forms/index.html @@ -31,6 +31,7 @@
  • Select menus
  • Theming forms
  • Submitting forms
  • +
  • Plugin methods
  • diff --git a/docs/forms/plugin-eventsmethods.html b/docs/forms/plugin-eventsmethods.html new file mode 100755 index 00000000..535d49e0 --- /dev/null +++ b/docs/forms/plugin-eventsmethods.html @@ -0,0 +1,130 @@ + + + + + jQuery Mobile Docs - Form Plugin Methods + + + + + + +
    + +
    +

    Form Plugin Methods

    +
    + +
    + +

    After jQuery Mobile auto-enhances form controls into custom controls, you can manipulate many of their properties via plugin methods. The currently available methods are listed below. Check Github for updates - we're working on complete coverage.

    + +

    Selectmenu

    +
    +
    Methods
    +
    open open a closed select menu
    +
    +
    
    +$('select').selectmenu('open');			
    +			
    +
    + +
    close close an open select menu
    +
    +
    
    +$('select').selectmenu('close');			
    +			
    +
    + +
    refresh: Update the custom menu to reflect the native select element's value. If the number of options in the select are different than the number of items in the custom menu, it'll rebuild the custom menu. Also, if you pass a true argument you can force the rebuild to happen.
    +
    +
    
    +//refresh value			
    +$('select').selectmenu('refresh');
    +
    +//refresh and force rebuild
    +$('select').selectmenu('refresh', true);
    +			
    +
    + +
    enable: enable a disabled select.
    +
    +
    
    +$('select').selectmenu('enable');			
    +			
    +
    + +
    disable: disable a select.
    +
    +
    
    +$('select').selectmenu('disable');			
    +			
    +
    + +
    + + + + + + +

    Textinput

    +
    +
    Methods
    + +
    enable: enable a disabled textinput/textarea.
    +
    +
    
    +$('input').textinput('enable');			
    +			
    +
    + +
    disable: disable a textinput/textarea.
    +
    +
    
    +$('textarea').textinput('disable');			
    +			
    +
    + +
    + + + + + +

    checkboxradio

    +
    +
    Methods
    + +
    enable: enable a disabled checkboxradio.
    +
    +
    
    +$('input').checkboxradio('enable');			
    +			
    +
    + +
    disable: disable a checkboxradio.
    +
    +
    
    +$('textarea').checkboxradio('disable');			
    +			
    +
    + +
    refresh: refresh a checkboxradio's value.
    +
    +
    
    +$('textarea').checkboxradio('refresh');			
    +			
    +
    +
    + + + + + +
    + +
    + + + \ No newline at end of file diff --git a/docs/lists/docs-lists.html b/docs/lists/docs-lists.html index 578010d2..9a466bf0 100755 --- a/docs/lists/docs-lists.html +++ b/docs/lists/docs-lists.html @@ -84,6 +84,12 @@

    If lists are embedded in a page with other types of content, an inset list packages the list into a block that sits inside the content area with a bit of margin and rounded corners (theme controlled). By adding the data-inset="true" attribute to the list (ul or ol), applies the inset appearance.

    Inset list example + +

    Updating lists

    +

    If you add items to a listview, you'll need to call the refresh() method on it to update the styles and create any nested lists that are added. For example, $('ul').listview('refresh');

    + +

    We're currently working on a few improvements to the refresh method, so keep your eye on Github for updates.

    + diff --git a/docs/toolbars/docs-headers.html b/docs/toolbars/docs-headers.html index f5726ebb..bf3e66bf 100755 --- a/docs/toolbars/docs-headers.html +++ b/docs/toolbars/docs-headers.html @@ -103,6 +103,13 @@

    Page Title

    Options + +

    Customizing the back button text

    + +

    If you'd like to configure the back button text, you can either use the data-back-btn-text="previous" attribute on your page element, or set it programmatically via the page plugin's options: $.mobile.page.prototype.options.backBtnText = "previous";. If you're doing this programmatically, set this option inside the mobileinit event handler.

    + + +

    Custom header configurations

    If you need to to create a header that doesn't follow the default configuration, simply wrap your custom styled markup in a container div inside the header container and the plugin won't apply the automatic button logic so you can write custom styles for laying out the content in your header.

    From bffd9a991b2dc13256ce88c5dde18e9d29a62c3d Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 11 Nov 2010 18:54:50 -0500 Subject: [PATCH 2/4] needed $.mobile.activePage --- experiments/themeswitcher/jquery.mobile.themeswitcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/themeswitcher/jquery.mobile.themeswitcher.js b/experiments/themeswitcher/jquery.mobile.themeswitcher.js index 0709dca7..e5ce7e3b 100644 --- a/experiments/themeswitcher/jquery.mobile.themeswitcher.js +++ b/experiments/themeswitcher/jquery.mobile.themeswitcher.js @@ -3,7 +3,7 @@ $.themeswitcher = function(){ var themesDir = 'http://jquerymobile.com/test/themes/', themes = ['default','valencia'], - currentPage = $.activePage, + currentPage = $.mobile.activePage, menuPage = $( '
    ' + '
    ' + '
    Switch Theme:
    '+ From 7a37d2507d3d748248c60e2b2a55074a22143aa7 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 11 Nov 2010 19:01:02 -0500 Subject: [PATCH 3/4] fixed error in selectmenu close function --- js/jquery.mobile.forms.select.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.forms.select.js b/js/jquery.mobile.forms.select.js index 3db0f945..d9c96dd4 100644 --- a/js/jquery.mobile.forms.select.js +++ b/js/jquery.mobile.forms.select.js @@ -246,7 +246,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, { var self = this; function focusButton(){ - setTimeout(self.button.focus, 40); + setTimeout(function(){ + self.button.focus(); + }, 40); + self.listbox.removeAttr('style').append( self.list ); } From aca00ea8ec382ad0878f335a0e574f1abb10b48b Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 11 Nov 2010 19:09:11 -0500 Subject: [PATCH 4/4] renaming for screen size --- docs/api/index.html | 6 +++--- docs/api/mediahelpers.html | 4 ++-- index.html | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api/index.html b/docs/api/index.html index 7a747085..a82f55eb 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -20,9 +20,9 @@ diff --git a/docs/api/mediahelpers.html b/docs/api/mediahelpers.html index d7470e19..9ea9c929 100755 --- a/docs/api/mediahelpers.html +++ b/docs/api/mediahelpers.html @@ -2,7 +2,7 @@ - jQuery Mobile Docs - Targeting Orientation and Resolution + jQuery Mobile Docs - Responsive Layout Helpers @@ -12,7 +12,7 @@
    -

    Targeting Orientation and Resolution

    +

    Responsive Layout Helpers

    diff --git a/index.html b/index.html index 097de053..974c3a5d 100755 --- a/index.html +++ b/index.html @@ -30,9 +30,9 @@