mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-02 11:54:43 +00:00
AMDized
This commit is contained in:
parent
c9b029e5df
commit
7f14a3dfed
19 changed files with 39 additions and 40 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* "buttons" plugin - for making button-like links
|
||||
*/
|
||||
|
||||
( function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$.fn.buttonMarkup = function( options ) {
|
||||
options = options || {};
|
||||
|
|
@ -184,4 +184,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
.buttonMarkup();
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
/*
|
||||
* "collapsible" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.collapsible", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -115,4 +114,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$( $.mobile.collapsible.prototype.options.initSelector, e.target ).collapsible();
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
/*
|
||||
* "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$.fn.controlgroup = function( options ) {
|
||||
|
||||
|
|
@ -50,4 +49,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$( ":jqmData(role='controlgroup')", e.target ).controlgroup({ excludeInvisible: false });
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
});
|
||||
|
|
@ -2,7 +2,8 @@
|
|||
* "core" - The base file for jQm
|
||||
*/
|
||||
|
||||
(function( $, window, undefined ) {
|
||||
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
var nsNormalizeDict = {};
|
||||
|
||||
|
|
@ -233,5 +234,5 @@
|
|||
$.find.matchesSelector = function( node, expr ) {
|
||||
return $.find( expr, null, null, [ node ] ).length > 0;
|
||||
};
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "degradeInputs" plugin - degrades inputs to another type after custom enhancements are made.
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$.mobile.page.prototype.options.degradeInputs = {
|
||||
color: false,
|
||||
|
|
@ -51,4 +51,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "dialog" plugin.
|
||||
*/
|
||||
|
||||
(function( $, window, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.dialog", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -70,4 +70,4 @@ $( document ).delegate( $.mobile.dialog.prototype.options.initSelector, "pagecre
|
|||
$( this ).dialog();
|
||||
});
|
||||
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "events" plugin - Handles events
|
||||
*/
|
||||
|
||||
(function( $, window, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
// add new event shortcuts
|
||||
$.each( ( "touchstart touchmove touchend orientationchange throttledresize " +
|
||||
|
|
@ -315,4 +315,4 @@ $.each({
|
|||
};
|
||||
});
|
||||
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "fieldcontain" plugin - simple class additions to make form row separators
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$.fn.fieldcontain = function( options ) {
|
||||
return this.addClass( "ui-field-contain ui-body ui-br" );
|
||||
|
|
@ -13,4 +13,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$( ":jqmData(role='fieldcontain')", e.target ).fieldcontain();
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "fixHeaderFooter" plugin - on-demand positioning for headers,footers
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
var slideDownClass = "ui-header-fixed ui-fixed-inline fade",
|
||||
slideUpClass = "ui-footer-fixed ui-fixed-inline fade",
|
||||
|
|
@ -372,4 +372,4 @@ $( document ).bind( "pagecreate create", function( event ) {
|
|||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "fixHeaderFooter" native plugin - Behavior for "fixed" headers,footers, and scrolling inner content
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
// Enable touch overflow scrolling when it's natively supported
|
||||
$.mobile.touchOverflowEnabled = false;
|
||||
|
|
@ -57,4 +57,4 @@ $( document ).bind( "pagecreate", function( event ) {
|
|||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "button" plugin - links that proxy to native input/buttons
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.button", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -98,4 +98,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$.mobile.button.prototype.enhanceWithin( e.target );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "checkboxradio" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.checkboxradio", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -193,4 +193,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$.mobile.checkboxradio.prototype.enhanceWithin( e.target );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* custom "selectmenu" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.forms.select" ], function( $, undefined ) {
|
||||
var extendSelect = function( widget ){
|
||||
|
||||
var select = widget.select,
|
||||
|
|
@ -490,4 +490,4 @@
|
|||
extendSelect( selectmenuWidget );
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "selectmenu" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.selectmenu", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -202,4 +202,4 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$.mobile.selectmenu.prototype.enhanceWithin( e.target );
|
||||
});
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "slider" plugin
|
||||
*/
|
||||
|
||||
( function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.slider", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -365,4 +365,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$.mobile.slider.prototype.enhanceWithin( e.target );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "textinput" plugin for text inputs, textareas
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.textinput", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -125,4 +125,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$.mobile.textinput.prototype.enhanceWithin( e.target );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* plugin for creating CSS grids
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$.fn.grid = function( options ) {
|
||||
return this.each(function() {
|
||||
|
|
@ -47,4 +47,4 @@ $.fn.grid = function( options ) {
|
|||
}
|
||||
});
|
||||
};
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
// extra awesomeness that BBQ provides. This plugin will be included as
|
||||
// part of jQuery BBQ, but also be available separately.
|
||||
|
||||
(function($,window,undefined){
|
||||
define( [ "jquery" ], function( $, undefined ){
|
||||
'$:nomunge'; // Used by YUI compressor.
|
||||
|
||||
// Reused string.
|
||||
|
|
@ -378,4 +378,4 @@
|
|||
return self;
|
||||
})();
|
||||
|
||||
})(jQuery,this);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "init" - Initialize the framework
|
||||
*/
|
||||
|
||||
(function( $, window, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.core" ], function( $, undefined ) {
|
||||
var $html = $( "html" ),
|
||||
$head = $( "head" ),
|
||||
$window = $( window );
|
||||
|
|
@ -140,4 +140,4 @@
|
|||
// hide iOS browser chrome on load
|
||||
$window.load( $.mobile.silentScroll );
|
||||
});
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue