diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index 512d2f4d..9989e0f5 100755 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -1,8 +1,7 @@ -/* -* "buttons" plugin - for making button-like links -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: For making button-like links. +//>>label: Buttons + define( [ "jquery.mobile.core", "jquery.mobile.vmouse" ], function() { //>>excludeEnd("jqmBuildExclude"); ( function( $, undefined ) { @@ -209,4 +208,4 @@ $( document ).bind( "pagecreate create", function( e ){ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); }); -//>>excludeEnd("jqmBuildExclude"); \ No newline at end of file +//>>excludeEnd("jqmBuildExclude"); diff --git a/js/jquery.mobile.collapsible.js b/js/jquery.mobile.collapsible.js index 4dbaba7e..59aaa965 100644 --- a/js/jquery.mobile.collapsible.js +++ b/js/jquery.mobile.collapsible.js @@ -1,8 +1,6 @@ -/* -* "collapsible" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Creates collapsible content areas. +//>>label: Collapsibles define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.collapsibleSet.js b/js/jquery.mobile.collapsibleSet.js index 4e9eae3f..76bf3db9 100644 --- a/js/jquery.mobile.collapsibleSet.js +++ b/js/jquery.mobile.collapsibleSet.js @@ -1,8 +1,7 @@ -/* -* "collapsibleset" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: For creating grouped collapsible content areas. +//>>label: Collapsible Sets + define( [ "jquery.mobile.widget", "jquery.mobile.collapsible" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.controlGroup.js b/js/jquery.mobile.controlGroup.js index 9ded3521..5f40f63f 100644 --- a/js/jquery.mobile.controlGroup.js +++ b/js/jquery.mobile.controlGroup.js @@ -1,8 +1,7 @@ -/* -* "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Corner-rounding for groups of buttons, checks, radios, etc +//>>label: Controlgroups + define( [ "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index 764ad7b8..33b31272 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -1,8 +1,7 @@ -/* -* "core" - The base file for jQm -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: The base file for jQM +//>>label: Core + define( [ "jquery.mobile.widget" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, window, undefined ) { @@ -158,11 +157,24 @@ define( [ "jquery.mobile.widget" ], function() { } e = e.parentNode; } - + // Return the theme letter we found, if none, return the // specified default. return ltr || defaultTheme || "a"; + }, + + // TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers + // + // Find the closest javascript page element to gather settings data jsperf test + // http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit + // possibly naive, but it shows that the parsing overhead for *just* the page selector vs + // the page and dialog selector is negligable. This could probably be speed up by + // doing a similar parent node traversal to the one found in the inherited theme code above + closestPageData: function( $target ) { + return $target + .closest(':jqmData(role="page"), :jqmData(role="dialog")') + .data("page"); } }, $.mobile ); diff --git a/js/jquery.mobile.degradeInputs.js b/js/jquery.mobile.degradeInputs.js index 1e22e146..69b3591b 100644 --- a/js/jquery.mobile.degradeInputs.js +++ b/js/jquery.mobile.degradeInputs.js @@ -1,8 +1,7 @@ -/* -* "degradeInputs" plugin - degrades inputs to another type after custom enhancements are made. -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Degrades inputs to another type after custom enhancements are made. +//>>label: Degrade Inputs + define( [ "jquery.mobile.page" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.dialog.js b/js/jquery.mobile.dialog.js index a2b4beb5..27258850 100644 --- a/js/jquery.mobile.dialog.js +++ b/js/jquery.mobile.dialog.js @@ -1,8 +1,7 @@ -/* -* "dialog" plugin. -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Degrades inputs to another type after custom enhancements are made. +//>>label: Dialog-style Pages + define( [ "jquery.mobile.widget" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, window, undefined ) { diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index d65bd851..fb9c8881 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -1,8 +1,6 @@ -/* -* "events" plugin - Handles events -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Custom events and shortcuts. +//>>label: Events define( [ "jquery.mobile.core", "jquery.mobile.media", "jquery.mobile.support", "jquery.mobile.vmouse" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, window, undefined ) { diff --git a/js/jquery.mobile.fieldContain.js b/js/jquery.mobile.fieldContain.js index f09e05f0..989751ba 100644 --- a/js/jquery.mobile.fieldContain.js +++ b/js/jquery.mobile.fieldContain.js @@ -1,8 +1,7 @@ -/* -* "fieldcontain" plugin - simple class additions to make form row separators -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Simple class additions to make form row separators +//>>label: Fieldcontains + define(function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.forms.button.js b/js/jquery.mobile.forms.button.js index 172fec71..a418fabf 100644 --- a/js/jquery.mobile.forms.button.js +++ b/js/jquery.mobile.forms.button.js @@ -1,8 +1,7 @@ -/* -* "button" plugin - links that proxy to native input/buttons -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Form Buttons +//>>label: links that proxy to native input/buttons + define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.forms.checkboxradio.js b/js/jquery.mobile.forms.checkboxradio.js index 3e426120..0970fc2f 100644 --- a/js/jquery.mobile.forms.checkboxradio.js +++ b/js/jquery.mobile.forms.checkboxradio.js @@ -3,6 +3,9 @@ */ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Consistent styling for checkboxes/radio buttons. +//>>label: Checkboxes/Radio Buttons + define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.forms.select.custom.js b/js/jquery.mobile.forms.select.custom.js index 2d245117..ab01687a 100644 --- a/js/jquery.mobile.forms.select.custom.js +++ b/js/jquery.mobile.forms.select.custom.js @@ -3,6 +3,9 @@ */ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Fully-custom select menus. +//>>label: Custom Selects + define( [ "jquery.mobile.buttonMarkup", "jquery.mobile.core", diff --git a/js/jquery.mobile.forms.select.js b/js/jquery.mobile.forms.select.js index 21c5f890..e7798a6c 100644 --- a/js/jquery.mobile.forms.select.js +++ b/js/jquery.mobile.forms.select.js @@ -1,8 +1,7 @@ -/* -* "selectmenu" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Consistent styling for native select menus. +//>>label: Enhanced Native Selects + define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js index 142f9a0e..fc61c1b8 100644 --- a/js/jquery.mobile.forms.slider.js +++ b/js/jquery.mobile.forms.slider.js @@ -1,7 +1,7 @@ -/* -* "slider" plugin -*/ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Slider form widget +//>>label: Slider + define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.forms.textinput", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); ( function( $, undefined ) { diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index 772607c1..20f95cff 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -1,8 +1,9 @@ -/* -* "textinput" plugin for text inputs, textareas -*/ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); -define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.degradeInputs", "jquery.mobile.buttonMarkup" ], function() { +//>>description: Enhances and consistently styles text inputs. +//>>label: Text Inputs + +define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobi +le.degradeInputs", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.grid.js b/js/jquery.mobile.grid.js index 3681e715..2b6155c2 100644 --- a/js/jquery.mobile.grid.js +++ b/js/jquery.mobile.grid.js @@ -1,8 +1,7 @@ -/* -* plugin for creating CSS grids -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Applies classes for grid styling. +//>>label: CSS Grid Tool + define(function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.init.js b/js/jquery.mobile.init.js index 6bb16370..25aed840 100644 --- a/js/jquery.mobile.init.js +++ b/js/jquery.mobile.init.js @@ -1,8 +1,7 @@ -/* -* "init" - Initialize the framework -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Applies classes for grid styling. +//>>label: CSS Grid Tool + define( [ "jquery.mobile.core", "jquery.mobile.navigation", "jquery.mobile.navigation.pushstate" ], function() { //>>excludeEnd("jqmBuildExclude"); ( function( $, window, undefined ) { diff --git a/js/jquery.mobile.links.js b/js/jquery.mobile.links.js index d57aac2c..586a80eb 100644 --- a/js/jquery.mobile.links.js +++ b/js/jquery.mobile.links.js @@ -1,8 +1,7 @@ -/* -* "links" plugin - simple class additions for links -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Simple class additions for links. +//>>label: Link Classes + define( function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.listview.filter.js b/js/jquery.mobile.listview.filter.js index 51873df9..bef34dba 100755 --- a/js/jquery.mobile.listview.filter.js +++ b/js/jquery.mobile.listview.filter.js @@ -1,8 +1,7 @@ -/* -* "listview" filter extension -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Adds a filtering textfield to listviews +//>>label: Listview Filter + define( [ "jquery.mobile.listview", "jquery.mobile.forms.textinput" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.listview.js b/js/jquery.mobile.listview.js index 842afcec..c9e7e6a5 100644 --- a/js/jquery.mobile.listview.js +++ b/js/jquery.mobile.listview.js @@ -1,8 +1,7 @@ -/* -* "listview" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Adds a filtering textfield to listviews +//>>label: Listview Filter + define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.page", "jquery.mobile.page.sections" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.media.js b/js/jquery.mobile.media.js index d7155d3e..6ce475cd 100644 --- a/js/jquery.mobile.media.js +++ b/js/jquery.mobile.media.js @@ -1,8 +1,7 @@ -/* -* a workaround for window.matchMedia -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: A workaround for browsers without window.matchMedia +//>>label: matchMedia Polyfill + define( [ "jquery.mobile.core" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.navbar.js b/js/jquery.mobile.navbar.js index e160790e..135c1fe6 100644 --- a/js/jquery.mobile.navbar.js +++ b/js/jquery.mobile.navbar.js @@ -1,8 +1,7 @@ -/* -* "navbar" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Formats groups of links as navigation bars. +//>>label: Navigation Bars + define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.grid" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index c71fa15c..a0a7914e 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -1,8 +1,7 @@ -/* -* core utilities for auto ajax navigation, base tag mgmt, -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Formats groups of links as nav bars. +//>>label: Navigation Bars + define( [ "jquery.mobile.core", "jquery.mobile.event", diff --git a/js/jquery.mobile.navigation.pushstate.js b/js/jquery.mobile.navigation.pushstate.js index 45084736..4e61bf76 100644 --- a/js/jquery.mobile.navigation.pushstate.js +++ b/js/jquery.mobile.navigation.pushstate.js @@ -1,8 +1,7 @@ -/* -* history.pushState support, layered on top of hashchange -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: history.pushState support, layered on top of hashchange. +//>>label: Pushstate Support + define( [ "jquery.mobile.navigation" ], function() { //>>excludeEnd("jqmBuildExclude"); ( function( $, window ) { diff --git a/js/jquery.mobile.nojs.js b/js/jquery.mobile.nojs.js index 0584a038..223d76f2 100644 --- a/js/jquery.mobile.nojs.js +++ b/js/jquery.mobile.nojs.js @@ -1,8 +1,7 @@ -/* -* "nojs" plugin - class to make elements hidden to A grade browsers -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Adds class to make elements hidden to A grade browsers +//>>label: “nojs” Classes + define(function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.page.js b/js/jquery.mobile.page.js index b44af7d0..3aa9f6b1 100644 --- a/js/jquery.mobile.page.js +++ b/js/jquery.mobile.page.js @@ -1,8 +1,7 @@ -/* -* "page" plugin -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Basic page formatting. +//>>label: Pages + define( [ "jquery.mobile.widget" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.page.sections.js b/js/jquery.mobile.page.sections.js index 4604a561..b4b61196 100644 --- a/js/jquery.mobile.page.sections.js +++ b/js/jquery.mobile.page.sections.js @@ -1,8 +1,7 @@ -/* -* This plugin handles theming and layout of headers, footers, and content areas -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Theming and layout of headers, footers, and content areas +//>>label: Page Sections + define( [ "jquery.mobile.page", "jquery.mobile.core", "jquery.mobile.buttonMarkup" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index ee6849ef..681e0c19 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -1,8 +1,7 @@ -/* -* support tests -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Assorted support tests. +//>>label: Support Tests + // For test purposes we can't use anonymous module here otherwise // the tests will throw http://requirejs.org/docs/errors.html#mismatch define( "jquery.mobile.support", [ "jquery.mobile.media" ], function() { diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index 6c7f5177..906a0dbb 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -3,6 +3,9 @@ */ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Page change tranistions. +//>>label: Page Transitions + // TODO the dependency defined here for transitions is to make sure // that the defaultTransitionHandler is defined _after_ navigation has been defined // This requires a rework/rethinking diff --git a/js/jquery.mobile.vmouse.js b/js/jquery.mobile.vmouse.js index ef0f367c..e88af5d3 100644 --- a/js/jquery.mobile.vmouse.js +++ b/js/jquery.mobile.vmouse.js @@ -1,6 +1,3 @@ -/* -* "mouse" plugin -*/ // This plugin is an experiment for abstracting away the touch and mouse // events so that developers don't have to worry about which method of input @@ -18,6 +15,9 @@ // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Normalizes touch/mouse events. +//>>label: Virtual Mouse Bindings + define(function() { //>>excludeEnd("jqmBuildExclude"); (function( $, window, document, undefined ) { diff --git a/js/jquery.mobile.widget.js b/js/jquery.mobile.widget.js index 2c2abefc..3202faf8 100644 --- a/js/jquery.mobile.widget.js +++ b/js/jquery.mobile.widget.js @@ -1,8 +1,7 @@ -/* -* widget factory extentions for mobile -*/ - //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: Widget factory extentions for mobile. +//>>label: Widget Factory Extensions + define( [ "jquery.ui.widget" ], function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) { diff --git a/js/jquery.ui.widget.js b/js/jquery.ui.widget.js index a9a7d2dd..438420a6 100644 --- a/js/jquery.ui.widget.js +++ b/js/jquery.ui.widget.js @@ -9,6 +9,9 @@ */ //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude); +//>>description: jQuery UI Widget Factory. +//>>label: Widget Factory + define(function() { //>>excludeEnd("jqmBuildExclude"); (function( $, undefined ) {