mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 20:54:46 +00:00
AMDized
This commit is contained in:
parent
7f14a3dfed
commit
63292b805d
15 changed files with 30 additions and 30 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* "links" plugin - simple class additions for links
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
|
|
@ -14,4 +14,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "listview" filter extension
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.listview" ], function( $, undefined ) {
|
||||
|
||||
$.mobile.listview.prototype.options.filter = false;
|
||||
$.mobile.listview.prototype.options.filterPlaceholder = "Filter items...";
|
||||
|
|
@ -111,4 +111,4 @@ $( document ).delegate( ":jqmData(role='listview')", "listviewcreate", function(
|
|||
.insertBefore( list );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "listview" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
//Keeps track of the number of lists per page UID
|
||||
//This allows support for multiple nested list in the same page
|
||||
|
|
@ -396,4 +396,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$( $.mobile.listview.prototype.options.initSelector, e.target ).listview();
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* a workaround for window.matchMedia
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
var $window = $( window ),
|
||||
$html = $( "html" );
|
||||
|
|
@ -42,4 +42,4 @@ $.mobile.media = (function() {
|
|||
};
|
||||
})();
|
||||
|
||||
})(jQuery);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "navbar" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.navbar", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -47,4 +47,4 @@ $( document ).bind( "pagecreate create", function( e ){
|
|||
$( $.mobile.navbar.prototype.options.initSelector, e.target ).navbar();
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* core utilities for auto ajax navigation, base tag mgmt,
|
||||
*/
|
||||
|
||||
( function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
//define vars for interal use
|
||||
var $window = $( window ),
|
||||
|
|
@ -1494,4 +1494,4 @@
|
|||
|
||||
};//_registerInternalEvents callback
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* history.pushState support, layered on top of hashchange
|
||||
*/
|
||||
|
||||
( function( $, window ) {
|
||||
define( [ "jquery", "jquery.mobile.navigation" ], function( $ ) {
|
||||
// For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents
|
||||
// Scope self to pushStateHandler so we can reference it sanely within the
|
||||
// methods handed off as event handlers
|
||||
|
|
@ -131,4 +131,4 @@
|
|||
pushStateHandler.init();
|
||||
}
|
||||
});
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
* "nojs" plugin - class to make elements hidden to A grade browsers
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
$( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
|
||||
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "page" plugin
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.page", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
@ -31,4 +31,4 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|||
return options.keepNativeDefault;
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* This plugin handles theming and layout of headers, footers, and content areas
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.mobile.page" ], function( $, undefined ) {
|
||||
|
||||
$.mobile.page.prototype.options.backBtnText = "Back";
|
||||
$.mobile.page.prototype.options.addBackBtn = false;
|
||||
|
|
@ -84,4 +84,4 @@ $( document ).delegate( ":jqmData(role='page'), :jqmData(role='dialog')", "pagec
|
|||
});
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* support tests
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
var fakeBody = $( "<body>" ).prependTo( "html" ),
|
||||
fbCSS = fakeBody[ 0 ].style,
|
||||
|
|
@ -115,4 +115,4 @@ if ( !$.support.boxShadow ) {
|
|||
$( "html" ).addClass( "ui-mobile-nosupport-boxshadow" );
|
||||
}
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "transitions" plugin - Page change tranistions
|
||||
*/
|
||||
|
||||
(function( $, window, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
function css3TransitionHandler( name, reverse, $to, $from ) {
|
||||
|
||||
|
|
@ -42,4 +42,4 @@ if ( $.mobile.defaultTransitionHandler === $.mobile.noneTransitionHandler ) {
|
|||
$.mobile.defaultTransitionHandler = css3TransitionHandler;
|
||||
}
|
||||
|
||||
})( jQuery, this );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
// The current version exposes the following virtual events to jQuery bind methods:
|
||||
// "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
|
||||
|
||||
(function( $, window, document, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
var dataPropertyName = "virtualMouseBindings",
|
||||
touchTargetPropertyName = "virtualTouchID",
|
||||
|
|
@ -492,4 +492,4 @@ if ( eventCaptureSupported ) {
|
|||
}
|
||||
}, true);
|
||||
}
|
||||
})( jQuery, window, document );
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* widget factory extentions for mobile
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery", "jquery.ui.widget" ], function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.widget", {
|
||||
// decorate the parent _createWidget to trigger `widgetinit` for users
|
||||
|
|
@ -46,4 +46,4 @@ $.widget( "mobile.widget", {
|
|||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
4
js/jquery.ui.widget.js
vendored
4
js/jquery.ui.widget.js
vendored
|
|
@ -8,7 +8,7 @@
|
|||
* http://docs.jquery.com/UI/Widget
|
||||
*/
|
||||
|
||||
(function( $, undefined ) {
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
|
||||
// jQuery 1.4+
|
||||
if ( $.cleanData ) {
|
||||
|
|
@ -260,4 +260,4 @@ $.Widget.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue